Results 1 to 5 of 5

Thread: Communicating b/w forms

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2002
    Location
    \root
    Posts
    32

    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

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    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?)

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2002
    Location
    \root
    Posts
    32
    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

  4. #4
    New Member
    Join Date
    Jun 2003
    Posts
    1
    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

  5. #5

    Thread Starter
    Member
    Join Date
    Oct 2002
    Location
    \root
    Posts
    32
    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
  •  



Click Here to Expand Forum to Full Width