Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
GeneralVideo card/screen resolution question... Pin
new_phoenix8-Feb-05 5:16
new_phoenix8-Feb-05 5:16 
GeneralRe: Video card/screen resolution question... Pin
Dave Kreskowiak8-Feb-05 6:26
mveDave Kreskowiak8-Feb-05 6:26 
GeneralRe: Video card/screen resolution question... Pin
new_phoenix8-Feb-05 7:47
new_phoenix8-Feb-05 7:47 
GeneralRe: Video card/screen resolution question... Pin
Dave Kreskowiak8-Feb-05 7:54
mveDave Kreskowiak8-Feb-05 7:54 
GeneralRe: Video card/screen resolution question... Pin
new_phoenix8-Feb-05 11:40
new_phoenix8-Feb-05 11:40 
GeneralRe: Video card/screen resolution question... Pin
Skynyrd8-Feb-05 13:34
Skynyrd8-Feb-05 13:34 
GeneralRe: Video card/screen resolution question... Pin
new_phoenix10-Feb-05 5:34
new_phoenix10-Feb-05 5:34 
GeneralRe: Video card/screen resolution question... Pin
Skynyrd10-Feb-05 6:33
Skynyrd10-Feb-05 6:33 
Would you also kindly write the above code using windows/object code rather than the command console?

The DirectX.DirectDraw.DisplayModesCollection collection contains all the information u need of the available modes of ur gfx card. U simply have to iterate through its members.

These members are DirectX.DirectDraw.SurfaceDescription objects which have all the information you are looking for through its properties:

Hieght (in pixels)
Width (in pixels)
RefreshRate
etc.

Basically each DirectX.DirectDraw.SurfaceDescription in the collection represents a possible screen mode in the clients computer.

I just used the console so u could visibly see some of the output the collection can give u, but its up to you and how you manage the DisplayModesCollection collection and the SurfaceDescription objects contained within to extract the information u need.

would also appreciate it if you would also write the code so that the code provides the "current" screen resolution that was "chosen" by the end user?

I think u are referring to the screen resolution the user is using when running ur app?

If so, u dont need directX for that:

System.Windows.Forms.Screen.PrimaryScreen.Bounds

or

System.Windows.Forms.SystemInformation.PrimaryMonitorSize

will give u the resolution (through Width and Height) of ur primary system monitor.
GeneralRe: Video card/screen resolution question... Pin
Daniel Turini8-Feb-05 16:04
Daniel Turini8-Feb-05 16:04 
QuestionHow to secure communication between server and client ? Pin
DR_CHAOS8-Feb-05 4:56
DR_CHAOS8-Feb-05 4:56 
GeneralFlat Date Time Picker Pin
ehammond8-Feb-05 4:46
ehammond8-Feb-05 4:46 
GeneralAdd Remove programmes Pin
exhaulted8-Feb-05 4:06
exhaulted8-Feb-05 4:06 
GeneralOwner process Pin
Anonymous8-Feb-05 3:56
Anonymous8-Feb-05 3:56 
GeneralRe: Owner process Pin
Judah Gabriel Himango8-Feb-05 4:52
sponsorJudah Gabriel Himango8-Feb-05 4:52 
GeneralC# From from Unmanaged C++ Pin
erik567898-Feb-05 3:53
erik567898-Feb-05 3:53 
GeneralRe: C# From from Unmanaged C++ Pin
Dave Kreskowiak8-Feb-05 4:40
mveDave Kreskowiak8-Feb-05 4:40 
GeneralRe: C# From from Unmanaged C++ Pin
erik567898-Feb-05 4:46
erik567898-Feb-05 4:46 
GeneralRe: C# From from Unmanaged C++ Pin
Judah Gabriel Himango8-Feb-05 4:47
sponsorJudah Gabriel Himango8-Feb-05 4:47 
GeneralRe: C# From from Unmanaged C++ Pin
mav.northwind8-Feb-05 5:06
mav.northwind8-Feb-05 5:06 
GeneralRe: C# From from Unmanaged C++ Pin
gcchopra8-Feb-05 23:12
gcchopra8-Feb-05 23:12 
GeneralSession_Close, also breakpts dont work Pin
Wilder Bellamy8-Feb-05 2:58
Wilder Bellamy8-Feb-05 2:58 
GeneralRe: Session_Close, also breakpts dont work Pin
Dave Kreskowiak8-Feb-05 4:04
mveDave Kreskowiak8-Feb-05 4:04 
GeneralIntellisense info Pin
V.8-Feb-05 2:51
professionalV.8-Feb-05 2:51 
GeneralRe: Intellisense info Pin
Stefan Troschuetz8-Feb-05 3:35
Stefan Troschuetz8-Feb-05 3:35 
GeneralRe: Intellisense info Pin
V.8-Feb-05 4:03
professionalV.8-Feb-05 4:03 

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.