Hey there, everyone!
So, this is what's going on. I'm supposed to have a playable demo of a simple 2D Side-Scroller written with Visual Basic 6 by next week for my game programming class.
Recently, I decided to modify the main form's height and width via code (So the game can adapt to your screen size, if desired). Everything was going OK, until, for no apparent reason, the program started to interpret the pixel size I give in twips.
Help, please.
![]()
To the left is the game form, and to the right is the debugger form I made for the occasion.
And, here is the form_load event code:
So, this is what's going on. I'm supposed to have a playable demo of a simple 2D Side-Scroller written with Visual Basic 6 by next week for my game programming class.
Recently, I decided to modify the main form's height and width via code (So the game can adapt to your screen size, if desired). Everything was going OK, until, for no apparent reason, the program started to interpret the pixel size I give in twips.
Help, please.

To the left is the game form, and to the right is the debugger form I made for the occasion.
And, here is the form_load event code:
Code:
Private Sub Form_Load()
' ____________________
' The following is used for testing purposes
Debug.Print ""
Game_Name = "Game Name"
Screen_Fullscreen = False
Screen_Width = Screen.Width
Screen_Height = Screen.Height
Map_Tile_X = 16
Map_Tile_Y = 16
Map_Max_X = 25
Map_Max_Y = 25
' ___________________
' Set form properties
Me.Caption = Game_Name
Me.ScaleMode = 3 ' Pixel
If Screen_Fullscreen = True Then
Me.Width = Screen_Width
Me.Height = Screen_Height
Me.WindowState = 2 ' Maximized
Else
Me.Width = (Map_Tile_X * Map_Max_X)
Me.Height = (Map_Tile_Y * Map_Max_Y)
End If
End Sub