473,769 Members | 1,618 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2307

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 ??
"kimiraikko nen" <ki************ *@gmail.comschr eef in bericht
news:ed******** *************** ***********@e4g 2000hsg.googleg roups.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.c omwrote:
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(ByVa l sender As Object, ByVal e As System.EventArg s)
Handles Me.Load

Me.PictureBox1. Load("C:\test.b mp")

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

"kimiraikko nen" <ki************ *@gmail.comschr eef in bericht
news:e6******** *************** ***********@q39 g2000hsf.google groups.com...
On Jan 12, 5:54 pm, "Michel Posseth [MCP]" <M...@posseth.c omwrote:
>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?

"kimiraikko nen" 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
3254
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, but not when the Windows's "Show window contents while dragging" is disabled. Almost all the Windows' common coltrols scrolls the contents while dragging even if that option is disabled. So, I think FlowLayoutPanel should behave like other...
0
1656
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 using millimeters as the measurement. But he would still have to dimension the Picture box using pixels (Clientsize for example). He changes the picture box dimensions via usercontrol properties so I could scale them going in and out. Couple...
16
1672
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. Thanks in advance Geoff
3
5500
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 are dealing with high resolution images (2500x3300pixels.) The application allows the user to browse through the images in a directory to find the images they need (files listed in a listbox, clicking on the item displays it in a picturebox.) ...
0
1577
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 picture box is not scrolled until I release it. is there a way to implement smmoth scrolling while the scrollbar is being dragged as in a treeview control or a browser control. can someone help. thanks in advance.
4
6267
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 able to tab to the picturebox via the keyboard. Since the picturebox doesn't recieve focus the user can't get to the picturebox control. Am I missing something? This is using .NET 1.1
21
1802
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 inline in their respective classes, can I expect the compiler to try and inline them all? obj.GetSize()
4
13452
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 array. A timer is set to update the PictureBox. This works great the first time through but fails on all subsequent Timer events. If I simply step through the code it works fine. If I run it only the first time through does the PictureBox update...
1
1280
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
6511
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 desired files I do a check to ensure that I only process the image files (".jpg", ".png", etc), while any other files are ignored by the program. For every image file being dropped I programmatically create a PictureBox control, do proper resizing of an...
1
9994
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
8870
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
7408
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
6673
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5298
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
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
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 we have to send another system
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
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.