|
-
Jul 23rd, 2003, 07:02 PM
#1
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.
-
Jul 23rd, 2003, 07:49 PM
#2
you mean like this : ?
in Form1 :
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim frm2 As New Form2()
Me.AddOwnedForm(frm2)
frm2.Show()
End Sub
in Form2 :
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim frm1 As Form1 = Me.Owner
frm1.TextBox1.Text = "some text from another form!"
'/// send some text back to Form1's TextBox.
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]
-
Jul 23rd, 2003, 07:55 PM
#3
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?
-
Jul 23rd, 2003, 08:10 PM
#4
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]
-
Jul 23rd, 2003, 08:18 PM
#5
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|