Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Arrows for UserForm resizing

Hi,

I have created a userform.

Some normal windows applications offer the possiblilty to resize them
when the cursor gets to the e. g. right bottom edge; it turns then
into a diagonal arrow which allows me when clicking to resize the
window.

Is it possible to offer this possibility to my UserForm, too? Is there
perhaps a simple property I just have to set to "true" to enable this
(I couldn't find something like this so far)?

Thanx in advance for any clue,

- Christian

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Arrows for UserForm resizing

Google for 'FormFun'. This example offers an icon, min/max buttons and also
a sizeable form.

http://www.oaltd.co.uk/Excel/Default.htm





"Christian" schreef in bericht
ups.com...
Hi,

I have created a userform.

Some normal windows applications offer the possiblilty to resize them
when the cursor gets to the e. g. right bottom edge; it turns then
into a diagonal arrow which allows me when clicking to resize the
window.

Is it possible to offer this possibility to my UserForm, too? Is there
perhaps a simple property I just have to set to "true" to enable this
(I couldn't find something like this so far)?

Thanx in advance for any clue,

- Christian



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Arrows for UserForm resizing

Thanks for the advice, but this program is almost bigger than the
program with the UserForm I want to be able to resize.
Isn't there any simpler possibility just like setting a property of
the UserForm to "True" in order to resize it with just a few lines of
code?

Thanks,

- Christian

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Arrows for UserForm resizing


I guess not. In Excel there are only two styles available, so you must
import the GetWindowLong, SetWindowLong and SendMessage functions to set
additional form properties.


"Christian" schreef in bericht
oups.com...
Thanks for the advice, but this program is almost bigger than the
program with the UserForm I want to be able to resize.
Isn't there any simpler possibility just like setting a property of
the UserForm to "True" in order to resize it with just a few lines of
code?

Thanks,

- Christian



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Arrows for UserForm resizing

You do need all that code, only the parts for resizing, probably not more
than a few lines and a couple of declares. You can delete the rest
If you want to achieve effect not exposed by Excel/VBA, you have to do a
little extra work

You will still handle the movement/placement of controls on the resized
userform yourself, if that is a concern.

NickHK

"Christian" wrote in message
oups.com...
Thanks for the advice, but this program is almost bigger than the
program with the UserForm I want to be able to resize.
Isn't there any simpler possibility just like setting a property of
the UserForm to "True" in order to resize it with just a few lines of
code?

Thanks,

- Christian





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default Arrows for UserForm resizing

Hi,

There is no property so you will need more than a couple of lines of code.
For a non api solution
http://www.andypope.info/vba/resizeform.htm

For a solution that also handles control resizing
http://www.andypope.info/vba/Anchor.htm

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Christian" wrote in message
oups.com...
Thanks for the advice, but this program is almost bigger than the
program with the UserForm I want to be able to resize.
Isn't there any simpler possibility just like setting a property of
the UserForm to "True" in order to resize it with just a few lines of
code?

Thanks,

- Christian


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Arrows for UserForm resizing

Hi Andy,

thank you very much for your help. I used the example in the first
link and it works fine in UserForms without Scrollbars.

The problem in UserForms with a (in this case vertical) scrollbar is,
that the resize-icon is placed left next to the scrollbar and is away
when the window is made smaller than its original width.
Is there a possibility to avoid this?

Greetings,

- Christian


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default Arrows for UserForm resizing

You could adjust the calculation to position the resize icon. You would need
to add code to the scroll event. But this would then cover any controls that
are in the bottom right corner when you scroll the userform.

If you want scroll bars AND resizing you should use the API code. It maybe
'heavy' code but it has already been written for you so you only need to
incorporate it in your userform.

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Christian" wrote in message
oups.com...
Hi Andy,

thank you very much for your help. I used the example in the first
link and it works fine in UserForms without Scrollbars.

The problem in UserForms with a (in this case vertical) scrollbar is,
that the resize-icon is placed left next to the scrollbar and is away
when the window is made smaller than its original width.
Is there a possibility to avoid this?

Greetings,

- Christian



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
Resizing Userform ExcelMonkey Excel Programming 1 April 21st 07 12:33 AM
Resizing and Printing a UserForm [email protected] Excel Programming 3 April 19th 07 06:14 PM
auto-resizing UserForm window NickHK Excel Programming 2 January 11th 07 08:02 AM
auto-resizing UserForm window John Bundy Excel Programming 0 January 10th 07 05:15 PM
Userform resizing lmarks Excel Programming 5 August 4th 04 06:56 PM


All times are GMT +1. The time now is 06:34 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"