Results 1 to 6 of 6

Thread: Screen Resize Issues

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member Blinky Bill's Avatar
    Join Date
    Mar 2002
    Location
    Happily munching on the greenery in your garden
    Posts
    349

    Screen Resize Issues

    Hey Guys,
    I got some code from this forum to resize the screen to a specific size that i specify. I have attached the .bas file for your perusal. My problem is that i need the code to resize the screen to 1024x768 if the current size is smaller. The program is supposed to either resize the screen or abort execution if it cannot. This is the code i use to do it
    VB Code:
    1. Public Sub ResizeScreenTo1024()
    2.     Dim r As Integer
    3.    
    4.     'try to set the screen res here
    5.     'get the screen resolution and color depth
    6.     originalResolution = GetScreenResolution()
    7.     originalDepth = GetAvailableColours()
    8.    
    9.     xOriginalWidth = GetCurrentXSetting
    10.     yOriginalWidth = GetCurrentYSetting
    11.    
    12.     'try to change the resolution to 1024 x 768 with 32,24,16,8,4 until success
    13.     If (xOriginalWidth < 1024) And (yOriginalWidth < 768) Then
    14.         Call ChangeScreenSettings(1024, 768, 32)
    15.         If changeSuccessful = False Then
    16.             '32 failed, try 24
    17.             Call ChangeScreenSettings(1024, 768, 24)
    18.             If changeSuccessful = False Then
    19.                 '24 failed, try 16
    20.                 Call ChangeScreenSettings(1024, 768, 16)
    21.                 If changeSuccessful = False Then
    22.                     '16 failed, try 8
    23.                     Call ChangeScreenSettings(1024, 768, 8)
    24.                     If changeSuccessful = False Then
    25.                         '8 failed, try 4
    26.                         Call ChangeScreenSettings(1024, 768, 4)
    27.                         If changeSuccessful = False Then
    28.                             r = MsgBox("Your computer cannot operate this software.", vbCritical, "VideoVision 1.0")
    29.                         End If
    30.                     End If
    31.                 End If
    32.             End If
    33.         End If
    34.     End If
    35. End Sub

    Now what actually happens is that on some computers the screen doesn't actually change size, but the program begins execution, when it should abort. Also on some computers, the screen sometimes resizes and sometimes doesn't. Is it possible that this code is the cause of this? Or is it more likely to be an individual computer issue? If so, is there some more dynamic code to resize the screen of these computers?

    Hoping someone can help,

    Regards
    Attached Files Attached Files
    We don't know what's wrong. . . So the best bet might be to remove something surgically.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width