Post Reply

Forums -> Multiple monitors -> Change display settings for second monitor
Subir Kumar   2003-04-28 04:13
hi,
I am trying to programmatically change the display settings for my second montior in a dual montiro system in Windows XP. I am using the following command as given by Microsoft.

Private Declare Function ChangeDisplaySettingsEx Lib "user32" Alias "ChangeDisplaySettingsExA" (lpszDeviceName As Any, lpDevMode As Any, ByVal hWnd As Long, ByVal dwFlags As Long, lParam As Any) As Long

in this the first variable lpszDeviceName has to be a pointer to a null-terminated string that specifies the display device. display device names as returned by EnumDisplayDevices are valid

I have tried all posiiblities of the name being returned from EnumDisplayDevices,but can do that. If Byval 0& is used ,that is null then it changes that of the default one,but i am not able to get it to change that of the second one.

Please help,i have been stuck on this for a longitme now

subir
Forums -> Multiple monitors -> Change display settings for second monitor

Post Reply