Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use a formula to determine the Cell Style? Gerard Excel Discussion (Misc queries) 12 November 14th 07 06:31 PM
How to keep userform always on the top of all windows application JAtz_DA_WAY Excel Discussion (Misc queries) 1 August 31st 05 01:29 AM
xyScatterChart macro works on WinXP Pro & not on WinXP Home? [email protected] Excel Discussion (Misc queries) 0 July 18th 05 12:30 AM
Looking for eloquent solution: Determine of any control on a page of multipage has been altered (userform) KR Excel Programming 0 December 13th 04 09:04 PM
inputbox vs. userform/combobox vs. Windows file handlers ??? List Lurker Excel Programming 2 October 12th 04 11:19 PM


All times are GMT +1. The time now is 12:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"