17-12-2007, 07:36 PM
Hello, I am trying to load a GUI into a form's background image and then set the form's width and height to that of the picture. I have the actually loading the GUI done, but when I try to load the width and height, it sets it incorrectly. Meaning, it makes both to big. Here is my code
In frmMainMenu I use this call:
Any tips on loading the correct width and height?
Code:
Sub LoadGui(ByVal curForm As Form, ByVal locGUI As String)
curForm.Picture = LoadPicture(App.Path & GFX_GUI & locGUI)
curForm.Width = curForm.Picture.Width
curForm.Height = curForm.Picture.Height
End Sub
In frmMainMenu I use this call:
Code:
Private Sub Form_Load()
Call LoadGui(Me, "menu.bmp")
End Sub
Any tips on loading the correct width and height?