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 / August 2006

Tip: Looking for answers? Try searching our database.

.Visible = False not working...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rob R. Ainscough - 10 Aug 2006 00:25 GMT
I can't seem to make my form not visible.  During the Load event I
specifically set Me.Visible = False but the form still displays?

Any suggestions ?
Jared - 10 Aug 2006 01:09 GMT
A setting called "Enable application framework" in project settings should
help you

>I can't seem to make my form not visible.  During the Load event I
>specifically set Me.Visible = False but the form still displays?
>
> Any suggestions ?
Rob R. Ainscough - 10 Aug 2006 17:42 GMT
Can't use that setting as the project is started from Sub Main.

Example:

Module MyStartup

Sub Main()

   Dim myForm as New Form1

   ' Do some pre-processing...(code not shown)

   Application.EnableVisualStyels()
   Application.Run(myForm)

End Sub

End Module

>A setting called "Enable application framework" in project settings should
>help you
[quoted text clipped - 3 lines]
>>
>> Any suggestions ?
Herfried K. Wagner [MVP] - 10 Aug 2006 01:56 GMT
"Rob R. Ainscough" <robains@pacbell.net> schrieb:
>I can't seem to make my form not visible.  During the Load event I
>specifically set Me.Visible = False but the form still displays?

It's too late at this point.  The 'Load' event is called directly prior to
making the form visible, regardless of the value of the 'Visible' property.
Don't call the form's 'Show'/'ShowDialog' method in order to prevent it from
getting visible.

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>

Rob R. Ainscough - 10 Aug 2006 21:59 GMT
How about using the Activated event to set Visible ?

> "Rob R. Ainscough" <robains@pacbell.net> schrieb:
>>I can't seem to make my form not visible.  During the Load event I
[quoted text clipped - 4 lines]
> property. Don't call the form's 'Show'/'ShowDialog' method in order to
> prevent it from getting visible.
Herfried K. Wagner [MVP] - 10 Aug 2006 23:06 GMT
"Rob R. Ainscough" <robains@pacbell.net> schrieb:
> How about using the Activated event to set Visible ?

I suggest to describe the scenario in more detail.  Maybe there is even a
better solution, for example, performing the tests on instantiaton instead
of performing it when the form is intended to get visible.

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>

Rob R. Ainscough - 10 Aug 2006 23:58 GMT
I could, but I'd have to change a lot of code, not sure I want to do that.
The Activated event is working well enough.

Thanks, Rob.

> "Rob R. Ainscough" <robains@pacbell.net> schrieb:
>> How about using the Activated event to set Visible ?
>
> I suggest to describe the scenario in more detail.  Maybe there is even a
> better solution, for example, performing the tests on instantiaton instead
> of performing it when the form is intended to get visible.

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.