Results 1 to 2 of 2

Thread: myForm.ShowDialog(ARGUMENTS???)

  1. #1

    Thread Starter
    Registered User
    Join Date
    Jul 2001
    Posts
    283

    myForm.ShowDialog(ARGUMENTS???)

    is there a way to pass arguments in the showDialog function to a user created form?
    also, can that form return a value somehow???

  2. #2
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622
    do you mean something like this????


    VB Code:
    1. 'This goes on your dialog form
    2.  
    3.     Public Overloads Function ShowDialog(ByVal strFormTitle As String) As String
    4.  
    5.         Me.Text = strFormTitle
    6.  
    7.         MyBase.ShowDialog()
    8.  
    9.         Return TextBox1.Text
    10.     End Function
    11.  
    12. 'Place a Textbox named "TextBox1" on the dialog or use an existing control


    VB Code:
    1. 'calling the form
    2.  
    3. Dim as New Form2 ' form2 in my case
    4.  
    5. Msgbox(x.ShowDialog("MyForm"))
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width