Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Resizing Userform | Excel Programming | |||
Resizing and Printing a UserForm | Excel Programming | |||
auto-resizing UserForm window | Excel Programming | |||
auto-resizing UserForm window | Excel Programming | |||
Userform resizing | Excel Programming |