` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Windows API: Change or detect screen resolution (2)
2003-01-26 -- Arnor Baldvinsson
 
Newsgroups: comp.lang.clarion Hi Chris, On Sun, 26 Jan 2003 05:28:24 GMT, arnor@icetips.com (Arnor Baldvinsson) wrote: >some Delphi code from: And some VB code from: http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarvbtips/html/msdn_msdn204.asp Using www.google.com searching for "changing screen resolution in code" without quotation marks, results in about 238,000 results and the first page of results looks pretty good to me:) The VB code is very easy to follow and converts easily to Clarion. Const CCDEVICENAME = 32 etc. would become: CCDEVICENAME EQUATE(32) CCFORMNAME EQUATE(32) DM_PELSWIDTH EQUATE(80000h) DM_PELSHEIGHT EQUATE(100000h) Private Type DEVMODE dmDeviceName As String * CCDEVICENAME dmSpecVersion As Integer dmDriverVersion As Integer ... would become: DEVMODE GROUP,Type dmDeviceName CString(CCDEVICENAME) ! Or Byte,Dim(CCDEVICENAME) dmSpecVersion Word dmDriverVersion Word ... Private Sub Command1_Click() Dim a As Boolean Dim i& i = 0 Do a = EnumDisplaySettings(0&, i&, DevM) i = i + 1 Loop Until (a = False) End Sub would become something like this: DevM DEVMODE i DWORD a BOOLEAN S CString(1) b Long Code i = 0 Loop Until (a = False) a = EnumDisplaySettings(S, i, DevM) i =+ 1 End And this: Private Sub Command2_Click() Dim b& DevM.dmFields = DM_PELSWIDTH Or DM_PELSHEIGHT DevM.dmPelsWidth = 800 DevM.dmPelsHeight = 600 b = ChangeDisplaySettings(DevM, 0) End Sub would be added to the above Clarion code like this: DevM.dmFields = BOR(DM_PELSWIDTH,DM_PELSHEIGHT) ! I Think... DevM.dmPelsWidth = 800 DevM.dmPelsHeight = 600 b = ChangeDisplaySettings(DevM, 0) I think the prototypes for the functions are in the API viewer thingy that comes with Clarion. Best regards, ArnĂ³r Baldvinsson


Today is December 3, 2024, 12:00 pm
This article has been viewed 35323 times.
Google search has resulted in 217 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: