|
-
Jun 18th, 2003, 09:16 AM
#1
Thread Starter
Member
Communicating b/w forms
Hey there,
Guys I got a question. I'm developing this application in .NET and I want to know how to implement the login part. At startup the menu is disabled, but once the user logs in the menu should be enabled. NOw the problem is with passing the control to 'main.vb'. The 'log in' form appears in the Parent window and if authenticated, the menu in 'main.vb' should be enabled. BUT ... each form is a different class and I can't access variables from another class untill they are inherited .. and they are not. How do I 'inform' the menu that the login was successful and that it should enable the menu?
I hope u people understand what I meant ....
** Praise none, but the CREATOR **
---------------------
T-break SUX
-
Jun 18th, 2003, 09:44 AM
#2
I wonder how many charact
Basically it sounds like you have umpteem forms, all which require authentification to enable ONLY certain parts of the form?
OR
You have a login that once authenticated allows access to every form.... (or just part of the form?)
-
Jun 18th, 2003, 01:51 PM
#3
Thread Starter
Member
Originally posted by nemaroller
You have a login that once authenticated allows access to every form.... (or just part of the form?) [/B]
Exactly ... it grants access to the menu in the Mdi windows, which obviously has links to other forms.
I found a work around ...
In 'main_load' I call the 'log in' form.
The login form has two buttons: 'Sign in' and 'Cancel'
If the user clicks on 'cancel' the applications exits because I have put 'Application.exit()' in login_closed. If he clicks 'Sign in' I cal the necessary functions.
Now the problem is that the login form has the 'x' mark on the login form and the user can click on it to close (bypass) login. How do I disable the 'cross' on the login form ?
If this doesn't work then I got to go figure out another way to do this ... :-/
But do let me know if u got any answers to any of my questions ....
help highly appreciated.
** Praise none, but the CREATOR **
---------------------
T-break SUX
-
Jun 18th, 2003, 03:56 PM
#4
New Member
Hi there,
Two possible options I think..
the first and easiest way is dissable the 'X' button in you login form. Login form properties controlbox set this to false and the 'X' button will be gone
the second way is to put some code in your loginform in the loginform_terminate() routine. This code is executed when the form is close with the 'X' button..
Hope its helpfull,
Twister
-
Jun 18th, 2003, 08:36 PM
#5
Thread Starter
Member
Ah thanks dude !
I knew there was something to this 'controlbox' thing but never tired it out I set it to false and works just fine.
Thanks alot (THUMBS UP)
** Praise none, but the CREATOR **
---------------------
T-break SUX
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
|