473,657 Members | 2,832 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 backgroundworke r 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 1103
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**@discussio ns.microsoft.co mwrote in message
news:7D******** *************** ***********@mic rosoft.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 backgroundworke r 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 = SomeDisplayMemb er
.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 backgroundworke r 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

"PlatinumBa y" 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**@discussio ns.microsoft.co mwrote in message
news:7D******** *************** ***********@mic rosoft.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 backgroundworke r 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 backgroundworke r 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
3356
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). Reason for my question is that application has 5mb, while without graphics it has cca 400kb. Graphic files (bmps) take about 200kb (in program, they are repeated many times, ie almost all labels (around 200) have same background image)). Also,...
4
5148
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 define line. Dim point1 As New Point(100, 100) Dim point2 As New Point(500, 100)
10
1933
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 System.Windows.Forms.PaintEventArgs) Handles PictColor.Paint End Sub But my VB6 program draws to the picturebox PictColor from many different
4
1297
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 so twelve lines have to be drawn on the screen. The first line drawn blacks out a previously drawn line. The second line drawn is from the current data. After this is repeated six times, the program queries the USB device for the next six sets of...
1
1563
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 the printing goes over the margins of the page. My problem is that I cannot figure out how to control new page when page is getting full. Another problem is that I would like to have a common place to set headers and footers to be printed every...
7
1621
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
1649
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 recieves the USB data for six consequtive horizontal pixels (or 6 sound/ECG samples). The routine FixChns handles the scaling of the data and puts it into the PlotAry for presentation. The variable RptCnt then handles the placement for the 6 sets...
7
2866
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 the problem. This program gets Heart sounds and ECG trace data from a USB device via an ActiveX thread and an internal DataReciever thread in the main program. The display is like an oscilloscope in that it sweeps across the screen in real...
4
1212
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 close the dialog with another button_click some data (mainly labels.text) must be loaded on form1. But when that happens form1 is automatically minimized and comes back in a while when all the data is loaded. This does not happen if I have no other...
0
8303
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
8821
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...
1
8502
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7316
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...
1
6162
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4150
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
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1941
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
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.