mwam
asked on
setting desktop work area
hi...in the SystemParametersInfo call there's a
parameter called "SPI_SETWORKAREA". its used to set the
usable desktop area not including the system tray.
i need a complete example of how i can use this to fit
my own needs. example must leave nothing to my feeble
imagination...thats why its worth 200 pts. thanks :)
parameter called "SPI_SETWORKAREA". its used to set the
usable desktop area not including the system tray.
i need a complete example of how i can use this to fit
my own needs. example must leave nothing to my feeble
imagination...thats why its worth 200 pts. thanks :)
ASKER
must not be filling rectangle with coordinates correctly...this
is what i'm doing:
Dim n As Long
Dim rct As RECT
rct.Left = 100
rct.Top = 100
rct.Bottom = 700
rct.Right = 700
'Fill RECT with coordinates
n = SystemParametersInfo(SPI_S ETWORKAREA , 0, rct, 1)
i get a compiler error...type mismatch on "rct"
is what i'm doing:
Dim n As Long
Dim rct As RECT
rct.Left = 100
rct.Top = 100
rct.Bottom = 700
rct.Right = 700
'Fill RECT with coordinates
n = SystemParametersInfo(SPI_S
i get a compiler error...type mismatch on "rct"
you have to set the API as follow :
Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, ByVal fuWinIni As Long) As Long
Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, ByVal fuWinIni As Long) As Long
waty, read my answer again please. Try changing the 3rd parameter in the declare to RECT
ASKER
tried that..still doesn't work.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ahh....it works :)...at first didn't see that the declare was
different. ..thanks much
different. ..thanks much
He, That's the delcaration I have given you, I had tested it and worked.
I have given the answer before MikeP.
I have given the answer before MikeP.
ASKER
i see. i guess you deserve some points...but don't know
what can be done now. look for my next question, it'll
have your name in the subject.....thanks :)
what can be done now. look for my next question, it'll
have your name in the subject.....thanks :)
My declaration is different
ASKER
ok....anyone know where i can get an updated api32.txt ?
Public Const SPI_SETWORKAREA = 47
Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long
'Use this
Dim n as long
Dim rct as RECT
'Fill RECT with coordinates
n=SystemParametersInfo(SPI