Click here to Skip to main content
15,909,747 members
Home / Discussions / C#
   

C#

 
GeneralRe: Tooltips in the Menu Pin
TheDen27-Jan-05 11:07
TheDen27-Jan-05 11:07 
Question.Net whaaaaah??? Pin
dazler27-Jan-05 6:35
dazler27-Jan-05 6:35 
AnswerRe: .Net whaaaaah??? Pin
tojamismis27-Jan-05 9:40
tojamismis27-Jan-05 9:40 
GeneralTricky exception handling Pin
Quimbly27-Jan-05 6:03
Quimbly27-Jan-05 6:03 
GeneralRe: Tricky exception handling Pin
Charlie Williams27-Jan-05 6:26
Charlie Williams27-Jan-05 6:26 
GeneralRe: Tricky exception handling Pin
leppie27-Jan-05 8:10
leppie27-Jan-05 8:10 
GeneralRepainting Controls on a form... Pin
new_phoenix27-Jan-05 5:34
new_phoenix27-Jan-05 5:34 
GeneralRe: Repainting Controls on a form... Pin
Heath Stewart27-Jan-05 12:10
protectorHeath Stewart27-Jan-05 12:10 
If these are controls you're painting then you should pay attention to the PaintEventArgs.ClipRectangle that is passed to your OnPaint handler. This defines the invalidated clipping rectangle that must be repainted. If you're repainting your whole control - and every control - unnecessarily than the performance degradation is a result.

Your desktop is a 2D surface and windows are drawn on top of each other. WM_PAINT messages are only sent to visible windows and those windows are responsible for honoring the clipping rectangle. So if a control is partly obstructed it should only repaint what it has to, otherwise you're wasting resources and your application will appear hanged.

Layered windows were introduced in Windows 2000 where windows can maintain their surfaces despite being covered - almost a 3D approach to drawing. This is something you have to implement yourself, however, by P/Invoking SetLayeredWindowAttributes or UpdateLayeredWindow depending on your approach. It's interesting to note that the Form.Opacity property uses layerd windows, which is why it's only supported in Win2K and beyond.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralCombining .wav files Pin
ziggy8227-Jan-05 5:29
ziggy8227-Jan-05 5:29 
GeneralRe: Combining .wav files Pin
mav.northwind27-Jan-05 7:00
mav.northwind27-Jan-05 7:00 
GeneralRe: Combining .wav files Pin
ziggy8227-Jan-05 9:24
ziggy8227-Jan-05 9:24 
GeneralSQL TimeStamp or ... Pin
Bahadir Cambel27-Jan-05 5:11
Bahadir Cambel27-Jan-05 5:11 
GeneralRe: SQL TimeStamp or ... Pin
Dave Kreskowiak27-Jan-05 5:20
mveDave Kreskowiak27-Jan-05 5:20 
GeneralRe: SQL TimeStamp or ... Pin
Bahadir Cambel27-Jan-05 8:58
Bahadir Cambel27-Jan-05 8:58 
Generalcalculate area of an image Pin
chathuraka27-Jan-05 4:11
chathuraka27-Jan-05 4:11 
GeneralCatching PowerPoint when she falls Pin
Esmo200027-Jan-05 3:55
Esmo200027-Jan-05 3:55 
GeneralRe: Catching PowerPoint when she falls Pin
Heath Stewart27-Jan-05 9:51
protectorHeath Stewart27-Jan-05 9:51 
GeneralRe: Catching PowerPoint when she falls Pin
Esmo200027-Jan-05 10:40
Esmo200027-Jan-05 10:40 
GeneralRe: Catching PowerPoint when she falls Pin
Heath Stewart27-Jan-05 12:04
protectorHeath Stewart27-Jan-05 12:04 
GeneralRe: Catching PowerPoint when she falls Pin
Esmo200031-Jan-05 8:20
Esmo200031-Jan-05 8:20 
GeneralRe: Catching PowerPoint when she falls Pin
Heath Stewart31-Jan-05 9:33
protectorHeath Stewart31-Jan-05 9:33 
QuestionSerialize an Array with ISerializable? Pin
huckfinn27-Jan-05 3:18
huckfinn27-Jan-05 3:18 
AnswerRe: Serialize an Array with ISerializable? Pin
Heath Stewart27-Jan-05 9:59
protectorHeath Stewart27-Jan-05 9:59 
Generaltrouble deleting records from my sql server Pin
tadhg8827-Jan-05 3:17
tadhg8827-Jan-05 3:17 
GeneralRe: trouble deleting records from my sql server Pin
Mazdak28-Jan-05 0:53
Mazdak28-Jan-05 0:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.