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

Excessive CPU usage while dragging picturebox-having form

Hi,
On my system which is 2.4GHZ P4 CPU, 1GB memory + 64MB DDR graphic
card, if i create a simple picturebox docked on a form sized about
500x350 or less or more, doesn't matter, and also if i place a normal
sized picture on the control, while dragging the form having with
picturebox + image, it costs about %90-%100 CPU while dragging form
around the screen. And screen is shown as very noticeably sluttering
and distorted etc. Note that i use .NET 2.0 with VB.NET 2005.

Why? Is it because of .NET's or picturebox's high-level system
requirements?

Thanks.
Jan 12 '08 #1
4 2289

Well we had before a discussion about perfomance were i could not reproduce
the behavior however then i had a superior system to yours
at this moment i am working on a old test system.

wich is a + - 5 years old AMD XP 2400 + , with 512 MB shared memory (
Nvidia N-Force 2 mobo ) the onboard videocard ( slightly bether as a GF 2
MX 400) is using 64 MB , it is running on a genuine Windows XP Home with
SP 2 and a 40 GB IBM De(ath)sk[star] ( :-) ) harddisk UDMA 133 .

And again i can drag whatever i want and yes indeed it eats some CPU cycles
( cost of redrawing the form ) however it is not disturbing to me while this
is a heavy loaded system .

Are you sure your computer hardware and software is in good state ??
"kimiraikkonen" <ki*************@gmail.comschreef in bericht
news:ed**********************************@e4g2000h sg.googlegroups.com...
Hi,
On my system which is 2.4GHZ P4 CPU, 1GB memory + 64MB DDR graphic
card, if i create a simple picturebox docked on a form sized about
500x350 or less or more, doesn't matter, and also if i place a normal
sized picture on the control, while dragging the form having with
picturebox + image, it costs about %90-%100 CPU while dragging form
around the screen. And screen is shown as very noticeably sluttering
and distorted etc. Note that i use .NET 2.0 with VB.NET 2005.

Why? Is it because of .NET's or picturebox's high-level system
requirements?

Thanks.

Jan 12 '08 #2
On Jan 12, 5:54 pm, "Michel Posseth [MCP]" <M...@posseth.comwrote:
Well we had before a discussion about perfomance were i could not reproduce
the behavior however then i had a superior system to yours
at this moment i am working on a old test system.

wich is a + - 5 years old AMD XP 2400 + , with 512 MB shared memory (
Nvidia N-Force 2 mobo ) the onboard videocard ( slightly bether as a GF 2
MX 400) is using 64 MB , it is running on a genuine Windows XP Home with
SP 2 and a 40 GB IBM De(ath)sk[star] ( :-) ) harddisk UDMA 133 .

And again i can drag whatever i want and yes indeed it eats some CPU cycles
( cost of redrawing the form ) however it is not disturbing to me while this
is a heavy loaded system .

Are you sure your computer hardware and software is in good state ??

Yes, current system which is P4 2.4GHZ, 1GB memory, 64 MB Geforce4
MX440 etc. and your old system isn't superior to this spec i suppose.

Open a large picture such as 5-7 megapixels and load it into
picturebox, i bet you'll feel like a torture while dragging.
Open task manager somewhere, then follow the CPU usage while dragging
picturebox-based form around the screen with your old system.

Usually it depends on the picture size, but picture size doesn't have
effect on cpu usage "so much" if you don't load a very tiny picture
(eg: avatar).

No such problems in 3rd party image viewing softwares such as ACDSee
or XnView.

Thanks
Jan 12 '08 #3
Well
Just made a BMP of 7 megabytes , loaded this in a picturebox control With
Visual studio 2005 on my development system
tryed it first there

Start the prog , it is showing me the picture of 7 mb in the picturebox on a
form , i move it around as an idiot and one of my CPU climbs to 23% max
i have no redraw problems at all at this system everything looks smooth

