|
-
May 9th, 2003, 11:03 AM
#1
Thread Starter
Hyperactive Member
2 forms, onClose event...
I have 2 forms, on the close event of the second form, i am trying to make it set the lable on form one blank...
i have tried...
dim form1 as new form1()
form1.label.text = "" but when i close the form it doesn't clear out the lable, is this because this is another instance of the form? if i take out the NEW in the dim statement then i get the error, there is no instance of the object...etc...
any idea?
-
May 9th, 2003, 11:17 AM
#2
Frenzied Member
again the story of passing data between forms. Search this forum for data across two forms or something like that, you will find the answer.
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
-
May 9th, 2003, 01:00 PM
#3
Member
Hello, I agree there are prolly hunerds of links for this but, here goes
on form 1:
Public Shared newtitle As String
Private Sub Form1_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated
Me.Text = newtitle
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim frm_form2 As New Form2()
frm_form2.Show()
End Sub
on form 2:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form1.newtitle = Me.TextBox1.Text
Me.Close()
End Sub
Hope that helps
tal McMahon
its called the "F1" key-- use it
-
May 10th, 2003, 02:40 PM
#4
Thread Starter
Hyperactive Member
Sorry
Sorry, I didn't realize it was called "passing data between forms" because I'm not actually passing data as in a variable, just calling something.. i appologize
-
May 12th, 2003, 07:55 AM
#5
Member
No need for an apology, Par for the course with .nets help. lots of answers....but whats the damn question to ask...
tal mcmahon
its called the "F1" key-- use it
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
|