|
-
Nov 4th, 2002, 11:54 PM
#1
Thread Starter
Junior Member
How to hide the form?
I want to Hide the form when the application start.
I write :
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Hide()
End Sub
But when the application start, I still see the form.
The form doesn't hide.......
How could I do?
Thanks.
-
Nov 5th, 2002, 12:07 AM
#2
I had the same problem before and I couldnt solve it. One easy way that you could get it to work is to set the opacity of the form to zero, it works perfect but it may not be the "correct" way to do this.
I also tried to load a form in a module and and make it invisible, I dont remember if that one worked or not, but you can try the opacity thingie
good luck
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Nov 5th, 2002, 12:56 AM
#3
Hyperactive Member
In the form's constructor, you could set the visible property to false.
Code:
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
me.visible = false
End Sub
...
...
...
-
Nov 5th, 2002, 01:10 AM
#4
Doesnt work
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Nov 5th, 2002, 02:05 AM
#5
Hyperactive Member
I have an idea, run your program from Sub Main rather than from a form! Then, you can show your form whenever you want.
Just go into project propreties, and set the startup object to Sub Main. Then, make a 'loader' class like the one listed.
Code:
Public Class Loader
Public Shared Sub Main()
'Do whatever you need to do in here
End Sub
End Module
Remember, if you want to keep your application running after Sub Main terminates, call System.Windows.Forms.Application.Run().
-
Nov 5th, 2002, 02:48 AM
#6
-
Nov 6th, 2002, 06:12 AM
#7
Thread Starter
Junior Member
Thanks everyone!
I think the opacity=0 is a good method.....
thanks everybody
especially Mr.MrPolite
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
|