In VB 6:
Public Declare Function GetSystemMetrics Lib "user32.dll" (ByVal nIndex As
Long) As Long
Public Const SM_CXSCREEN = 0
Public Const SM_CYSCREEN = 1
Public Function HaveRez(ByVal lngpixelW As Long, lngpixelH As Long) As
Boolean
Dim lngTwipsX As Long, lngTwipsY As Long
HaveRez = False
lngTwipsX = GetSystemMetrics(SM_CXSCREEN)
lngTwipsY = GetSystemMetrics(SM_CYSCREEN)
If lngTwipsX >= lngpixelW And lngTwipsY >= lngpixelH Then
HaveRez = True
End If
End Function
'Then I use intScreenResolution to return multiplier from Select Case. It
will be used to resize and reposition controls on all forms in my
application.
Vlad
"Ivan" <firez...@nil.vv> wrote in message
news:OtVlBK4BCHA.2688@tkmsftngp05...
ScreenPixelWidth =
VB6.PixelsToTwipsX(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width) \
VB6.TwipsPerPixelX
dim ScreenPixelHeight() As Short
ScreenPixelHeight =
VB6.PixelsToTwipsY(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height)
\ VB6.TwipsPerPixelY
Hope this helps
Rohit
"Vlad" <v.ch...@verizon.net> wrote in message
news:eWPNuR4BCHA.2596@tkmsftngp05...
Dim XRes As Short = _
System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width
Dim YRes As Short = _
System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height
Debug.WriteLine("The Screen Resolution is " & Xres & "x" & YRes & ".")
You'd be surprised all you can find in the .NET Framework that really is
usefull.
Christopher M. Piper
"Ivan" <firez...@nil.vv> wrote in message
news:uVua7VDCCHA.2540@tkmsftngp05...