Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Screen Resolution in Vb.net

Status
Not open for further replies.

JohnVogel

Programmer
Apr 19, 1999
117
US
I'm trying to programmatically set the screen resolution in VB .net but can't figure it out. I've googled all over the web, scoured the newsgroups, but the only thing I found was a program that supposedly does this, but seems to not work at all in VB.Net... funny thing this program is in most of the VB.Net forums I've looked in, but I'm pretty sure it's NOT compatible, simple because one of the lines in the declarations portion is "Public Type DEVMODE" and VB .net tells me that Type is no longer supported... so anyway, does ANYBODY know how to change the screen resolution in VB .net?

TIA

-+{John Vogel}+-


 
This is a VB (not .NET) solution - it should be sufficient to just change Type to Structure

IMPORTANT - to prevent the compiler from auto aligning the structure for "efficiency" use:

<StructLayout(LayoutKind.Explicit)> _
Structure DEVMODE
....
....
....
End Structure



Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top