Working With Forms in vb.net

M

Miku

Hi guies

I am a biginner in vb.net but i have worked in vb 6.0.

I am facing problem in displaying and closing form.

In my project I have
(1) one base Module basMain, also startup of my application.
(2) frmBackground
(3) frmLogin
(4) frmMain

I want to do the following :

Application will start from basMain & basMain will Display
frmBackground.
From frmBackground I want to show frmLogin. and if VAlid Username &
password then I want to close frmBackground & frmLogin and want to
Display frmMain & application should be continue & working.

I have tried in vb 6.0 style but i am getting problem my application
ends.

Pl. help me out.

Thank you.
-Miku
 
C

Cor

Hi Miku,

I see all old VB6 people who in this group use the method as you tell.

I do just make a form1 as a main form and do everything from it

As sample the code below the form 2 is something more code than needed, but
this looks nice.

But I am almost sure that you will get today samples with an
applicationstart in a startmodule also, because for that are almost always
about 4 the basicly the same solutions provided.

I hope this gives you than an alternative idea?

Cor

\\\\form1
Private Sub Form1_Load(ByVal sender _
As Object, ByVal e As System.EventArgs) _
Handles MyBase.Load
Dim frm As New Form2
frm.ShowDialog()
frm.Dispose()
End Sub
///
\\splash screen form2
ByVal e As System.EventArgs) Handles MyBase.Load
Label1.Text = "High I Am Here"
timer1.Enabled = True
timer1.Interval = 25
Me.Opacity = 0
Me.Text = "Splash"
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles timer1.Tick
Me.Opacity += 0.01
If Me.Opacity = 1 Then
Me.Close()
End If
End Sub
////
 
H

Herfried K. Wagner [MVP]

* (e-mail address removed) (Miku) scripsit:
I am a biginner in vb.net but i have worked in vb 6.0.

I am facing problem in displaying and closing form.

In my project I have
(1) one base Module basMain, also startup of my application.
(2) frmBackground
(3) frmLogin
(4) frmMain

I want to do the following :

Application will start from basMain & basMain will Display
frmBackground.
From frmBackground I want to show frmLogin. and if VAlid Username &
password then I want to close frmBackground & frmLogin and want to
Display frmMain & application should be continue & working.

I have tried in vb 6.0 style but i am getting problem my application
ends.

"Post your code."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Opening & Closing Forms 9
Disposing of a log in window 2
Windows Forms 4
RaiseEvent not firing... 10
Working with Graphics in VB.NET???? 2
DataGridView in Vb.NET 2
MdiChild Forms in VB.Net 1
vb.net forms error 1

Top