Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / June 2006

Tip: Looking for answers? Try searching our database.

Activating/Deactivating Menus on the Other Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wahyu_DianPurnomo - 26 Jun 2006 05:07 GMT
Dear all,
I create a main form that has menu to open login form. The main form has
menus disabled at first load (except menu to open login form). When the login
form pops up, user can give his/her credential to connect to database and
activate appropriate menus based-on his/her level.

I have written this code under cmdConnect_Click:
01 Dim frmLogin as New Login
02 frmLogin.ActivateMenu(UserLevel)
03 frmLogin.Show
04 Me.Close
-->Results in a new main form pops up.
In I omit the New keyword at line 01, then an error will occured said that
"Object Reference not set to an instance."
Pls advice. Thank's
Stoitcho Goutsev (100) - 26 Jun 2006 15:26 GMT
Hi,

What is the problem and what is the question?

If you omit New you'll get this exception because you are trying to call
methods via reference that is not initialized. This is exactly what is
expected to be.

Signature

Stoitcho Goutsev (100)

> Dear all,
> I create a main form that has menu to open login form. The main form has
[quoted text clipped - 12 lines]
> "Object Reference not set to an instance."
> Pls advice. Thank's

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.