Resolution Friendly App.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ali Rizwan
    Banned
    Contributor
    • Aug 2007
    • 931

    Resolution Friendly App.

    Hi all,
    i m having a problem i have made my app in 1152 x 864 resolution. Now i want to make it resolution friendly the only problem i m having is with Start menu, and other menus. If user sets the screen resolution to 800x600 the start menu doesnot appears full. Some of contents hided...
    Plz give some suggestions.

    Thanx
    >> ALI <<
  • vdraceil
    New Member
    • Jul 2007
    • 236

    #2
    Hi,look whether the link below is of some help..

    Comment

    • jamesd0142
      Contributor
      • Sep 2007
      • 471

      #3
      Just forget trying to use the API to change the display mode. Instead:

      1. Add a COM reference to 'DirectX 7 for Visual Basic Type library'

      2. At the top of your code for your main form, before the class declaration, add 'Imports DxVbLib'

      3. After the class declaration, add:

      Dim dx as New DirectX7

      Dim dd as DirectDraw7

      4. Add the following code to your Form_Load event handler:

      dd=dx.DirectDra wCreate("")

      dd.setDisplayMo de(800,600,16,0 ,CONST_DDSDMFLA GS.DDSDM_DEFAUL T)

      Note: Change '800' to the desired width of the display mode, '600' should be the height, and '16' should be the color depth.

      Example



      Imports DxVBLib

      Public Class frmMain

      Dim dx As New DirectX7

      Dim dd As DirectDraw7

      Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load

      Me.Show()

      dd = dx.DirectDrawCr eate("")

      dim Height as Integer

      dim Width as Integer

      dim Depth as Integer

      Height=600 ' Change this to the correct number

      Width=800 ' Change this to the correct number

      Depth=16 ' Change this to the correct number

      dd.SetDisplayMo de(Height, Width, Depth, 0, CONST_DDSDMFLAG S.DDSDM_DEFAULT )

      End Sub

      End Class



      SOURCE: http://forums.msdn.mic rosoft.com/en-US/vbgeneral/thread/347be7c2-3851-4775-bad5-4b9b7cd06677/

      Comment

      • Ali Rizwan
        Banned
        Contributor
        • Aug 2007
        • 931

        #4
        Originally posted by jamesd0142
        Just forget trying to use the API to change the display mode. Instead:

        1. Add a COM reference to 'DirectX 7 for Visual Basic Type library'

        2. At the top of your code for your main form, before the class declaration, add 'Imports DxVbLib'

        3. After the class declaration, add:

        Dim dx as New DirectX7

        Dim dd as DirectDraw7

        4. Add the following code to your Form_Load event handler:

        dd=dx.DirectDra wCreate("")

        dd.setDisplayMo de(800,600,16,0 ,CONST_DDSDMFLA GS.DDSDM_DEFAUL T)

        Note: Change '800' to the desired width of the display mode, '600' should be the height, and '16' should be the color depth.

        Example



        Imports DxVBLib

        Public Class frmMain

        Dim dx As New DirectX7

        Dim dd As DirectDraw7

        Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load

        Me.Show()

        dd = dx.DirectDrawCr eate("")

        dim Height as Integer

        dim Width as Integer

        dim Depth as Integer

        Height=600 ' Change this to the correct number

        Width=800 ' Change this to the correct number

        Depth=16 ' Change this to the correct number

        dd.SetDisplayMo de(Height, Width, Depth, 0, CONST_DDSDMFLAG S.DDSDM_DEFAULT )

        End Sub

        End Class



        SOURCE: http://forums.msdn.mic rosoft.com/en-US/vbgeneral/thread/347be7c2-3851-4775-bad5-4b9b7cd06677/
        Thanx a lot...
        I was using API to change the screen resolution..
        Now i think i should change it by direcx.

        Thanx
        >> ALI <<

        Comment

        • vdraceil
          New Member
          • Jul 2007
          • 236

          #5
          Can anyone explain me-what is DirectX??

          Comment

          Working...