Click to See Complete Forum and Search --> : form resize
rry2k
August 30th, 2001, 08:41 AM
I have a Vb form that I created that takes up the whole screen. I have stretched it as much as possible but when I use a print dialog and print the form it only uses half the sheet. I tried to change the height in properties and in code at run time but I get an error that says "a form can't be moved or sized while min or maximized.
Thanks for the help..Russ
berta
August 30th, 2001, 08:55 AM
if myform.windowstate = 0 then '0=vbNormal
'resize code
end if
hi,brt
<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/images/bertaplanet.gif'>
</center>
rry2k
August 30th, 2001, 09:10 AM
Are you saying to put this in the form laod event?
berta
August 30th, 2001, 09:17 AM
U must put the code where U must apply som resize on form... so U can put it in load form event or resize foem event... or where U need to resize form...
if myform.windowstate= 0 then
myform.height=200
myform.width=300
end if
hi,brt
<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/images/bertaplanet.gif'>
</center>
rry2k
August 30th, 2001, 09:23 AM
I put this in a command click event where I print from. I GOT THE SAME ERROR a from can't be resized while max or min
berta
August 30th, 2001, 09:26 AM
could U write the code, please?
hi,brt
<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/images/bertaplanet.gif'>
</center>
rry2k
August 30th, 2001, 09:31 AM
Private Sub Command1_Click()
Command1.Visible = False
If myform.WindowState = 0 Then
Form1.Height = 9200
'0=vbNormal 'resize code
End If
CmnDlg1.ShowPrinter
PrintForm
End Sub
berta
August 30th, 2001, 09:38 AM
I set form1 maximized and I put on load form this code
'Command1.Visible = false
If Form1.WindowState = 0 then
Form1.Height = 9200
'0=vbNormal 'resize code
End If
'CmnDlg1.ShowPrinter
PrintForm
this cod run!
hi,brt
<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/images/bertaplanet.gif'>
</center>
rry2k
August 30th, 2001, 09:54 AM
It does indeed run but I still only get a form that is half of the 8.5 x 11 sheet. Try a new app, put a textbox as far down as possible and then print.
This is an employment application and needs to look legal not a form on half a page. thanks..russ
berta
August 30th, 2001, 10:17 AM
sorry... I don't undestand yor problem.
hi,brt
<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/images/bertaplanet.gif'>
</center>
George1111
May 25th, 2004, 09:14 AM
RRY2K
Did you ever resolve the PrintForm Problem ??
I am trying to follow in your footsteps now
Thanks
george
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.