This is driving me insane, because it should be SO EASY!! I just keep thinking of VB 6.0 and that way how to do it.
SIMPLE question here, HOW do i gain access to all of a certain forms controls and properties in a module?
E.G -
Yes I know this is not going to work on it's own because I have to reference the form's objects and all, but I've tried heaps of stuff and I can't get it to work. Thats basically the layout there, please give me a hand in getting access to all the form objects so if the button was clicked, it's text would eb modified in run time.
Seems so easy but it's seriously driving me insane.
SIMPLE question here, HOW do i gain access to all of a certain forms controls and properties in a module?
E.G -
VB.NET:
[SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]Public[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] Button6_Click([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] sender [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Object, [/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] [/SIZE]
[SIZE=2]System.EventArgs) [/SIZE][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=2] Button6.Click[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2] Call ChangeButton6()[/SIZE]
[COLOR=#0000ff] End[/COLOR][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE]
[COLOR=#0000ff][/COLOR]
[SIZE=2][SIZE=2][COLOR=#0000ff]Module[/COLOR][/SIZE][SIZE=2] ChangeObject[/SIZE]
[SIZE=2]
[/SIZE][SIZE=2][COLOR=#0000ff] Sub[/COLOR][/SIZE][SIZE=2] ChangeButton6()
button6.text = "My text is changed!"
[COLOR=#0000ff]End[/COLOR][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE]
[COLOR=#0000ff][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]
End[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]Module[/COLOR][/SIZE][/SIZE]
Yes I know this is not going to work on it's own because I have to reference the form's objects and all, but I've tried heaps of stuff and I can't get it to work. Thats basically the layout there, please give me a hand in getting access to all the form objects so if the button was clicked, it's text would eb modified in run time.
Seems so easy but it's seriously driving me insane.