gauravbr Posted January 31, 2004 Posted January 31, 2004 IMWindow is other Form --------------------------------------------------------- Code in main Form Dim imw As IMWindow imw = New IMWindow(objRTCClient, objProfile, RTCCORELib.RTC_SESSION_TYPE.RTCST_MULTIPARTY_IM, Buddy.PresentityURI, Buddy.Name) ------------------------------------------------------- how to set the variables in the other form by passing this variavbles. how to declare it in IMWindow and where to declare. i am getting error too many Parameters in Public Sub New() I am using RTCDLL.DLL file in this project:confused: I cannot make these variables as Global as it will effect the program coding. Quote
*Experts* Bucky Posted January 31, 2004 *Experts* Posted January 31, 2004 You need to overload the constructor of the IMWindow class to accept all those parameters. Make sure that you call InitializeComponent() in the constructor, too. This will go in the IMWindow class (this is just an example, you will obviously have to change the parameter names and types): Public Overloads Sub New(client As Object, profile As Object, _ something As Something, somethingElse As SomethingElse, name As String) InitializeComponent() ' Required ' Then store all the arguments in local variables here End Sub Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
gauravbr Posted February 2, 2004 Author Posted February 2, 2004 Error on Compile hi i tried that but i am getting error it says Sub New() cannot be declared Overloads. and another error stating.. Overload resolution failed because no accessible 'New' accepts this number of arguments. so i am stuck up again can u get me out of this riddle... Quote
*Experts* Bucky Posted February 2, 2004 *Experts* Posted February 2, 2004 Okay, leave out the Overloads keyword then. I also realized that, instead of calling InitializeComponent, you should instead call MyBase.New(). Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.