Jay1b Posted September 10, 2003 Posted September 10, 2003 In other i have written a module called 'Logout', now to call 'Logout', you type, logout (string, integer) and it passes the string and integer into the module from whatever module was calling it. Can i do the same with form, just as? newform.showdialog(integer) If so could you please tell me how? Quote
Administrators PlausiblyDamp Posted September 10, 2003 Administrators Posted September 10, 2003 You could provide your own .ShowDialog Method in your own form and accept a parameter - then just call the real ShowDialog in your form add something like Public Overloads Sub ShowDialog(ByVal i As Integer) 'Do something with i here ShowDialog() End Sub Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
*Experts* Volte Posted September 10, 2003 *Experts* Posted September 10, 2003 You'll need to either change the constructor, or make a new ShowDialog function:'in the Form Public Sub New(ByVal param As Integer) 'store "param" in a private member for later use MyBase.New End Sub 'when you create it: Dim newform As New Form1(55)OR'in the form: Public Overloads Sub ShowDialog(ByVal param As Integer) MyBase.ShowDialog() 'store param for later user End Sub 'when you show it: newform.ShowDialog(55) Quote
Jay1b Posted September 10, 2003 Author Posted September 10, 2003 Excellent Thank you Excellent Thank you Quote
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.