Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Loading forms

1 view
Skip to first unread message

Joshua Kendall

unread,
Nov 8, 2003, 12:53:59 PM11/8/03
to
I have a splash screen that is set to a timer. When the
timer reaches it's Interval of 1000, I want it to load
the next form in my project. My brother knows VB6 from
school but can't figure out whats wrong with my code.

Need help ASAP!
Thank you for your help in advance!

Fergus Cooney

unread,
Nov 8, 2003, 1:03:40 PM11/8/03
to
Hi Joshua,

|| can't figure out whats wrong with my code.

Nor can we.

|| Need help ASAP!

Need code to look at ASAP!

;-)

Regards,
Fergus

(But it won't be me.. I'm off...)


Joshua Kendall

unread,
Nov 8, 2003, 1:27:10 PM11/8/03
to
Heres my code:

Public Class Splash
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

End Sub

'Form overrides dispose to clean up the component
list.
Protected Overloads Overrides Sub Dispose(ByVal
disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the
Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents SplashIMG As
System.Windows.Forms.PictureBox
Friend WithEvents SplashTimer As
System.Windows.Forms.Timer
<System.Diagnostics.DebuggerStepThrough()> Private
Sub InitializeComponent()
Me.components = New
System.ComponentModel.Container()
Dim resources As System.Resources.ResourceManager
= New System.Resources.ResourceManager(GetType(Splash))
Me.SplashIMG = New System.Windows.Forms.PictureBox
()
Me.SplashTimer = New System.Windows.Forms.Timer
(Me.components)
Me.SuspendLayout()
'
'SplashIMG
'
Me.SplashIMG.Image = CType(resources.GetObject
("SplashIMG.Image"), System.Drawing.Bitmap)
Me.SplashIMG.Name = "SplashIMG"
Me.SplashIMG.Size = New System.Drawing.Size(600,
300)
Me.SplashIMG.TabIndex = 0
Me.SplashIMG.TabStop = False
'
'SplashTimer
'
Me.SplashTimer.Enabled = True
Me.SplashTimer.Interval = 1000
'
'Splash
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5,
13)
Me.ClientSize = New System.Drawing.Size(600, 300)
Me.Controls.AddRange(New
System.Windows.Forms.Control() {Me.SplashIMG})
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.None
Me.Name = "Splash"
Me.ShowInTaskbar = False
Me.StartPosition =
System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "KS.IntraNet"
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub SplashIMG_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
SplashIMG.Click

End Sub

Private Sub Timer1_Tick(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
SplashTimer.Tick
Load frmLogin
End Sub
End Class

>.
>

Fergus Cooney

unread,
Nov 8, 2003, 1:32:50 PM11/8/03
to
Hi Joshua,

I wasn't off as soon as I thought. But I got your second
posting and answered there. So now we can bounce back
and forth between these two threads as you add more
questions, lol ;-)

Regards,
Fergus


Joshua Kendall

unread,
Nov 8, 2003, 1:49:48 PM11/8/03
to
Thanks that worked like a charm, Now how do I get it to
only open one instance of the second form. It kept
opening forms until I stopped debugging.

>.
>

Fergus Cooney

unread,
Nov 8, 2003, 1:53:00 PM11/8/03
to
Hi Joshua,

Well, I guess the easiest way is to switch that Timer off!

Timer.Enabled = False
Dim frmLogin ...

Regards,
Fergus


anon...@discussions.microsoft.com

unread,
Nov 8, 2003, 1:58:38 PM11/8/03
to
Also I need to know what to type in to declare a
password. You know something like "password = password"

>.
>

joshua kendall

unread,
Nov 8, 2003, 2:08:12 PM11/8/03
to
It wouldn't load my next form, and I have another
question that was accidentally posted above this one as
anonymous.

>.
>

Herfried K. Wagner [MVP]

unread,
Nov 8, 2003, 2:22:30 PM11/8/03
to
* "Joshua Kendall" <jos...@goartic.com> scripsit:

> I have a splash screen that is set to a timer. When the
> timer reaches it's Interval of 1000, I want it to load
> the next form in my project. My brother knows VB6 from
> school but can't figure out whats wrong with my code.

Set your project's startup object to 'Sub Main' (in the project
properties) and add this class:

\\\
Public Class Main
Public Shared Sub Main()
Call (New SplashForm()).Show()
Application.Run()
End Sub
End Class
///

In the splash for you close the splash screen and instantiate the new
form like this:

\\\
Me.Close()
Call (New MainForm().Show()
///

You can exit the application by calling 'Application.ExitThread'.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Joshua Kendall

unread,
Nov 8, 2003, 2:55:44 PM11/8/03
to
Do you have an answer?

>.
>

Fergus Cooney

unread,
Nov 8, 2003, 7:40:55 PM11/8/03
to
Hi Joshua,

|| Do you have an answer?

I <do> have a need to sleep occasionally!! ;-)

Regards,
Fergus


Fergus Cooney

unread,
Nov 8, 2003, 7:47:18 PM11/8/03
to
Hi Joshua,

|| Also I need to know what to type in to declare a password.
||
|| You know something like "password = password"

Hmm, no I don't 'know something like "password = password"'.

If I were being unhelpful I would say that a password is just a string.

Do you mean how do you write a routine to accept and validate
passwords? Or do you mean a database password?

In the former case you'll need a TextBox with PasswordChar set to
some character, eg "*"c. You'll need somewhere to store your passwords.
And you'll need a way to look up the password that the User has entered.

Regards,
Fergus


Fergus Cooney

unread,
Nov 8, 2003, 7:49:35 PM11/8/03
to
Hi Joshua,

First you were getting too many second forms and now
you are getting none? Or are you now trying to get a third?

Have you noticed how often I answer a question with a
question? It's because you don't write enough. It's hard to
give accurate answers when we are guessing what you are
trying to do! ;-)

Regards,
Fergus


Joshua Kendall

unread,
Nov 9, 2003, 8:30:27 AM11/9/03
to
What do I type to place a password in my code (see
below)? Where do I put it? This is basically what I was
asking.

Me.PassINP.Location = New System.Drawing.Point(56, 32)
Me.PassINP.Name = "PassINP"
Me.PassINP.PasswordChar =
Microsoft.VisualBasic.ChrW(42)
Me.PassINP.Size = New System.Drawing.Size(120, 20)
Me.PassINP.TabIndex = 2
Me.PassINP.Text = ""

>.
>

Fergus Cooney

unread,
Nov 9, 2003, 9:09:32 AM11/9/03
to
Hi Joshua,

The password TextBox is going to go on a Form somewhere. You don't
need to create it in code necessarily - you can simply drag it onto the
form in the Designer and set the properties from there.

What Form, and when, is up to you, of course, but I'd guess you'd do it at
the start or when the User enters their name or something. When they hit the
[Go 4 It!] button, you'd take that password and check whether it's valid. If
not, you show the red flag and they get to try again.

Regards,
Fergus

--
(Please ignore this - there's a feud going on)
==================================================
Quote of the day
Herfried:
I don't need/want human interaction.
==================================================


Joshua Kendall

unread,
Nov 9, 2003, 9:24:41 AM11/9/03
to
That doesn't answer my question! I need to specify what
the password is. I need to have the password = password1
and then the form verifies it and sends them on their
merry way.

Thanks,

Joshua Kendall

Fergus Cooney

unread,
Nov 9, 2003, 9:42:40 AM11/9/03
to
Hi Joshua,

That's the difficulty of having two threads for the same problem. :-(

Herfried K. Wagner [MVP]

unread,
Nov 9, 2003, 9:56:15 AM11/9/03
to
* "Joshua Kendall" <jos...@goartic.com> scripsit:
> What do I type to place a password in my code (see
> below)? Where do I put it? This is basically what I was
> asking.
>
> Me.PassINP.Location = New System.Drawing.Point(56, 32)
> Me.PassINP.Name = "PassINP"
> Me.PassINP.PasswordChar =
> Microsoft.VisualBasic.ChrW(42)
> Me.PassINP.Size = New System.Drawing.Size(120, 20)
> Me.PassINP.TabIndex = 2
> Me.PassINP.Text = ""

I would not put the password into the source code. Users may use tools
in oeder to read the password from the code. It's better to store the
password somewhere in encrypted format, for example in a database, and
then perform the comparison. Sometimes the password isn't even stored,
instead only a hash value is stored. Later the hash value of the
password entered by the user is compared to the hash of the password.

0 new messages