HeY All wonder if you can shed some light on this one
I have a parent MDI form called MainApp
contained within this MainApp is a public function which simply gets passed an int ie 1,2,3,4 etc
then i have a case statment like
select case blah(ByVal MyValue)
case 1
Me.MasterBar.Buttons(0).Enabled = True
case 2
Me.MasterBar.Buttons(1).Enabled = False
etc
I am calling this function from a form called frmLogin like this
frmMainApp.DoLogin(IntUserPriv)
the frmMainApp is defined in a module as a public global variable
So basically my app opens the main MDI parent and that has onLoad event for frmLogin when user logs in all the checks and stuff is done in the frmLogin and if everything is cool the function doLogin is called with their user type passed in, i know the user type is being passed ok because stick a msgbox in there to test it however it will not set the buttons to either be enabled or disabled,,,, any ideas ????
Last edited by carlblanchard; Sep 24th, 2003 at 06:59 AM.
I am curretly building a defect management system for software and web developers,
If you wana try it out (beta test) and keep it for free just send me a message
I have a main MDIParent that opens a child onload Login form.
the log in form does what it needs to do then passed a ref back to a public function on the MDIParent
this is the function including test crap so excuse the crap
Public Function DoLogin(ByVal MyValue)
'Function to highlight the required toolbars
Select Case MyValue
Case 0
btnLoginout.Enabled = True
MsgBox("Case found 0")
Case 1
btnLoginout.Enabled = True
MsgBox("Case found 1")
Case 2
btnLoginout.Enabled = True
MsgBox("Case found 2")
Case 3
btnLoginout.Enabled = True
MsgBox("Case found 3")
Case 4
btnLoginout.Enabled = True
MsgBox("Case found 4")
Case 5
btnLoginout.Enabled = True
MsgBox("Case found 5")
Case Else
MsgBox("Sorry cant determin your rights to access this software, Please call tech support on " & strTelephone & "")
End Select
End Function
shed any light on this one ????
I am curretly building a defect management system for software and web developers,
If you wana try it out (beta test) and keep it for free just send me a message
its not the project im working on but its the same problem
I am curretly building a defect management system for software and web developers,
If you wana try it out (beta test) and keep it for free just send me a message
cheers buddy that works in my demo i sent you
however in my actully project it dosnt ?
is there a way to see which from is actully loaded ?
if so how
I am curretly building a defect management system for software and web developers,
If you wana try it out (beta test) and keep it for free just send me a message
my book advised me to stick frm1 = me after InitializeComponent()
in the windows generated code so i commented that out and it worked fine
THANKS loads for your help mate
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'frmMainApp = Me
End Sub
I am curretly building a defect management system for software and web developers,
If you wana try it out (beta test) and keep it for free just send me a message