Jump to content
Xtreme .Net Talk

How to hide the form?


Recommended Posts

Guest slash1020
Posted

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.

Posted

Hello there

 

create a class with a method named . . .

 

Public Shared Sub Main()

 

End Sub

 

After create this class

 

change the Startup Object in the properties off aplication to this class created

 

Create a instance of your form in this class and call him when you need him . . .

 

oks

 

Intehhhhh

 

SKOL Rulez!!!!!!!!!

Guest slash1020
Posted

thank you, Mr.ths

I got a new method

it is set the opacity=0,

then the form is like hide.....

maybe it is not a correct method

Posted

Here is what you do.

 

Public Class frmMain

Inherits System.Windows.Forms.Form

Dim myForm As New frmMain() 'Instatiate my new form object, used to overide default form object

 

 

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

myForm.Hide()

End Sub

 

Protected Overrides Sub Finalize()

MyBase.Finalize()

myForm = Nothing 'Clear the mySettings Object

End Sub

End Class

 

'Please let me know if this works, it worked for me

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...