Results 1 to 5 of 5

Thread: pop-up boxes belonging to the same form [RESOLVED]

  1. #1

    Thread Starter
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    pop-up boxes belonging to the same form [RESOLVED]

    I have a child form, basic I want a find and replace message boxes to pop up. I created them as forms but it may be more trouble to swap variables and stuff from the 2 forms, so my question is... can you make a form that, when it calls the find form, it says "this belongs to me" so the variables between both are pretty much local to each other but not to any other forms?
    Last edited by Kasracer; Jul 23rd, 2003 at 08:18 PM.

  2. #2
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    you mean like this : ?
    in Form1 :
    VB Code:
    1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    2.         Dim frm2 As New Form2()
    3.         Me.AddOwnedForm(frm2)
    4.         frm2.Show()
    5.     End Sub
    in Form2 :
    VB Code:
    1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    2.         Dim frm1 As Form1 = Me.Owner
    3.         frm1.TextBox1.Text = "some text from another form!"
    4.         '/// send some text back to Form1's TextBox.
    5.     End Sub
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  3. #3

    Thread Starter
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Ok thanks! 1 More question though.. how would I make it so the find box would not allow me to click on anything else within the program until it's closed?

  4. #4
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    VB Code:
    1. frm2.ShowDialog()

    if you use ShowDialog , it prevents other forms being clicked , so if you made a find form that might help.
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  5. #5

    Thread Starter
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Thanks alot!

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