Click here to Skip to main content
15,890,123 members
Home / Discussions / C#
   

C#

 
AnswerRe: programe PinPopular
SoMad23-Feb-13 10:37
professionalSoMad23-Feb-13 10:37 
GeneralRe: programe Pin
Manfred Rudolf Bihy23-Feb-13 11:37
professionalManfred Rudolf Bihy23-Feb-13 11:37 
GeneralRe: programe Pin
SoMad23-Feb-13 11:46
professionalSoMad23-Feb-13 11:46 
AnswerRe: programe Pin
Amir Mohammad Nasrollahi29-Jul-13 21:45
professionalAmir Mohammad Nasrollahi29-Jul-13 21:45 
QuestionCustomize windows scroll bar in combobox Pin
Kaizen20223-Feb-13 7:45
Kaizen20223-Feb-13 7:45 
AnswerRe: Customize windows scroll bar in combobox Pin
SledgeHammer0123-Feb-13 9:20
SledgeHammer0123-Feb-13 9:20 
GeneralRe: Customize windows scroll bar in combobox Pin
Kaizen20224-Feb-13 6:01
Kaizen20224-Feb-13 6:01 
GeneralRe: Customize windows scroll bar in combobox Pin
SledgeHammer0124-Feb-13 8:20
SledgeHammer0124-Feb-13 8:20 
Oh well. In that case, you are in for a world of hurt lol Smile | :) . The common controls interact with the *real* internal window scrollbar, not your external scrollbar control, so you need to customize the internal one. The internal window scrollbar is not a control, but rather painted as part of the WM_NCPAINT process, so you'll need to override that and do all your own painting for the ENTIRE non client area.

BE WARNED: There is a major gotcha that people don't know about until they try to implement this. I only know about it because I've done it in the past Smile | :) ...

You [B]***CANNOT***[/B] achieve custom scrollbars without API hooking. No way, no how, no workaround that. Reason being is that Windows implements the scrollbars like this:

case WM_NCPAINT:
{
// random code to do random stuff
DrawScrollBars();
// more random code to do random stuff
break;
}

Now, thats all well and good, you could override the WM_NCPAINT message and prevent the stock DrawScrollBars() function from getting called.

However, the internal scrollbar functions that the common controls use do not go through WM_NCPAINT Smile | :) , they call DrawScrollBars() directly and there is no way to bypass that without API hooking Smile | :) .

So what you'll get is you'll get your pretty new scrollbars 75% of the time and the stock scroll bars flashing through 25% of the time.

Like I said, switch to WPF Smile | :) (or find an API hooking library).
Questionunable to start program, unrecognized error in windows web services framework Pin
bonosa23-Feb-13 5:06
bonosa23-Feb-13 5:06 
Questionwhy System.NullReferenceException occurred? Pin
Jassim Rahma23-Feb-13 1:54
Jassim Rahma23-Feb-13 1:54 
AnswerRe: why System.NullReferenceException occurred? Pin
Alan N23-Feb-13 2:04
Alan N23-Feb-13 2:04 
GeneralRe: why System.NullReferenceException occurred? Pin
Jassim Rahma23-Feb-13 2:10
Jassim Rahma23-Feb-13 2:10 
GeneralRe: why System.NullReferenceException occurred? Pin
Alan N23-Feb-13 2:33
Alan N23-Feb-13 2:33 
GeneralRe: why System.NullReferenceException occurred? Pin
Jassim Rahma23-Feb-13 2:44
Jassim Rahma23-Feb-13 2:44 
GeneralRe: why System.NullReferenceException occurred? Pin
Alan N23-Feb-13 2:54
Alan N23-Feb-13 2:54 
AnswerRe: why System.NullReferenceException occurred? Pin
jschell24-Feb-13 7:05
jschell24-Feb-13 7:05 
QuestionHow to read gmail mails using C# (only Unread Email ) Pin
Freedom Code Park22-Feb-13 18:13
Freedom Code Park22-Feb-13 18:13 
AnswerRe: How to read gmail mails using C# (only Unread Email ) Pin
Dave Kreskowiak22-Feb-13 18:22
mveDave Kreskowiak22-Feb-13 18:22 
AnswerRe: How to read gmail mails using C# (only Unread Email ) Pin
OriginalGriff22-Feb-13 21:42
mveOriginalGriff22-Feb-13 21:42 
AnswerRe: How to read gmail mails using C# (only Unread Email ) Pin
Marco Bertschi23-Feb-13 8:02
protectorMarco Bertschi23-Feb-13 8:02 
AnswerRe: How to read gmail mails using C# (only Unread Email ) Pin
Amir Mohammad Nasrollahi29-Jul-13 21:51
professionalAmir Mohammad Nasrollahi29-Jul-13 21:51 
Questionsimplest hacking software in C# Pin
Member 985741522-Feb-13 16:44
Member 985741522-Feb-13 16:44 
AnswerRe: simplest hacking software in C# Pin
Dave Kreskowiak22-Feb-13 18:21
mveDave Kreskowiak22-Feb-13 18:21 
AnswerRe: simplest hacking software in C# Pin
SoMad22-Feb-13 19:13
professionalSoMad22-Feb-13 19:13 
AnswerRe: simplest hacking software in C# PinPopular
OriginalGriff22-Feb-13 21:44
mveOriginalGriff22-Feb-13 21:44 

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.