473,770 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

splash screen help please!

Hi,

I have created an application which uses a SQL server database. I created a
mainform which retreives all the customers. This takes about 3sec. I have
created a splash screen too. I use a module to open the splash screen and
then the mainform.

The splash screen opens up, mainfrom load, but still it takes 3sec for the
data to show up. What i want is while the mainform loads, i want to show the
splash screen.

Any suggestions.

senthilkumar

Nov 21 '05 #1
11 1613
Senthil,

Just this in the load sub of form1 is the shortest way of showing a handling
a splash screen I can think about. In this is not any error handling done,
so it will never be real just a here in this message types sample snippet.

\\\
dim frm2 as form2
frm2.show
datatadapter.fi ll(mydataset)
frm2.close
///

I hope this helps?

Cor
"K E Senthil Kumar" <ke****@yahoo.c o.in> schreef in bericht
news:ut******** ******@TK2MSFTN GP14.phx.gbl...
Hi,

I have created an application which uses a SQL server database. I created
a
mainform which retreives all the customers. This takes about 3sec. I have
created a splash screen too. I use a module to open the splash screen and
then the mainform.

The splash screen opens up, mainfrom load, but still it takes 3sec for the
data to show up. What i want is while the mainform loads, i want to show
the
splash screen.

Any suggestions.

senthilkumar

Nov 21 '05 #2
"K E Senthil Kumar" <ke****@yahoo.c o.in> schrieb:
The splash screen opens up, mainfrom load, but still it
takes 3sec for the data to show up. What i want is while
the mainform loads, i want to show the splash screen.


http://groups.google.com/groups?selm...40TK2MSFTNGP09

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #3
Herfried,

In this message is written "Should be" I disagree that very much, there are
hundreds of other methods which will give the same result with less work.
(Not denying that there are situation where a threaded form can help).

The method I showed is as well for dataaccess in the resource kit in a more
extended format. Therefore my question why you show such a difficult method
that "should" be used for a splash screen that normally would show so short,
that id does not give the time to read what is written on it before it is
closes again.

Cor

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at>
"K E Senthil Kumar" <ke****@yahoo.c o.in> schrieb:
The splash screen opens up, mainfrom load, but still it
takes 3sec for the data to show up. What i want is while
the mainform loads, i want to show the splash screen.


http://groups.google.com/groups?selm...40TK2MSFTNGP09

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #4
"Cor Ligthert" <no************ @planet.nl> schrieb:
\\\
dim frm2 as form2
frm2.show
datatadapter.fi ll(mydataset)
frm2.close
///


Notice that the user will be able to click the main form and thus send the
splash screen to back, if the form is already visible, or the main form
won't be visible at all until the splash screen closes and loading is done.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #5
Herfried,
"Cor Ligthert" <no************ @planet.nl> schrieb:
\\\
dim frm2 as form2
frm2.show
datatadapter.fi ll(mydataset)
frm2.close
///


Notice that the user will be able to click the main form and thus send the
splash screen to back, if the form is already visible, or the main form
won't be visible at all until the splash screen closes and loading is
done.

