Click here to Skip to main content
15,925,602 members
Home / Discussions / C#
   

C#

 
GeneralRe: Double buffer HELL Pin
Andres Manggini26-Apr-02 15:13
Andres Manggini26-Apr-02 15:13 
GeneralRe: Double buffer HELL Pin
Tim Smith26-Apr-02 13:26
Tim Smith26-Apr-02 13:26 
GeneralRe: Double buffer HELL Pin
James T. Johnson26-Apr-02 16:19
James T. Johnson26-Apr-02 16:19 
GeneralChange resolution Pin
Christian Graus25-Apr-02 11:52
protectorChristian Graus25-Apr-02 11:52 
GeneralRe: Change resolution Pin
Neil Van Note25-Apr-02 13:04
Neil Van Note25-Apr-02 13:04 
GeneralRe: Change resolution Pin
Christian Graus26-Apr-02 0:21
protectorChristian Graus26-Apr-02 0:21 
GeneralRe: Change resolution Pin
James T. Johnson26-Apr-02 0:51
James T. Johnson26-Apr-02 0:51 
GeneralRe: Change resolution Pin
James T. Johnson26-Apr-02 1:16
James T. Johnson26-Apr-02 1:16 
public const int CCHDEVICENAME = 32;
public const int CCHFORMNAME = 32;

[StructLayout(LayoutKind.Sequential)] 
public  struct DEVMODE{
[MarshalAs(UnmanagedType.ByValTStr,SizeConst:= CCHDEVICENAME)]
public string  dmDeviceName;
public int  dmSpecVersion;
public int  dmDriverVersion;
public int  dmSize;
public int  dmDriverExtra;
public int  dmFields;
public int  dmOrientation;
public int  dmPaperSize;
public int  dmPaperLength;
public int  dmPaperWidth;
public int  dmScale;
public int  dmCopies;
public int  dmDefaultSource;
public int  dmPrintQuality;
public int  dmColor;
public int  dmDuplex;
public int  dmYResolution;
public int  dmTTOption;
public int  dmCollate;
[MarshalAs(UnmanagedType.ByValTStr,SizeConst:= CCHFORMNAME)]
public string  dmFormName;
public int  dmUnusedPadding;
public int  dmBitsPerPel;
public int  dmPelsWidth;
public int  dmPelsHeight;
public int  dmDisplayFlags;
public int  dmDisplayFrequency;
}
 
[DllImport("user32.dll")]
public static int ChangeDisplaySettingsEx(
	[MarshalAs(UnmangagedType.LPTStr)] string lpszDeviceName, 
	ref DEVMODE lpDevMode, IntPtr hwnd, int flags, 
	IntPtr lParam);
This should work, but of course its untested and may need some tweaking here and there Poke tongue | ;-P

James

Simplicity Rules!
GeneralRe: Change resolution Pin
Christian Graus26-Apr-02 1:30
protectorChristian Graus26-Apr-02 1:30 
GeneralRe: Change resolution Pin
James T. Johnson26-Apr-02 1:49
James T. Johnson26-Apr-02 1:49 
GeneralRe: Change resolution Pin
Neil Van Note26-Apr-02 9:00
Neil Van Note26-Apr-02 9:00 
GeneralRe: Change resolution Pin
Neil Van Note26-Apr-02 13:10
Neil Van Note26-Apr-02 13:10 
GeneralRe: Change resolution Pin
Christian Graus26-Apr-02 13:17
protectorChristian Graus26-Apr-02 13:17 
GeneralRe: Change resolution Pin
Neil Van Note26-Apr-02 13:31
Neil Van Note26-Apr-02 13:31 
GeneralNonClient/Client Areas Pin
Gary Ranson25-Apr-02 6:30
Gary Ranson25-Apr-02 6:30 
GeneralRe: NonClient/Client Areas Pin
James T. Johnson25-Apr-02 7:32
James T. Johnson25-Apr-02 7:32 
GeneralWndProc Question Pin
Nick Parker25-Apr-02 5:48
protectorNick Parker25-Apr-02 5:48 
GeneralRe: WndProc Question Pin
Corto Maltese25-Apr-02 6:30
Corto Maltese25-Apr-02 6:30 
GeneralRe: WndProc Question Pin
Nick Parker25-Apr-02 6:36
protectorNick Parker25-Apr-02 6:36 
GeneralDatagrid Custom Draw Pin
Mazdak25-Apr-02 3:54
Mazdak25-Apr-02 3:54 
GeneralRe: Datagrid Custom Draw Pin
James T. Johnson25-Apr-02 17:42
James T. Johnson25-Apr-02 17:42 
QuestionHow to get an running object instance Pin
Leesen25-Apr-02 3:51
Leesen25-Apr-02 3:51 
AnswerRe: How to get an running object instance Pin
Leesen25-Apr-02 16:23
Leesen25-Apr-02 16:23 
Generalwhy it displays following error message?and how to solve it?thanks! Pin
zhoujun25-Apr-02 2:39
zhoujun25-Apr-02 2:39 
GeneralRe: why it displays following error message?and how to solve it?thanks! Pin
Nick Parker25-Apr-02 2:50
protectorNick Parker25-Apr-02 2:50 

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.