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 / Languages / VB.NET / October 2004

Tip: Looking for answers? Try searching our database.

vb-> form1.show

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hareth - 24 Oct 2004 13:29 GMT
VS2003

if i say

dim form1 as new form1
form1.show()

It opens a new form everytime...

But....what if....
"form1" opened.....
then I told it to hide, using me.hide()....
how would i show it again?
Wouldnt "as new" open a new form1? instead of showing the one thats hidden?

If i write:

form1.show()

that generates errors (refrence to a non-shared member requires an object
refrence)...

So how would i show a hidden form
OpticTygre - 24 Oct 2004 13:40 GMT
> VS2003
>
[quoted text clipped - 4 lines]
>
> It opens a new form everytime...

Of course it does.  You're initializing a 'new' object every time.

> But....what if....
> "form1" opened.....
[quoted text clipped - 11 lines]
>
> So how would i show a hidden form

in Form1, add the following

Public Shared myForm as Form1

Then, in the Form1_Load event:
myForm = Me

In other forms, you can access that instance of form1 by calling:
Form1.myForm.<whatever>

HTH,

-Jason
Hareth - 24 Oct 2004 14:10 GMT
Xlnt!!!!.....

>> VS2003
>>
[quoted text clipped - 36 lines]
>
> -Jason

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.