473,411 Members | 2,059 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Loading forms

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!
Nov 20 '05 #1
17 1283
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...)
Nov 20 '05 #2
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.CenterScree n
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
-----Original Message-----
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...)
.

Nov 20 '05 #3
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
Nov 20 '05 #4
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.
-----Original Message-----
Hi Joshua,

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

Regards,
Fergus
.

Nov 20 '05 #5
Hi Joshua,

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

Timer.Enabled = False
Dim frmLogin ...

Regards,
Fergus
Nov 20 '05 #6
Also I need to know what to type in to declare a
password. You know something like "password = password"
-----Original Message-----
Hi Joshua,

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

Regards,
Fergus
.

Nov 20 '05 #7
It wouldn't load my next form, and I have another
question that was accidentally posted above this one as
anonymous.
-----Original Message-----
Hi Joshua,

Well, I guess the easiest way is to switch that Timer off!
Timer.Enabled = False
Dim frmLogin ...

Regards,
Fergus
.

Nov 20 '05 #8
* "Joshua Kendall" <jo****@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>
Nov 20 '05 #9
Do you have an answer?
-----Original Message-----
It wouldn't load my next form, and I have another
question that was accidentally posted above this one as
anonymous.
-----Original Message-----
Hi Joshua,

Well, I guess the easiest way is to switch that

Timer off!

Timer.Enabled = False
Dim frmLogin ...

Regards,
Fergus
.

.

Nov 20 '05 #10
Hi Joshua,

|| Do you have an answer?

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

Regards,
Fergus
Nov 20 '05 #11
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
Nov 20 '05 #12
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
Nov 20 '05 #13
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 = ""

-----Original Message-----
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 validatepasswords? Or do you mean a database password?

In the former case you'll need a TextBox with PasswordChar set tosome 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
.

Nov 20 '05 #14
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.
==================================================
Nov 20 '05 #15
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
Nov 20 '05 #16
Hi Joshua,

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

Regards,
Fergus

--
(Please ignore this - there's a feud going on)
==================================================
Quote of the day
Herfried:
I don't need/want human interaction.
==================================================
Nov 20 '05 #17
* "Joshua Kendall" <jo****@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.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Matthew | last post by:
I am not the most talented programmer to grace the earth by a long shot. But I've got a gripe I need to air about the .NET implementaion of Visual Basic. I can live with alot of the major changes...
1
by: Joe | last post by:
Hi Does anyone know of any issues about loading config files for windows forms applications? I have an application that utilizes a config file that holds my database connection string as well...
1
by: Bill K | last post by:
I am developing a winforms project in vb.net. I have several forms that have a number of controls, grids, etc. When I load these as MDI child forms, they load slowly AND they paint/repaint on the...
4
by: Bill Stock | last post by:
The few times in the past that I've loaded unbound data, I've tended to cheat and use temp tables (not really unbound) or use code for small datasets. I'm currently involved in a project that...
0
by: RK | last post by:
Hello I am using Microsoft Development Environment 2003 Version 7.1.3088 & Framework 1.1.4322 and developing Windows Forms using Visual C#. It was working fine for quite a month. Currently...
2
by: Patrick Olurotimi Ige | last post by:
Is it possible to execute a query or do some validation before loading a page.. I have a survey page and i want to validate users before loading the page. I have done it in the page_load. But...
2
by: Rob | last post by:
I was working on a project and everything was going fine, then all of a sudden the form set as my startup object stopped loading. I tried setting some others as the startup object, and some of my...
1
by: RAJ | last post by:
Hi, I am working on a source code written earlier in VB.net.While loading some forms(already created with some controls on it), I am getting the following error:...
3
by: B. Cavour | last post by:
Ok, I'm a C# newbie. W/o making any changes to forms themselves, I used to be able to click on a form and it would open. Now for some forms I'm getting an error saying "An error occurred while...
6
by: A.Weinman | last post by:
Hello all, I have an application that has multiple forms, only 3 of which matter for this issue. There is a main form that starts invisible and does nothing more than start other forms and link...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.