473,402 Members | 2,064 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,402 software developers and data experts.

Form.Loaded event?

HaLo2FrEeEk
404 256MB
The Form.Load event fires before the form is loaded, or as it is being loaded. I want to do some task after the form has been loaded, so that I can display some progress indicator to the user and make it seem like the program hasn't locked up.

Does such an event exist? Some method that I could use to make sure the form is fully loaded before doing my tasks? The tasks can be pretty long, and right now it does it as the program is starting up, so before the form is actually displayed.

Any help will be appreciated.
Oct 12 '10 #1
2 3583
Christian Binder
218 Expert 100+
Maybe you could use the Shown event. This is fired after the form is shown. I don't know if such an event like Loaded exist.
Oct 12 '10 #2
Curtis Rutland
3,256 Expert 2GB
I would suggest to still use the Loaded event, but rather use a BackgroundWorker or another thread to do your work for you.

The problem is, anything done on the UI thread will block the UI thread. So no matter where you do this, any heavy operation will cause the UI to lock up.

There's an example of using BackgroundWorker in the link, but I can provide a simpler example if necessary.
Oct 12 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

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: Sergiu Dev | last post by:
Hello, I am trying to provide a handler for the NewWindow2() event in this windows forms application. Here is the handler: Private Sub wbrPOS_NewWindow2(ByVal sender As Object, ByVal e As...
2
by: lgbjr | last post by:
Hi All, I see that this topic was discussed back on august 23rd, but I didn't see a real answer. I have a VB.NET MDI app. A particular menu action on the MDI parent is to call an OpenFileDialog...
3
by: Nikolay Evseev | last post by:
Hi, I am trying to trace down the Enter key in my Form.KeyPress event handler. The KeyPreview property is set to false, so I'd assume that all key presses should go through my form's KeyPress...
1
by: Jason Richmeier | last post by:
I am experiencing some unexpected behavior with the Form Load event in a Windows application. Hopefully, someone can explain why this behavior is occurring. In my application, I have a form...
1
by: tomlebold | last post by:
When or should the form Activate event be used? I'm working on an existing application that excutes Me.Refresh on the form Activate (Form_Activate) event. This event causes the form to try to...
0
by: tomlebold | last post by:
When or should the form Activate event be used? I'm working on an existing application that excutes Me.Refresh on the form Activate (Form_Activate) event. This event causes the form to try to...
0
by: =?Utf-8?B?QWxleCBLLg==?= | last post by:
Hi all I am using form's ResizeEnd event to adjust some GUI staff on my form. But when user maximizes the form, this event is not fired. Theoretically, I could use Resize or SizeChanged events...
19
by: zacks | last post by:
I have a .NET 2.0 MDI application where the child form has a Tab Control. Each of the Tab in the Tab Control has a Validating event to handle what it should do when the user changes tabs. But...
1
by: bigukfan | last post by:
I have a single Form with a Tab Control with multiple pages, and over 200 controls, mostly Textbox and ComboBox. I have some code that is fired by the KeyPress event of the Form (KeyPreview = True)...
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: 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...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.