Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Adam,
Glad the solution passed the first hurdle <g. Just to explain the difference. The API wizard, accurately, defines the function as: Private Declare Function ChangeDisplaySettings Lib "user32" _ Alias "ChangeDisplaySettingsA" _ (lpDevMode As Any, _ ByVal dwFlags As Long) As Long The first parameter is passed by reference (i.e. a pointer in C parlance). API calls are treated by the O/S using C language. In C Null is the *value* 0. When you pass in 0& (unqualified), which is what vbNullString evaluates to, you are telling the O/S to reference the memory at address 0 (sadly this is the start of the O/S memory and unless your computer is in a sad state its value will not be zero!). By changing the call to ByVal 0& you overwrite the function declaration and tell the O/S to use the value 0 which is correctly interpreted as Null. Best wishes, Peter Beach "adam99 " wrote in message ... Thanks for replying Peter, it works well on my PC(further testing on other OS will be required). I really don't like changing the screen resolutioin but at the moment I can't get around it. I will have to put some error handling for situations where reboots are required & those similair to your LCD monitor. Thanks Again, Adam.:) --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Status bar disappears when restoring screen size | Excel Discussion (Misc queries) | |||
Need to convert point on screen to various screen resolutions | Excel Discussion (Misc queries) | |||
How to position form in same place with different screen resolutions | Excel Programming | |||
Resizing BackgroundPicture Gifs programmatically for varying screen resolutions | Excel Programming | |||
different screen resolutions | Excel Programming |