Need help ASAP!
Thank you for your help in advance!
|| 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...)
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
>.
>
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
>.
>
Well, I guess the easiest way is to switch that Timer off!
Timer.Enabled = False
Dim frmLogin ...
Regards,
Fergus
>.
>
>.
>
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>
>.
>
|| Do you have an answer?
I <do> have a need to sleep occasionally!! ;-)
Regards,
Fergus
|| 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
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
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 = ""
>.
>
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.
==================================================
Thanks,
Joshua Kendall
That's the difficulty of having two threads for the same problem. :-(
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.