Click here to Skip to main content
15,922,419 members
Home / Discussions / C#
   

C#

 
GeneralRe: I need a horizontal tree control Pin
Heath Stewart19-Oct-03 5:41
protectorHeath Stewart19-Oct-03 5:41 
GeneralRe: I need a horizontal tree control Pin
MtnBiknGuy19-Oct-03 10:14
MtnBiknGuy19-Oct-03 10:14 
GeneralRe: I need a horizontal tree control Pin
MtnBiknGuy19-Oct-03 10:33
MtnBiknGuy19-Oct-03 10:33 
QuestionHow to format text in a winform datagrid column Pin
Anonymous19-Oct-03 3:26
Anonymous19-Oct-03 3:26 
AnswerRe: How to format text in a winform datagrid column Pin
Mike Ellison19-Oct-03 8:54
Mike Ellison19-Oct-03 8:54 
GeneralE_NOINTERFACE Pin
Norman Fung18-Oct-03 19:30
Norman Fung18-Oct-03 19:30 
GeneralTransparent window within another transparent window Pin
David Forrester18-Oct-03 17:27
David Forrester18-Oct-03 17:27 
GeneralRe: Transparent window within another transparent window Pin
David Forrester18-Oct-03 22:39
David Forrester18-Oct-03 22:39 
Ok, well, I've found a solution to my problem. After my hours and hours of debugging I've concluded that it's either a bug with the framework or something else beyond the scope of my code that is happening.

I have solved the problem by drawing the background of the scroll bar control manually rather than calling the default OnPaintBackground.

Here is the code that fixed it in case anyone is interested:

protected override void OnPaintBackground(PaintEventArgs e)<br />
{<br />
	// Don't call the default... we'll handle the background painting.<br />
	// Since this is a transparent control that has transparent controls inside,<br />
	// we must redraw the background of its parent manually, or the<br />
	// background will be offset wrong.<br />
	GraphicsContainer container = e.Graphics.BeginContainer(e.ClipRectangle, e.ClipRectangle, GraphicsUnit.Pixel);<br />
<br />
	Rectangle rectBg = e.ClipRectangle;<br />
	rectBg.Offset(this.Bounds.Left, this.Bounds.Top);<br />
	e.Graphics.TranslateTransform(-this.Bounds.Left, -this.Bounds.Top);<br />
	InvokePaintBackground(this.Parent, new PaintEventArgs(e.Graphics, rectBg));<br />
	InvokePaint(this.Parent, new PaintEventArgs(e.Graphics, rectBg));<br />
<br />
	e.Graphics.EndContainer(container);<br />
}


Any improvements to this method are appreciated.
QuestionCAN SOMEBODY PLEASEEEEEE... Pin
fadee18-Oct-03 8:53
fadee18-Oct-03 8:53 
AnswerRe: CAN SOMEBODY PLEASEEEEEE... Pin
Arjan Einbu18-Oct-03 10:04
Arjan Einbu18-Oct-03 10:04 
GeneralRe: CAN SOMEBODY PLEASEEEEEE... Pin
fadee18-Oct-03 20:55
fadee18-Oct-03 20:55 
GeneralRe: CAN SOMEBODY PLEASEEEEEE... Pin
eggie55-Dec-03 14:30
eggie55-Dec-03 14:30 
GeneralSmall IO help needed... Pin
eggie518-Oct-03 7:27
eggie518-Oct-03 7:27 
GeneralRe: Small IO help needed... Pin
je_gonzalez18-Oct-03 10:16
je_gonzalez18-Oct-03 10:16 
GeneralRe: Small IO help needed... Pin
eggie518-Oct-03 17:56
eggie518-Oct-03 17:56 
GeneralRe: Small IO help needed... Pin
eggie518-Oct-03 11:47
eggie518-Oct-03 11:47 
GeneralRe: Small IO help needed... Pin
je_gonzalez18-Oct-03 12:44
je_gonzalez18-Oct-03 12:44 
GeneralRe: Small IO help needed... Pin
eggie518-Oct-03 14:39
eggie518-Oct-03 14:39 
GeneralRe: Small IO help needed... Pin
je_gonzalez18-Oct-03 15:27
je_gonzalez18-Oct-03 15:27 
GeneralRe: Small IO help needed... Pin
eggie518-Oct-03 17:07
eggie518-Oct-03 17:07 
Generalopen external application Pin
JockerSoft18-Oct-03 6:50
JockerSoft18-Oct-03 6:50 
GeneralRe: open external application Pin
eggie518-Oct-03 6:57
eggie518-Oct-03 6:57 
GeneralRe: open external application Pin
Heath Stewart18-Oct-03 16:12
protectorHeath Stewart18-Oct-03 16:12 
GeneralRe: open external application Pin
JockerSoft18-Oct-03 23:43
JockerSoft18-Oct-03 23:43 
GeneralRe: open external application Pin
Heath Stewart19-Oct-03 5:36
protectorHeath Stewart19-Oct-03 5:36 

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.