Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
I was wondering if it is possible to change the properties of something on one form, from a button on another form. For example: if I click bnt1 on form2, it will make txtbox1.enabled = true.
Posted

thank you for the thread, but in there code which is this:

 

 Public Class Form1
 Inherits System.Windows.Forms.Form

 ' Windows Forms Designer generated code region

 Private otherForm As New Form2()

 Private Sub Button1_Click(ByVal sender As System.Object, _ 
   ByVal e As System.EventArgs) Handles Button1.Click

   otherForm.Text = "Foo"
   otherForm.Show()
 End Sub

End Class

they change the text of form2.... where I want to change a label's text on form2. I tried the following code

 

otherform.label1.text = "Hello"

 

when I used that, I didn;t get any errors, but it didn't work... does anyone have an idea as to why.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...