What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » [SOLVED] Visual Basic Question - MaxWidth...

[SOLVED] Visual Basic Question - MaxWidth...
Author: Message:
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. [SOLVED] Visual Basic Question - MaxWidth...
Ok whats the code for the maximum width of the screen and the maximum height of the screen? I tryed MaxWidth and MaxHeight and that didn't seem to work.

This post was edited on 11-02-2005 at 03:31 AM by DJeX.
[Image: top.gif]
11-02-2005 02:05 AM
Profile PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Visual Basic Question - MaxWidth...
What do you mean by maximum width/height of the screen?

The actual width/height of the working area (thus desktop minus taskbar)?
=> you need to use some Windows API to get it (SystemParametersInfo API with the constant SPI_GETWORKAREA)

The actual width/height of the desktop screen?
=> Screen.Width, Screen.Height

The actual width/height of a window/form?
=> Form1.Width, Form.Height


---------------

If you are searching for properties of objects, you can simply type an object's name, enter the point, and a dropdown list will be shown with all available properties... scroll that list and look at the names...

Also, check out the properties window of controls. They very clearly show each property of a control.

[Image: attachment.php?pid=503704]

This post was edited on 11-02-2005 at 02:25 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
11-02-2005 02:12 AM
Profile PM Find Quote Report
dotNorma
Veteran Member
*****

Avatar

Posts: 1745
Reputation: 17
32 / Male / –
Joined: May 2003
RE: Visual Basic Question - MaxWidth...
code:
Private Declare Function SystemParametersInfo Lib "user32" _
    Alias "SystemParametersInfoA" (ByVal uAction As Long, _
    ByVal uParam As Long, ByRef lpvParam As RECT, _
    ByVal fuWinIni As Long) As Long
Private Const SPI_GETWORKAREA = 48


Dim wa_info As RECT
Dim wa_wid As Single
Dim wa_hgt As Single

SystemParametersInfo(SPI_GETWORKAREA, 0, wa_info, 0)


For the work area, but most of this can be found by googling "vb work space" or such.

This post was edited on 11-02-2005 at 02:26 AM by dotNorma.
11-02-2005 02:25 AM
Profile PM Web Find Quote Report
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. RE: Visual Basic Question - MaxWidth...
quote:
Originally posted by CookieRevised
The actual width/height of the desktop screen?
=> Screen.Width, Screen.Height

Thats the one, thanks
[Image: top.gif]
11-02-2005 03:31 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On