473,379 Members | 1,326 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,379 software developers and data experts.

load form

yxq
Hi,
My form will execute lots of codes when loaded, result in the form shown
slowly, how to execute the codes after the form already shown?

Thanks

Nov 20 '05 #1
2 1384
Cor
Hi Yxq

I think that has no benefit,

Maybe this splash form is something for you?

Cor
\\\form1
Private frm As New Form2
Private Sub Form1_Load(ByVal sender _
As Object, ByVal e As System.EventArgs) _
Handles MyBase.Load
frm.Show()
End Sub

///
\\\form2

Private WithEvents timer1 As New Windows.Forms.Timer
Private Sub Form2_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Label1.Text = "I am busy"
Me.ForeColor = Color.White
timer1.Enabled = True
timer1.Interval = 125
Me.BackColor = Color.CornflowerBlue
Me.Opacity = 1
Me.TopMost = True
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 = 0 Then
timer1.Enabled = False
Me.Close()
End If
End Sub
///
Nov 20 '05 #2
I don't know what your code is doing. But I think if you could sperate your code to a function from your form, then you can put your the function in Main just after the form show. Something like this

Public Shared Sub Main(
Dim myForm As New Form
myForm.Show(

myForm.myFunction(

End Sub
Nov 20 '05 #3

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

Similar topics

6
by: Matthew Wells | last post by:
I am trying to load a form (load Me) without the form becoming visible. If I try me.hide or me.visible = false, they load the form and the form blinks before becoming invisible. Is there a way to...
9
by: John Kirksey | last post by:
I have a page that uses an in-place editable DataGrid that supports sorting and paging. EnableViewState is turned ON. At the top of the page are several search fields that allow the user to filter...
0
by: Frank 'Olorin' Rizzi | last post by:
Hello everyone. This is quite convoluted, but I'll try to make it simple. I have a couple of bottom-line questions (I guess): 1~ what happens between the Page_Load routine in the code behind...
6
by: Tom | last post by:
Is there ANY easy way to close a MDI Child form in the middle of it's load? For instance, during the Load event I find a need to close the form (for whatever reason - maybe the user isn't ready for...
3
by: Dennis | last post by:
I have the following code for showing a form: dim frm as new myForm frm.ShowDialog (The Form Load Event is fired then I hide the form using Me.Hide when the X in the UR corner is clicked). ...
2
by: **Developer** | last post by:
I have a Form (FV&C) containing a userconrtrol (CF&E) I do a ShowDialog for the form and the form's Load calls a method of the UserControl. The first time I do this the usercontrol appears on...
6
by: tony | last post by:
Hello! When exactly is it important or advisable to use this form load event handler compare to using the C-tor. For example here I create an event handler called dataBoundGridForm that is...
2
by: Franky | last post by:
Threre is a Form containing a usercontrol In the form's Load event it references a usercontrol property, say, zz The first showdialog(formx) causes 1 usercontrol_load event 2 form_load event...
10
by: sara | last post by:
Hi - I have been struggling with solution ideas for this now for almost 2 weeks, and have not been able to figure this out. I have a user who creates a Purchase Order (tblPOData). In some...
9
by: RvGrah | last post by:
I'm completely new to using background threading, though I have downloaded and run through several samples and understood how they worked. My question is: I have an app whose primary form...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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...

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.