Code archives/Graphics/Mimic Desktop Resolution (Requires "user32.dll")
This code has been declared by its author to be Public Domain code.
Download source code
| This short function makes use of the GetSystemMetrics functionality of User32.dll Unless you have a more comprehensive decls file, I have included just the relevant part. All it does is simply grab the Desktop Resolution (No Bits per Pixel Depth yet, unfortunately - so the BitDepth is kept as a parameter) and sets the Graphics Mode to the same size. |
.lib "user32.dll" GetSystemMetrics% (nIndex%) : "GetSystemMetrics" _________________________________________________________ Function SetResolution3D(nBit_Depth=32,nWindow_Mode=0) Graphics3D GetSystemMetrics(16),GetSystemMetrics(1),nBit_Depth,nWindow_Mode End Function Function SetResolution(nBit_Depth=32,nWindow_Mode=0) Graphics GetSystemMetrics(16),GetSystemMetrics(1),nBit_Depth,nWindow_Mode End Function |
Comments
None.
Code Archives Forum