Loading ...
Sorry, an error occurred while loading the content.

screen resolution

Expand Messages
  • magdy ragab
    how can I adjust the screen resoltion using API or DLL ? Thanx. [Non-text portions of this message have been removed]
    Message 1 of 4 , Sep 30, 2006
    • 0 Attachment
      how can I adjust the screen resoltion using API or DLL ?
      Thanx.



      [Non-text portions of this message have been removed]
    • pendl2megabit
      Message 2 of 4 , Oct 3, 2006
      • 0 Attachment
        >
        > how can I adjust the screen resoltion using API or DLL ?
        > Thanx.
        >

        As a start here is a demo to read out any resolution that the current
        graphic card and the monitor is capable of.

        Was only tested on WinXP SP2, but should work on Win9x and others too.

        Please test on Win9x/Me or WinNT/2000 and post the results here.

        '---code start
        struct lpDevMode, _
        dmDeviceName$ as char[32],_
        dmSpecVersion as word,_
        dmDriverVersion as word,_
        dmSize as word,_
        dmDriverExtra as word,_
        dmFields as ulong,_
        dmPositionX as long,_
        dmPositionY as long,_
        dmDisplayOrientation as ulong,_
        dmDisplayFixedOutput as ulong,_
        dmColor as short,_
        dmDuplex as short,_
        dmYResolution as short,_
        dmTTOption as short,_
        dmCollate as short,_
        dmFormName$ as char[32],_
        dmLogPixels as word,_
        dmBitsPerPel as ulong,_
        dmPelsWidth as ulong,_
        dmPelsHeight as ulong,_
        dmDisplayFlags as ulong,_
        dmDisplayFrequency as ulong,_
        dmICMMethod as ulong,_
        dmICMIntent as ulong,_
        dmMediaType as ulong,_
        dmDitherType as ulong,_
        dmReserved1 as ulong,_
        dmReserved2 as ulong,_
        dmPanningWidth as ulong,_
        dmPanningHeight as ulong

        dmSize = len(lpDevMode.struct)

        ModeID = 0

        while EnumDisplaySettings("", ModeID) <> 0
        print "Mode "; using("###", ModeID)
        print " Bits per Pixel ...... "; _
        using("########", lpDevMode.dmBitsPerPel.struct)
        print " Pixels Width ........ "; _
        using("########", lpDevMode.dmPelsWidth.struct)
        print " Pixels Hight ........ "; _
        using("########", lpDevMode.dmPelsHeight.struct)
        print " Display Flags ....... "; _
        using("########", lpDevMode.dmDisplayFlags.struct)
        print " Display Frequency ... "; _
        using("########", lpDevMode.dmDisplayFrequency.struct)
        print

        ModeID = ModeID + 1
        wend

        print "Finished ..."
        end

        function EnumDisplaySettings(lpszDeviceName$, iModeNum)
        if lpszDeviceName$ = "" then
        'get information about the default display
        lpszDeviceName = _NULL

        calldll #user32, "EnumDisplaySettingsA",_
        lpszDeviceName as ulong,_
        iModeNum as ulong,_
        lpDevMode as struct,_
        EnumDisplaySettings as boolean
        else
        calldll #user32, "EnumDisplaySettingsA",_
        lpszDeviceName$ as ptr,_
        iModeNum as ulong,_
        lpDevMode as struct,_
        EnumDisplaySettings as boolean
        end if
        end function
        '---code end

        ---
        Stefan Pendl



        ___________________________________________________________
        Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
      • Joel Walker
        I have a need to remotely control an LB program via a web browser. Is there a repository of code/snippets which will help in generating browser (i.e. HTML)
        Message 3 of 4 , Oct 3, 2006
        • 0 Attachment
          I have a need to remotely control an LB program via a web browser. Is
          there a repository of code/snippets which will help in generating
          browser (i.e. HTML) compatible code via LB to do this?
        • zoomkat
          ... You might look at the below discussion group for some internet applications. There may be some work arounds using a web server depending on what your
          Message 4 of 4 , Oct 4, 2006
          • 0 Attachment
            --- In libertybasic@yahoogroups.com, "Joel Walker" <jwalker@...> wrote:
            >
            > I have a need to remotely control an LB program via a web browser. Is
            > there a repository of code/snippets which will help in generating
            > browser (i.e. HTML) compatible code via LB to do this?
            >

            You might look at the below discussion group for some internet
            applications. There may be some work arounds using a web server
            depending on what your liberty basic application is to do.
          Your message has been successfully submitted and would be delivered to recipients shortly.