And what can be the problem than, (Think about it its loading of a dataset
or other dataclasses while the form is 3 seconds open, you can reach in that
time the close button of course, however most users don't).

Cor
Nov 21 '05 #6
Senthil

I see a typo
dim frm2 as form2

dim frm2 as new form2

Cor
Nov 21 '05 #7
Hi All,

Thanks for your replies. I found a solution to my problem:
Create this sub and add it in the form load event. but before loading the
dataset. We can increase the value of 3000 to more if it takes long for the
dataset to fill.

imports system.threadin g

Private Sub LoadSplash()
Dim m_frmSplash As New frmSplash
m_frmSplash.Sho w()
Application.DoE vents()
Thread.Sleep(30 00)
m_frmSplash.Clo se()
End Sub

Senthil Kumar

"K E Senthil Kumar" <ke****@yahoo.c o.in> wrote in message
news:ut******** ******@TK2MSFTN GP14.phx.gbl...
Hi,

I have created an application which uses a SQL server database. I created
a
mainform which retreives all the customers. This takes about 3sec. I have
created a splash screen too. I use a module to open the splash screen and
then the mainform.

The splash screen opens up, mainfrom load, but still it takes 3sec for the
data to show up. What i want is while the mainform loads, i want to show
the
splash screen.

Any suggestions.

senthilkumar

Nov 21 '05 #8
Senthil,

Do you look to the answers in this newsgroup.

That threading.threa d.sleep with doEvents sample as you use it, is real a
very bad implementation to keep the program active and show the form.

You use now exactly the same sample as I gave you, only with one application
do events in it and let the program sleep 3 seconds even when the wait time
is half a second. How you synchronize that with the reading is a riddle.

I think it has no sense to give you the right implementation with
threading.sleep and doevents, because it seems you do not read this messages
anyway.

Cor

"K E Senthil Kumar"
...
Hi All,

Thanks for your replies. I found a solution to my problem:
Create this sub and add it in the form load event. but before loading the
dataset. We can increase the value of 3000 to more if it takes long for
the dataset to fill.

imports system.threadin g

Private Sub LoadSplash()
Dim m_frmSplash As New frmSplash
m_frmSplash.Sho w()
Application.DoE vents()
Thread.Sleep(30 00)
m_frmSplash.Clo se()
End Sub

Senthil Kumar

"K E Senthil Kumar" <ke****@yahoo.c o.in> wrote in message
news:ut******** ******@TK2MSFTN GP14.phx.gbl...
Hi,

I have created an application which uses a SQL server database. I created
a
mainform which retreives all the customers. This takes about 3sec. I have
created a splash screen too. I use a module to open the splash screen and
then the mainform.

The splash screen opens up, mainfrom load, but still it takes 3sec for
the
data to show up. What i want is while the mainform loads, i want to show
the
splash screen.

Any suggestions.

senthilkumar


Nov 21 '05 #9
Hi Cor,

Not to offend, but i do read the answers. But the code you mentioned, doesnt
solve the problem, still the same behavious was seen. So i found another
example of a splash screen wherein this code was given.

To be honest with you, i am new to .net , dont know about threading, etc.
Since it really didnt do anything disatrous, i kind of let it go.

About the timing, i increased the value 3000 up and and down and thats the
setting it works,

Thanks all for your comments.

senthil kumar
"Cor Ligthert" <no************ @planet.nl> wrote in message
news:um******** ******@TK2MSFTN GP15.phx.gbl...
Senthil,

Do you look to the answers in this newsgroup.

That threading.threa d.sleep with doEvents sample as you use it, is real a
very bad implementation to keep the program active and show the form.

You use now exactly the same sample as I gave you, only with one
application do events in it and let the program sleep 3 seconds even when
the wait time is half a second. How you synchronize that with the reading
is a riddle.

I think it has no sense to give you the right implementation with
threading.sleep and doevents, because it seems you do not read this
messages anyway.

Cor

"K E Senthil Kumar"
..
Hi All,

Thanks for your replies. I found a solution to my problem:
Create this sub and add it in the form load event. but before loading the
dataset. We can increase the value of 3000 to more if it takes long for
the dataset to fill.

imports system.threadin g

Private Sub LoadSplash()
Dim m_frmSplash As New frmSplash
m_frmSplash.Sho w()
Application.DoE vents()
Thread.Sleep(30 00)
m_frmSplash.Clo se()
End Sub

Senthil Kumar

"K E Senthil Kumar" <ke****@yahoo.c o.in> wrote in message
news:ut******** ******@TK2MSFTN GP14.phx.gbl...
Hi,

I have created an application which uses a SQL server database. I
created a
mainform which retreives all the customers. This takes about 3sec. I
have
created a splash screen too. I use a module to open the splash screen
and
then the mainform.

The splash screen opens up, mainfrom load, but still it takes 3sec for
the
data to show up. What i want is while the mainform loads, i want to show
the
splash screen.

Any suggestions.

senthilkumar



Nov 21 '05 #10

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

Similar topics

2
6922
by: Bill | last post by:
Problem 1) Any ideas on how I would get a splash screen to appear for a certain amount of time when I open a database - it's to display a text based disclaimer message. I know about message boxes in VB but I don't my users having to click on an OK buttone each time this appears. Problem 2)
3
3058
by: Maileen | last post by:
Hi, I have a module in which are define 2 forms as below : '------ Module Module1 Public MyMain As New FMain Public MySplash As New FSplash Public Sub Main() MySplash.Show()
1
949
by: K E Senthil Kumar | last post by:
Hi, I have created an application which uses a SQL server database. I created a mainform which retreives all the customers. This takes about 3sec. I have created a splash screen too. I use a module to open the splash screen and then the mainform. The splash screen opens up, mainfrom load, but still it takes 3sec for the data to show up. What i want is while the mainform loads, i want to show the splash screen.
4
289
by: Lou | last post by:
Ok, How can I have my main app initialize while showng a splash screen. -Lou
2
2109
by: Joe Cool | last post by:
Using VB in VS2005. 2005 has a new way to implment a spash screen that alleviates the need for hardly any code. But I have found that when a GUI that has a splash screen is run as a scheduled task, the splash screen (and no other screen) is displayed for the entire run of the application. How can I disable the spalsh screen just for when an app is run as a scheduled task?
5
6412
by: steve | last post by:
Hi All I have a form set as the splash screen in VB.net 2005 application properties How can I tell when it has or is closing, as I want to then run some licence checking code without the splash screen interfering with msgboxes which may need to be displayed if the licence is invalid or missing I have tried in the splash form's formclosing event but it does not fire
2
4219
by: will_456 | last post by:
In vb2005 Express: In My Project Application Splash Screen I have selected my splash screen form. The form opens on project startup but closes immediately before anyone would have time to read it. I presume it only stays visible while the main form initialises. This is not long enough but I can't see how to slow it down. Should I set the splash screen using the Application settings or go back to
10
22378
by: =?Utf-8?B?UmljaGFyZCBCeXNvdXRo?= | last post by:
Hi In my app I have a SplashScreen, a login form and a main form. On launching the app, I'd like to show the SplashScreen while reading config files and attempting a database connection. I show progress of these tasks on a label on the SplashScreen form. Once this is completed ok, the splash screen should close and the login form should be displayed. A successful login closes that form and shows the main form.
4
5222
by: Gaz | last post by:
I am having a bit of a problem getting my application to work properly. RIght here is my problem... WHen my C# windows app loads up the start form, i create a new thread and show the splash on the new thread and put the main thread to sleep until the splash screen has done the business, then i kill the new thread and start another to show the login and again put the main one to sleep. Problem i have is that my splash screen will show...
0
9618
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10259
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9906
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.