473,503 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[vb2005] graphics lag at startup

when my form loads, it doesn't instantly display properly.
i've tried doevents + refresh but both comboboxes on my form take a few
seconds to display properly.
i've got a backgroundworker that i call in the form_load event, that loads
12000+ items into a listview but that shouldn't slow the loading down?
Jun 4 '07 #1
4 1094
Paul,

Yes, that could be slowing the form down, as the loading of the items is
most likely happen synchronously to the rest of the form. Maybe add a
splash screen from the Add New Item dialog, and link it in using the project
properties. It will show on startup while the form loads.

Or implement an asynchronous loading mechanism?
Hope this helps,

Steve

".paul." <pa**@discussions.microsoft.comwrote in message
news:7D**********************************@microsof t.com...
when my form loads, it doesn't instantly display properly.
i've tried doevents + refresh but both comboboxes on my form take a few
seconds to display properly.
i've got a backgroundworker that i call in the form_load event, that loads
12000+ items into a listview but that shouldn't slow the loading down?

Jun 4 '07 #2
Hi,
Try using BeginUpdate and EndUpdate methods while filling ComboBoxes and
ListView.By using BeginUpdate/Endupdate the control would not redraw itself
every time you add items to it.For example,
Try
With cbo
.BeginUpdate()
.ValueMember = SomeValueMember
.DisplayMember = SomeDisplayMember
.DataSource = dt
.EndUpdate()
End With

Catch ex As Exception

' Custom error handler

End Try
--
Hope this helps.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.

".paul." wrote:
when my form loads, it doesn't instantly display properly.
i've tried doevents + refresh but both comboboxes on my form take a few
seconds to display properly.
i've got a backgroundworker that i call in the form_load event, that loads
12000+ items into a listview but that shouldn't slow the loading down?
Jun 4 '07 #3
no the loading of the items is on a different thread. asynchronous

"PlatinumBay" wrote:
Paul,

Yes, that could be slowing the form down, as the loading of the items is
most likely happen synchronously to the rest of the form. Maybe add a
splash screen from the Add New Item dialog, and link it in using the project
properties. It will show on startup while the form loads.

Or implement an asynchronous loading mechanism?
Hope this helps,

Steve

".paul." <pa**@discussions.microsoft.comwrote in message
news:7D**********************************@microsof t.com...
when my form loads, it doesn't instantly display properly.
i've tried doevents + refresh but both comboboxes on my form take a few
seconds to display properly.
i've got a backgroundworker that i call in the form_load event, that loads
12000+ items into a listview but that shouldn't slow the loading down?


Jun 4 '07 #4
Hi,
You should find below link also useful:
http://msdn.microsoft.com/msdnmag/is...msPerformance/
--
Hope this helps.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.

".paul." wrote:
when my form loads, it doesn't instantly display properly.
i've tried doevents + refresh but both comboboxes on my form take a few
seconds to display properly.
i've got a backgroundworker that i call in the form_load event, that loads
12000+ items into a listview but that shouldn't slow the loading down?
Jun 4 '07 #5

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

Similar topics

4
3352
by: Martin | last post by:
I am using graphics as backgrounds for forms,buttons,labels etc. The question is: is it faster to load all graphics from files on app start or to use it embeded (places in editor during design)....
4
5139
by: thomasp | last post by:
I found the following code on MSDN to draw a line in VB2005. Public Sub DrawLinePoint(ByVal e As PaintEventArgs) ' Create pen. Dim blackPen As New Pen(Color.Black, 3) ' Create points that...
10
1907
by: Galen Somerville | last post by:
Going from VB6 (RAD) to VB2005 (SAD) The documentation always shows graphics drawing in a paint event like Private Sub Pictcolor_Paint(ByVal sender As Object, ByVal e _ As...
4
1274
by: Galen Somerville | last post by:
I have a real timing problem. This involves getting data from a USB device via an ActiveX dll and drawing trace lines on the screen via a UserControl. The USB device sends six sets of pixel info...
1
1556
by: Hector M Banda | last post by:
Hi all, Need i simple example on how print/preview data from a database. I already have some code but I am lost because the preview does not create multiple pages and only shows the first page and...
7
1618
by: TAVOSOFT | last post by:
Hi friends, I am begginer , I wanna to learn VB2005 ,Which are good book for to learn VB2005 of level -begginer-intermediate. Thanks you friends.
4
1635
by: Galen Somerville | last post by:
My VB2005 app gets real time Heart sounds and an ECG from a USB device. I'm looking for a way to speed up the drawing of the traces on the screen. In the following code the routine GetSounds...
7
2854
by: Galen Somerville | last post by:
I have been converting a VB6 project to VB2005 for lo these many months. Most of my problems have been solved thanks to people like WanYuan Wang and Mattias Sjogren. But now the Graphics aspect is...
4
1209
cindy2
by: cindy2 | last post by:
Hi, Something strange happens when I run my vb2005-project. The startup form (form1) displays normally at first instance. After that you can show a dialog(form2) with a button_click. When you...
0
7083
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
7278
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
7328
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...
1
6988
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
5578
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,...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3166
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...
0
1510
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
379
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...

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.