Graphics and Multimedia Topics include: GDI+, drawing 2D/3D, printing and Managed DirectX and the XNA Framework

Go Back  Xtreme .NET Talk > .NET > Graphics and Multimedia > Re: VB.NET --> Screen Resolution Change Example Complete!


Reply
 
Thread Tools Display Modes
  #1  
Old 04-28-2010, 09:18 AM
camps22 camps22 is offline
Newcomer
 
Join Date: Apr 2010
Posts: 1
camps22 is on a distinguished road
Default Re: VB.NET --> Screen Resolution Change Example Complete!



Split from http://www.xtremedotnettalk.com/showthread.php?t=80165.

it works like a charm for me in 8 different pcs, wonderful code, as we say in my country of origin, "¡te vaciaste!" ("you emptied yourself!") however one pc, at home, HP Pavilion Elite DT 2.50GHz, 1 Terabyte, windows 7, lresult = -2, change failed, why? might it be a authorization issue? how can i grant permission to change resolution? thank you.

Last edited by snarfblam; 04-28-2010 at 01:55 PM. Reason: New questions or replies to very old topics should go in a new thread with a link to the old. Thanks!
Reply With Quote
  #2  
Old 04-28-2010, 02:00 PM
snarfblam's Avatar
snarfblam snarfblam is offline
Ultimate Contributor

Preferred language:
C#, VB
 
Join Date: Jun 2003
Location: USA
Posts: 2,097
snarfblam will become famous soon enough
Default Re: VB.NET --> Screen Resolution Change Example Complete!

The documentation from MSDN explains the parameters and, more importantly, the return value.

The -2 is DISP_CHANGE_BADMODE (from http://www.mrexcel.com/forum/showthread.php?t=10616 via google).

MSDN states that this return value indicates:
Quote:
An invalid set of flags was passed in
.
__________________
e
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VB.NET --> Screen Resolution Change Example Complete! joshuaand Interoperation / Office Integration 11 07-06-2011 07:29 AM
Screen Resolution - Detect Change In Toby Twerl Windows Forms 2 04-16-2010 11:08 AM
Change screen resolution with vb. net? AlexMesquita Windows Forms 2 01-11-2004 11:17 PM
screen resolution change cartque Graphics and Multimedia 1 07-02-2003 09:07 AM
api screen resolution change malooga General 1 02-13-2003 05:58 PM

Advertisement:







Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe