ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   UserForm determine WinXP windows style (https://www.excelbanter.com/excel-programming/326086-userform-determine-winxp-windows-style.html)

Reinhard Thomann

UserForm determine WinXP windows style
 
my application resizes the height of aUserForm.
I have problems with Windows XP, because the height of the title bar
(caption) differs if XP or Classic-style is selected in display settings.

I need a function to determine the real height of a UserForm or windows
style (XP or classic) to react with suitable UserForm height values.

TIA
Reinhard Thomann



K Dales[_2_]

UserForm determine WinXP windows style
 
Good question, Reinhard: wish I had the answer, but I think it will be
something you need to get through the Windows API library. Have not found
the proper call yet, but I will at least give you a link where you can go do
some research
http://msdn.microsoft.com/library/de...y_category.asp
This shows how to access and set various Windows settings through your code.
Perhaps someone else out there already knows the proper call to find if
WIndows is using the XP or "regular" window style.

"Reinhard Thomann" wrote:

my application resizes the height of aUserForm.
I have problems with Windows XP, because the height of the title bar
(caption) differs if XP or Classic-style is selected in display settings.

I need a function to determine the real height of a UserForm or windows
style (XP or classic) to react with suitable UserForm height values.

TIA
Reinhard Thomann




TroyW[_2_]

UserForm determine WinXP windows style
 
Reinhard,

See if this MSKB article helps.
http://support.microsoft.com/?kbid=210603

Troy

"Reinhard Thomann" wrote in message
...
my application resizes the height of aUserForm.
I have problems with Windows XP, because the height of the title bar
(caption) differs if XP or Classic-style is selected in display settings.

I need a function to determine the real height of a UserForm or windows
style (XP or classic) to react with suitable UserForm height values.

TIA
Reinhard Thomann




Reinhard Thomann

UserForm determine WinXP windows style
 
Many thanks, i got the answer:-)
Reinhard

Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As
Long) As Long
Private Const mlSM_CYSIZE = 31

Function bIsXPStyle() As Boolean
On Error Resume Next
bIsXPStyle = (CLng(GetSystemMetrics(mlSM_CYSIZE)) = 25)
End Function


"K Dales" schrieb im Newsbeitrag
...
Good question, Reinhard: wish I had the answer, but I think it will be
something you need to get through the Windows API library. Have not found
the proper call yet, but I will at least give you a link where you can go
do
some research:
http://msdn.microsoft.com/library/de...y_category.asp
This shows how to access and set various Windows settings through your
code.
Perhaps someone else out there already knows the proper call to find if
WIndows is using the XP or "regular" window style.

"Reinhard Thomann" wrote:

my application resizes the height of aUserForm.
I have problems with Windows XP, because the height of the title bar
(caption) differs if XP or Classic-style is selected in display settings.

I need a function to determine the real height of a UserForm or windows
style (XP or classic) to react with suitable UserForm height values.

TIA
Reinhard Thomann







All times are GMT +1. The time now is 10:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com