LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 683
Default Question about User Form Window Size on Chip Petersons Site

Can you please explain exactly what this code is going to do?

My Biggest problem is that my User Form only works on my Display. When I try
and use it on any other computer Not only is the User Form to big, but the
Main Window the User Form is in goes completely off the screen.

I want the User Form Window to act just like any other Window. With Min, Max
& Resize, just like a reqular window would do.

Thanks for your response.
"Peter T" wrote:

There are various ways, this is probably the easiest although it may hide
the task bar

Private Declare Function SetWindowLong Lib "user32" Alias _
"SetWindowLongA" ( _
ByVal hWnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long

Private Declare Function ShowWindow Lib "user32" ( _
ByVal hWnd As Long, _
ByVal nCmdShow As Long) As Long

Private Const SW_MAXIMIZE As Long = 3

Private Sub UserForm_Activate()
Dim hWnd As Long
With Me
.Caption = Rnd()
hWnd = FindWindow("ThunderDFrame", .Caption)
.Caption = "Hello"
End With
ShowWindow hWnd, SW_MAXIMIZE
End Sub

Regards,
Peter T


"Brian" wrote in message
...
I have a User Form that I need to adjust to fit the users computer. So far
I
not found anyway to get the User Form Window to Adjust. I can adjust the
User
Form sixe, but the Main Window the Form located is in is still bigger than
the Screen.

I saw on Chip Petersons site exactly what I need. His code allows complete
control over the User Form just as if it was a regular window.

Can anyone help me with this code?
http://www.cpearson.com/Excel/formcontrol.aspx



.

 
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
Font size problem in text box on user form WembleyBear Excel Programming 0 August 19th 08 02:58 PM
User form grid - resize / font size John B[_3_] Excel Programming 2 April 26th 07 10:54 AM
User Form Question [email protected] Excel Programming 1 April 17th 07 10:16 PM
User Form Frame size Joe Derr[_2_] Excel Programming 0 October 11th 04 09:46 AM
size of user form jon brennan Excel Programming 1 June 28th 04 07:33 PM


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

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

About Us

"It's about Microsoft Excel"