CoderSource.net
Search
Re: Reset Display screens by C# program.
Started by wejofost at 08-09-2005 3:11 PM. Topic has 1 replies.

Print Search « Previous Thread Next Thread »
   08-09-2005, 3:11 PM
wejofost is not online. Last active: 8/9/2005 8:05:02 PM wejofost

Top 25 Posts
Joined on 08-09-2005
Posts 2
Angry [:@] Reset Display screens by C# program.

In C# I can get the current screen size by using

SystemInformation.PrimaryMonitorSize.Height;

SystemInformation.PrimaryMonitorSize.Width;

But how can I reset the display size to a different value??

Wej Of OST


   Report 
   12-07-2005, 7:37 AM
majidbhutta is not online. Last active: 11/22/2005 4:34:09 PM majidbhutta

Top 25 Posts
Joined on 11-22-2005
Posts 4
Re: Reset Display screens by C# program.

Actualy so for as i know there is no builtin functionality in .Net to change display settings. To change settings u will have to use PInvokea dll i think user32.dll. import that dll in ur program and use its functions

 

BOOL EnumDisplaySettings(
  LPCTSTR lpszDeviceName,  // display device
  DWORD iModeNum,          // graphics mode
  LPDEVMODE lpDevMode      // graphics mode settings
)

for display and to change display

LONG ChangeDisplaySettings(
  LPDEVMODE lpDevMode,  // graphics mode
  DWORD dwflags         // graphics mode options
);

for more info on these functions and how to use seach these function in MSDN disabling all the search Filters

Hope this help.


   Report 
Codersource.Net » Programming » C# Programming » Re: Reset Display screens by C# program.

MENU
Home
MFC 
C++
.Net
WIN32
Programming
Forum
My Articles
Welcome to Codersource.Net Login | Register | Faq  

Google
 

NOTES:


Thanks for visiting our CoderSource.net. This site will be improved with more articles. Interested visitors can also submit their articles through the Submit Article link.Your article will also be published after due consideration by the editor. 

© Copyright 2003. All rights on content reserved by CoderSource.net. Contact    About Us