Command1.Move 1725, 1200, Command1.Width, Command1.Height
Command1.Width = Command1.Width + (Me.Width - 4800)
Command1.Height = Command1.Height + (Me.Height - 3600)
10 Replies - 2546 Views - Last Post: 28 July 2012 - 12:32 AM
#1
when form resize within form controls are also resized
Posted 25 July 2012 - 12:25 AM
Replies To: when form resize within form controls are also resized
#2
Re: when form resize within form controls are also resized
Posted 25 July 2012 - 02:59 AM
Please provide some more information...
is this a code sample or do you have a problem?
is this a code sample or do you have a problem?
#3
Re: when form resize within form controls are also resized
Posted 25 July 2012 - 04:09 AM
#4
Re: when form resize within form controls are also resized
Posted 25 July 2012 - 08:31 AM
uumm.. when you drag a form on the screen all controls inside it are already dragged too.
it seems you try to change their size according to the form's size.. what is the problem then?
it seems you try to change their size according to the form's size.. what is the problem then?
#5
Re: when form resize within form controls are also resized
Posted 26 July 2012 - 03:39 AM
Neku, on 25 July 2012 - 08:31 AM, said:
uumm.. when you drag a form on the screen all controls inside it are already dragged too.
it seems you try to change their size according to the form's size.. what is the problem then?
it seems you try to change their size according to the form's size.. what is the problem then?
my problem is when drag the form command button width will be too long. this is my problem
#6
Re: when form resize within form controls are also resized
Posted 26 July 2012 - 07:04 AM
did you place the code you posted in the form's resize subrotin? because that dosent sound like a normal behavior for your program
#7
Re: when form resize within form controls are also resized
Posted 26 July 2012 - 08:14 AM
Oh, I think I see what you're trying to do. If you want to SIZE your controls, use Height and Width properties. If you want to POSITION your controls, use Top and Left properties. I think you're confusing the two.
#8
Re: when form resize within form controls are also resized
Posted 26 July 2012 - 12:23 PM
i think there is a solution already posted for this kind of problem, just search the snippet or tutorial section, i am not sure which one it contains but it is here just dig it out and get that treasure
#9
Re: when form resize within form controls are also resized
Posted 27 July 2012 - 01:33 AM
if form width increase 1000 then control width will be 1000 increased?
Control size 1000 increased properly, but control goes to out of the form
i used command button
Control size 1000 increased properly, but control goes to out of the form
i used command button
#10
Re: when form resize within form controls are also resized
Posted 27 July 2012 - 04:23 AM
If you want you're button to resize, try using a constant for it's width, instead of it's actual width, otherwise you're adding exponentially to it's size.
For example, when you start your program, your button is 200 * 100 twips.
So your resize code would be something like:
This way, the button resizes with the form. Just make sure to trap the condition of negative sizing!
For example, when you start your program, your button is 200 * 100 twips.
So your resize code would be something like:
Command1.Width = 200 + (Me.Width - 4800) Command1.Height = 100 + (Me.Height - 3600)
This way, the button resizes with the form. Just make sure to trap the condition of negative sizing!
#11
Re: when form resize within form controls are also resized
Posted 28 July 2012 - 12:32 AM
maj3091, on 27 July 2012 - 04:23 AM, said:
If you want you're button to resize, try using a constant for it's width, instead of it's actual width, otherwise you're adding exponentially to it's size.
For example, when you start your program, your button is 200 * 100 twips.
So your resize code would be something like:
This way, the button resizes with the form. Just make sure to trap the condition of negative sizing!
For example, when you start your program, your button is 200 * 100 twips.
So your resize code would be something like:
Command1.Width = 200 + (Me.Width - 4800) Command1.Height = 100 + (Me.Height - 3600)
This way, the button resizes with the form. Just make sure to trap the condition of negative sizing!
hi maj ur code was really helpful,when i was try that code i got an exiting result. really u done a great job
thanks
mani
Page 1 of 1