73 references to ToWin32
System.Drawing (2)
commonui\System\Drawing\Advanced\ColorTranslator.cs (1)
125
return
ToWin32
(c);
commonui\System\Drawing\Bitmap.cs (1)
422
ColorTranslator.
ToWin32
(background));
System.Windows.Forms (70)
misc\GDI\DeviceContext2.cs (2)
81
return ColorTranslator.FromWin32(IntUnsafeNativeMethods.SetBkColor( new HandleRef( this, this.Hdc ), ColorTranslator.
ToWin32
(newColor)));
434
return ColorTranslator.FromWin32(IntUnsafeNativeMethods.SetTextColor(new HandleRef( this, this.Hdc), ColorTranslator.
ToWin32
(newColor)));
misc\GDI\WindowsGraphics2.cs (1)
299
int colorResult = IntUnsafeNativeMethods.GetNearestColor(hdc, ColorTranslator.
ToWin32
(color));
misc\GDI\WindowsPen.cs (2)
121
this.nativeHandle = IntSafeNativeMethods.CreatePen((int) this.style, this.width, ColorTranslator.
ToWin32
(this.color) );
127
lb.lbColor = ColorTranslator.
ToWin32
( this.wndBrush.Color );
misc\GDI\WindowsSolidBrush.cs (1)
35
IntPtr nativeHandle = IntSafeNativeMethods.CreateSolidBrush(ColorTranslator.
ToWin32
( this.Color));
winforms\Managed\System\WinForms\ColorDialog.cs (2)
287
cc.rgbResult = ColorTranslator.
ToWin32
(color);
298
if (cc.rgbResult != ColorTranslator.
ToWin32
(color)) color = ColorTranslator.FromOle(cc.rgbResult);
winforms\Managed\System\WinForms\ComboBox.cs (2)
2211
SafeNativeMethods.SetTextColor(new HandleRef(null, dc), ColorTranslator.
ToWin32
(ForeColor));
2212
SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.
ToWin32
(BackColor));
winforms\Managed\System\WinForms\Control.cs (3)
1060
backBrush = SafeNativeMethods.CreateSolidBrush(ColorTranslator.
ToWin32
(color));
7142
SafeNativeMethods.SetTextColor(new HandleRef(null, dc), ColorTranslator.
ToWin32
(ForeColor));
7143
SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.
ToWin32
(BackColor));
winforms\Managed\System\WinForms\ControlPaint.cs (6)
343
lb.lbColor = ColorTranslator.
ToWin32
(Color.Black);
1788
pen = SafeNativeMethods.CreatePen(NativeMethods.PS_DOT, 1, ColorTranslator.
ToWin32
(backColor));
1793
pen = SafeNativeMethods.CreatePen(NativeMethods.PS_SOLID, 2, ColorTranslator.
ToWin32
(backColor));
1800
SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.
ToWin32
(graphicsColor));
1827
IntPtr pen = SafeNativeMethods.CreatePen(NativeMethods.PS_SOLID, 1, ColorTranslator.
ToWin32
(backColor));
2008
IntPtr brush = SafeNativeMethods.CreateSolidBrush(ColorTranslator.
ToWin32
(backColor));
winforms\Managed\System\WinForms\DateTimePicker.cs (1)
1397
SendMessage(NativeMethods.DTM_SETMCCOLOR, colorIndex, ColorTranslator.
ToWin32
(value));
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (6)
745
savedColor = SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.
ToWin32
(SystemColors.ControlLightLight));
756
SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.
ToWin32
(SystemColors.ControlDark));
809
state, ColorTranslator.
ToWin32
(SystemColors.Control), ColorTranslator.
ToWin32
(SystemColors.ControlText));
839
oldTextColor = SafeNativeMethods.SetTextColor(new HandleRef(null, dc), ColorTranslator.
ToWin32
(SystemColors.ControlLightLight));
840
oldBackColor = SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.
ToWin32
(SystemColors.Control));
winforms\Managed\System\WinForms\FontDialog.cs (4)
175
return ColorTranslator.FromWin32(ColorTranslator.
ToWin32
(color));
594
cf.rgbColors = ColorTranslator.
ToWin32
(color);
597
cf.rgbColors = ColorTranslator.
ToWin32
(SystemColors.ControlText);
674
if (ColorTranslator.
ToWin32
(color) != rgb) {
winforms\Managed\System\WinForms\Form.cs (2)
6462
result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), ColorTranslator.
ToWin32
(transparencyKey), 0, NativeMethods.LWA_COLORKEY);
6465
result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), ColorTranslator.
ToWin32
(transparencyKey),
winforms\Managed\System\WinForms\ListView.cs (12)
386
SendMessage(NativeMethods.LVM_SETBKCOLOR, 0, ColorTranslator.
ToWin32
(BackColor));
855
SendMessage(NativeMethods.LVM_SETTEXTCOLOR, 0, ColorTranslator.
ToWin32
(ForeColor));
2776
nmcd->clrText = ColorTranslator.
ToWin32
(odCacheForeColor);
2780
nmcd->clrText = ColorTranslator.
ToWin32
(riFore);
2791
if (nmcd->clrText == ColorTranslator.
ToWin32
(SystemColors.HotTrack))
2829
nmcd->clrTextBk = ColorTranslator.
ToWin32
(odCacheBackColor);
2833
nmcd->clrTextBk = ColorTranslator.
ToWin32
(riBack);
4266
int color = ColorTranslator.
ToWin32
(BackColor);
4268
SendMessage(NativeMethods.LVM_SETTEXTCOLOR,0,ColorTranslator.
ToWin32
(base.ForeColor));
4551
int color = ColorTranslator.
ToWin32
(BackColor);
4644
SendMessage(NativeMethods.LVM_SETBKCOLOR, 0, ColorTranslator.
ToWin32
(c));
4648
SendMessage(NativeMethods.LVM_SETTEXTCOLOR, 0, ColorTranslator.
ToWin32
(c));
winforms\Managed\System\WinForms\MonthCalendar.cs (1)
1979
SendMessage(NativeMethods.MCM_SETCOLOR, colorIndex, ColorTranslator.
ToWin32
(value));
winforms\Managed\System\WinForms\ProgressBar.cs (6)
453
UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.
ToWin32
(BackColor));
462
UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.
ToWin32
(ForeColor));
788
UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.
ToWin32
(BackColor));
789
UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.
ToWin32
(ForeColor));
893
UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.
ToWin32
(ForeColor));
894
UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.
ToWin32
(BackColor));
winforms\Managed\System\WinForms\RichTextBox.cs (7)
1013
cf.crTextColor = ColorTranslator.
ToWin32
(value);
1064
cf2.crBackColor = ColorTranslator.
ToWin32
(value);
2233
&& ColorTranslator.
ToWin32
(value) == cf.crTextColor) {
2240
cf.crTextColor = ColorTranslator.
ToWin32
(value);
2464
SendMessage(RichTextBoxConstants.EM_SETBKGNDCOLOR, 0, ColorTranslator.
ToWin32
(BackColor));
2568
SendMessage(RichTextBoxConstants.EM_SETBKGNDCOLOR, 0, ColorTranslator.
ToWin32
(BackColor));
3303
SendMessage(RichTextBoxConstants.EM_SETBKGNDCOLOR, 0, ColorTranslator.
ToWin32
(BackColor));
winforms\Managed\System\WinForms\ToolTip.cs (4)
225
UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPBKCOLOR, ColorTranslator.
ToWin32
(backColor), 0);
290
UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPTEXTCOLOR, ColorTranslator.
ToWin32
(foreColor), 0);
929
UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPBKCOLOR, ColorTranslator.
ToWin32
(BackColor), 0);
932
UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPTEXTCOLOR, ColorTranslator.
ToWin32
(ForeColor), 0);
winforms\Managed\System\WinForms\TreeView.cs (8)
212
SendMessage(NativeMethods.TVM_SETBKCOLOR, 0, ColorTranslator.
ToWin32
(BackColor));
465
SendMessage(NativeMethods.TVM_SETTEXTCOLOR, 0, ColorTranslator.
ToWin32
(ForeColor));
876
SendMessage(NativeMethods.TVM_SETLINECOLOR, 0, ColorTranslator.
ToWin32
(lineColor));
2006
SendMessage(NativeMethods.TVM_SETBKCOLOR, 0, ColorTranslator.
ToWin32
(c));
2010
SendMessage(NativeMethods.TVM_SETTEXTCOLOR, 0, ColorTranslator.
ToWin32
(c));
2014
SendMessage(NativeMethods.TVM_SETLINECOLOR, 0, ColorTranslator.
ToWin32
(lineColor));
2781
nmcd.clrText = ColorTranslator.
ToWin32
(riFore);
2785
nmcd.clrTextBk = ColorTranslator.
ToWin32
(riBack);
System.Workflow.ComponentModel (1)
AuthoringOM\Design\DesignerHelpers.cs (1)
1114
IntPtr penPtr = NativeMethods.ExtCreatePen(NativeMethods.PS_COSMETIC | NativeMethods.PS_USERSTYLE | penStyle, 1, new NativeMethods.LOGBRUSH(NativeMethods.BS_SOLID, ColorTranslator.
ToWin32
(pen.Color), 0), 2, new int[] { 1, 1 });