i compiled this executable , transfered it to my test system and tested it
there ( compiled executbale in release mode ) and okay it isn`t smooth as
on my highend system repaint seems to hog the system and indeed it eats
some more cpu ( with peaks to 80 % ) , but it is still not so disturbing as
you describe it
and remember i am dragging this form as an idiot around my screen :-)
What sort of picture did you use ? , i used a screen dump of my system of
7 mb big in BMP

just created a new project in VS 2005 , threw a picturbeox control on the
empty form

Public Class Form1

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load

Me.PictureBox1.Load("C:\test.bmp")

End Sub

End Class

And loaded my 7 MB BMP screendump , and it seems to work fine here even on
my lowspec system ( ofcourse for what i would expect of that system )

Strange .......... believe me i am as surprised as you must be ... maybe
someone else could also test this just for verification

michel

"kimiraikkonen" <ki*************@gmail.comschreef in bericht
news:e6**********************************@q39g2000 hsf.googlegroups.com...
On Jan 12, 5:54 pm, "Michel Posseth [MCP]" <M...@posseth.comwrote:
>Well we had before a discussion about perfomance were i could not
reproduce
the behavior however then i had a superior system to yours
at this moment i am working on a old test system.

wich is a + - 5 years old AMD XP 2400 + , with 512 MB shared memory (
Nvidia N-Force 2 mobo ) the onboard videocard ( slightly bether as a GF
2
MX 400) is using 64 MB , it is running on a genuine Windows XP Home
with
SP 2 and a 40 GB IBM De(ath)sk[star] ( :-) ) harddisk UDMA 133 .

And again i can drag whatever i want and yes indeed it eats some CPU
cycles
( cost of redrawing the form ) however it is not disturbing to me while
this
is a heavy loaded system .

Are you sure your computer hardware and software is in good state ??


Yes, current system which is P4 2.4GHZ, 1GB memory, 64 MB Geforce4
MX440 etc. and your old system isn't superior to this spec i suppose.

Open a large picture such as 5-7 megapixels and load it into
picturebox, i bet you'll feel like a torture while dragging.
Open task manager somewhere, then follow the CPU usage while dragging
picturebox-based form around the screen with your old system.

Usually it depends on the picture size, but picture size doesn't have
effect on cpu usage "so much" if you don't load a very tiny picture
(eg: avatar).

No such problems in 3rd party image viewing softwares such as ACDSee
or XnView.

Thanks

Jan 12 '08 #4
Are you doing anything in the form.move event handler?

"kimiraikkonen" wrote:
Hi,
On my system which is 2.4GHZ P4 CPU, 1GB memory + 64MB DDR graphic
card, if i create a simple picturebox docked on a form sized about
500x350 or less or more, doesn't matter, and also if i place a normal
sized picture on the control, while dragging the form having with
picturebox + image, it costs about %90-%100 CPU while dragging form
around the screen. And screen is shown as very noticeably sluttering
and distorted etc. Note that i use .NET 2.0 with VB.NET 2005.

Why? Is it because of .NET's or picturebox's high-level system
requirements?

Thanks.
Jan 12 '08 #5

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

Similar topics

0
by: Sin Jeong-hun | last post by:
If FlowLayoutPanel's AutoScroll is set to true, there appears a scroll bar on the right. Normally, users would expect the contents is scrolled while they are dragging the scroll bar. Well, it does,...
0
by: SamSpade | last post by:
I have a usercontrol that contains a picturebox. The user can obtain (creategraphics) a picturebox graphics object and draw on the picturebox. She could do gr.GraphincInit.Millimeter and then draw...
16
by: Geoff Jones | last post by:
Hiya Could anybody direct me to some examples of code to do the following: Display a bitmap on a form which can then be moved about i.e. dragged, using the left down button of the mouse. ...
3
by: Jeff | last post by:
I've been working on an application for a while now that has been giving me some trouble when it comes to working with a picturebox and memory usage. My company deals with digital imaging, so we...
0
by: deepuk75 | last post by:
Hi all, I have a user control that contains a picturebox within a panel. the panet has autoscroll property set to true.The problem I am facing is with the thumb track. if drag the scroll bar, the...
4
by: munglet | last post by:
Is there anyway to get a picturebox to recieve focus? I ask because I implemented a "delete" button in a picturebox (due to size constraints), but now due to accessibility reasons I need to be...
21
by: LuB | last post by:
How judicious ought one be when inlining small methods. I once read that in general, most compiles will only inline 'one' level. IE: if all the following methods were declared/defined as...
4
by: Jerry West | last post by:
I have a routine that updates a PictureBox image every x seconds. I do this by first loading an array with the path to all of the images. I then generate a random number to use as the index of the...
1
by: dharmendermca | last post by:
i'want to draw a rectangle in picturebox and then drag it anywhere inside the picturebox and where i drop it that portion must be displayed in another picturebox using vb.net
1
by: leshka82 | last post by:
I have recently designed a Winform Image drag & drop utility. The approach I took was to have a Panel control serve as a destination for multiple file drop. Once the user dragged & dropped the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.