Now before anyone says anything, i have searched the other posts on this site but i still can't get what i'm trying to do to work, so i have to post my particular problem!
I cannot get a variable i have set in frmLoginScreen to pass through to my mdi form. I have tried the following methods -
Get/set
in frmLoginscreen where the variable intRoleID is set. (It is public)
In the mdi...
[/size]
I have also tried referencinghe form and the variable i.e. frmLoginscreen.intRoleid = etc, but this doesn't wotk and i dont belive this is the way it should be done in .net.
I have also played with the constructor in frmLoginScreen for the mdi, but am not sure of how to pass the variable through
Any help is extemlely appreciated,
Kind Regards,
Alex[/size]
I cannot get a variable i have set in frmLoginScreen to pass through to my mdi form. I have tried the following methods -
Get/set
in frmLoginscreen where the variable intRoleID is set. (It is public)
VB.NET:
[size=2][/size][size=2][color=#0000ff]Public[/color][/size][size=2] [/size][size=2][color=#0000ff]Property[/color][/size][size=2] RoleID() [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]Integer
[/color][/size][size=2][/size][size=2][color=#0000ff]Get
[/color][/size][size=2][/size][size=2][color=#0000ff]Return[/color][/size][size=2] intRoleID
[/size][size=2][color=#0000ff]End[/color][/size][size=2] [/size][size=2][color=#0000ff]Get
[/color][/size][size=2][/size][size=2][color=#0000ff]Set[/color][/size][size=2]([/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] value [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]Integer[/color][/size][size=2])
intRoleID = value
[/size][size=2][color=#0000ff]End[/color][/size][size=2] [/size][size=2][color=#0000ff]Set
[/color][/size][size=2][/size][size=2][color=#0000ff]End[/color][/size][size=2] [/size][size=2][color=#0000ff]Property
End[/color][/size][size=2] [/size][size=2][color=#0000ff]Class
[/color][/size]
In the mdi...
VB.NET:
[size=2][color=#0000ff]Public[/color][/size][size=2] login [/size][size=2][color=#0000ff]As[/color][/size][size=2] frmLoginScreen()[/size]
[size=2][/size]
[size=2][size=2][/size][size=2][color=#0000ff]Dim[/color][/size][size=2] intRoleID [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]Integer[/color][/size]
[size=2][color=#0000ff]Dim[/color][/size][size=2] alex = [/size][size=2][color=#0000ff]New[/color][/size][size=2] frmLoginScreen[/size]
[size=2]alex.RoeID = intRoleID[/size]
[size=2][/size]
[size=2]
I have also tried referencinghe form and the variable i.e. frmLoginscreen.intRoleid = etc, but this doesn't wotk and i dont belive this is the way it should be done in .net.
I have also played with the constructor in frmLoginScreen for the mdi, but am not sure of how to pass the variable through
VB.NET:
[size=2][/size][size=2][color=#0000ff]Dim[/color][/size][size=2] mdiMTSM [/size][size=2][color=#0000ff]As[/color][/size][size=2] mdiMTSM = [/size][size=2][color=#0000ff]New[/color][/size][size=2] mdiMTSM
mdiMTSM.ShowDialog()
[/size]
Any help is extemlely appreciated,
Kind Regards,
Alex[/size]