I am using .net 2.0 and working in VS2005.
I've noticed following unpleasant effect in the standard Form class
behaviour: when the Form is hovered by some other window, it is being redrawn very slowly.
Here is the example. I have taken empty form, put there some standard controls:
http://www.ljplus.ru/img4/b/o/boshetunmaj/Redraw2.jpg
My hardware conf is: p4 3200, 2 Gb ram, GeForce 5200.
24 3253
I have found that controls redraw at this moment takes up to 80% of CPU time...
Plater 7,872
Recognized Expert Expert
I have never had that occurance unless my computer is super bogged down with a lot of applications.
Might I suggest checking your windows theme/style settings? The P4 might not be able to hand it if you have a LOT of controls on your windows.
I have never had that occurance unless my computer is super bogged down with a lot of applications.
Might I suggest checking your windows theme/style settings? The P4 might not be able to hand it if you have a LOT of controls on your windows.
It's strange, but there are only few controls. The most noticable effect is for TextBoxes, ComboBoxes and GroupBoxes.
Which one setting do you mean?
Plater 7,872
Recognized Expert Expert
Hmm, I turn off most of the themeing on my computer so I'm not sure it even has any bearing on it.
Are you doing anything else with the form? Doing anything durring paint/redraw events? Or populating data from a database or anything?
Hmm, I turn off most of the themeing on my computer so I'm not sure it even has any bearing on it.
Are you doing anything else with the form? Doing anything durring paint/redraw events? Or populating data from a database or anything?
The form is free from any code.
I have set DoubleBuffered property of groupboxes to true and this helped a little, but the problem still stays.
I have found the following effect:
I create multi window app (I run another window in another thread) and catch
events concerning moving and resizing of that other window. On each such event I run DoEvents() in a main thread. This leads to perferct window redraw.
But I can't understand, how to do the same with windows of 3rd side applications.
Can anybode help?
Plater 7,872
Recognized Expert Expert
Ah!
So this window was not running in the GUI thread but in a different thread?
Ah!
So this window was not running in the GUI thread but in a different thread?
Yes, I've created BackgroundWorke r in the main GUI thread and asked it to do
Run.Application (AnotherWindow) ;
In this case I've no such awful effect as it was described in the 1st post.
That's because I can catch events from this window.
Plater 7,872
Recognized Expert Expert
I thought you were having trouble with the "main" window. Makes sense that the window in the other thread had trouble with redraws.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: PHH |
last post by:
Help me, please,
When I redraw a ListviewItem in Listview (redraw items with icon and text
columms).
I used SetStyle(ControlStyle.UserPaint, true) function. And I redraw finish
and run program, when I run program I choose first line (line with index =
0) but this line is not actived (draw border over that), after I click to
another control (ex: other Listview, button ...) then this line is redrew
border around. Only first line (first...
|
by: WHITETIGER |
last post by:
Help me, please,
When I redraw a ListviewItem in Listview (redraw items with icon and text
columms).
I used SetStyle(ControlStyle.UserPaint, true) function. And I redraw finish
and run program, when I run program I choose first line (line with index =
0) but this line is not actived (draw border over that), after I click to
another control (ex: other Listview, button ...) then this line is redrew
border around. Only first line (first...
|
by: ch424 |
last post by:
Hi,
Does anybody know the fastest way to trigger a DrawingArea redaw in
pygtk? At the moment, I'm using a bit of a hack:
def redraw(self):
self.area.hide()
self.area.show()
Is there a better way to trigger a redraw? This causes flickering when
|
by: kiplring |
last post by:
I wrote a program which draw a dancer at cornor of desktop. ( I
Accessed through hDC)
But It has a problem. I remains all trait at the desktop until I
invoke any Redraw( Refresh) action - click, or drag.
Is there any way invoke Redraw or Refresh a region of desktop? It
should refresh all the window at the region. ( ex) explorer window.)
Thanks.
|
by: Fabrício de Novaes Kucinskis |
last post by:
Hi all,
I have to problems concerning datagrids, tabcontrols and scrollbars:
1) I created a form with a TabControl. This TabControl has two TabPages: the
first with a datagrid to browse database records and the second with some
controls
(TextBoxes, OptionButtons...) to edit these records. When the second tab is
shown and I use the DataGrid's SetDataBind method, the grid scrollbars are
disabled.
| |
by: Segfahlt |
last post by:
I need a little help here please.
I have 2 win forms user controls in 2 different projects that I'm hosting in
2 different virtual directories. The controls have been test and operate okay
in both projects.
Both controls(dlls) have been signed using SN.exe and I've set up the
appropriate .Net assembly permissions using those Strong Names
The DLL's have been copied to the /bin directory in both web virtual
directories.
|
by: Dean Earley |
last post by:
Hi all.
I have just added translucency to one of my applications using the
layered windows API, but I have come across a redraw problem.
Unfortunately, I cant reproduce this in a standalone app but I'll try
and explain what's happening.
When a form is obscured when it is resized or made "visible" (I show
some other forms on restore), it seems to remember that visibility
|
by: diogoko |
last post by:
I have some code like:
try {
someButton.disabled = true;
cpuIntensiveCode();
} finally {
someButton.disabled = false;
}
The problem is that someButton is never disabled, because the browser
|
by: Spockman |
last post by:
Hi Guys!
I stuck in this problem quiet awhile. I have a MainForm in my application. It contains a second one as a member. If both a visible I have a problem to redraw the second one.
eg: MainForm and SecondForm is open and I move another window over the SecondForm. After that I click on the MainForm it will get the Focus and it will be redrawn. But the SecondForm stays behind.
I tried the following:
Using the OnActivation or OnEnter of...
|
by: raylopez99 |
last post by:
Here I am learning WinForms and two months into it I learn there's a
WPF API that is coming out. Is this WPF out yet, and is it a threat
to WinForms, in the sense that all the library routines I memorize and/
or familiarize myself in WinForms will disappear in WPF? I did note
in one early version of C#, the non-generic "ArrayList" was replaced
by the generic and template <based List, but that kind of change is
not a big deal. If WPF...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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,...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |