CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Thread: form resize

  1. #1
    Join Date
    Aug 2001
    Posts
    6

    form resize

    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


  2. #2

    Re: form resize


    if myform.windowstate = 0 then '0=vbNormal
    'resize code
    end if




    hi,brt

    <center>
    <HR width=80%>
    <img src='http://web.tiscali.it/bertaplanet/im...ertaplanet.gif'>
    </center>

  3. #3
    Join Date
    Aug 2001
    Posts
    6

    Re: form resize

    Are you saying to put this in the form laod event?


  4. #4

    Re: form resize

    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/im...ertaplanet.gif'>
    </center>

  5. #5
    Join Date
    Aug 2001
    Posts
    6

    Re: form resize

    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


  6. #6

    Re: form resize

    could U write the code, please?

    hi,brt

    <center>
    <HR width=80%>
    <img src='http://web.tiscali.it/bertaplanet/im...ertaplanet.gif'>
    </center>

  7. #7
    Join Date
    Aug 2001
    Posts
    6

    Re: form resize

    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


  8. #8

    Re: form resize

    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/im...ertaplanet.gif'>
    </center>

  9. #9
    Join Date
    Aug 2001
    Posts
    6

    Re: form resize

    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


  10. #10

    Re: form resize

    sorry... I don't undestand yor problem.

    hi,brt

    <center>
    <HR width=80%>
    <img src='http://web.tiscali.it/bertaplanet/im...ertaplanet.gif'>
    </center>

  11. #11
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    1,901
    RRY2K

    Did you ever resolve the PrintForm Problem ??

    I am trying to follow in your footsteps now

    Thanks

    george

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured