Friend Class Form1 Inherits System.Windows.Forms.Form Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Integer) As Integer Private Const SM_CXSCREEN As Short = 0 Private Const SM_CYSCREEN As Short = 1 Private Sub Form1_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load Dim wid As Integer Dim hgt As Integer ' Get the screen's size including the task bar area. wid = GetSystemMetrics(SM_CXSCREEN) hgt = GetSystemMetrics(SM_CYSCREEN) ' Make the form this size. 'UPGRADE_ISSUE: Constant vbTwips was not upgraded. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="55B59875-9A95-4B71-9D6A-7C294BF7139D"' 'UPGRADE_ISSUE: Constant vbPixels was not upgraded. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="55B59875-9A95-4B71-9D6A-7C294BF7139D"' 'UPGRADE_ISSUE: Form method Form1.ScaleY was not upgraded. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="CC4C7EC0-C903-48FC-ACCC-81861D12DA4A"' 'UPGRADE_ISSUE: Form method Form1.ScaleX was not upgraded. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="CC4C7EC0-C903-48FC-ACCC-81861D12DA4A"' SetBounds(0, 0, VB6.TwipsToPixelsX(ScaleX(wid, vbPixels, vbTwips)), VB6.TwipsToPixelsY(ScaleY(hgt, vbPixels, vbTwips))) End Sub End Class
I want my form to fill the entire screen, the code above was copied from a website. This doesn't seem to work in VB2008 express. BTW, I did "Click for more" as instructed by the upgrader, but nothing happened. Is there another way to do this?

New Topic/Question
Reply




MultiQuote





|