Results 1 to 21 of 21

Thread: Form_Load()

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2005
    Posts
    606

    Form_Load()

    I have put this code in the Form_Load() event and when I debuged it it counted correct and the code worked fine, however when I get to the .PrintForm method it dos'nt print the row lines or column lines, but if I replace the .printform with frmPrint.Show they do appear.
    I am making the .printform call from another form but I think i'm using it correctly as you can see from below.

    any ideas?
    VB Code:
    1. Private Sub Form_Load()
    2.  
    3.     picWindow.Left = 0
    4.     picWindow.Width = Me.Width
    5.     picI_Print.Left = 0
    6.     picI_Print.Width = picWindow.Width
    7.  
    8. Dim i As Integer
    9. Dim t As Integer
    10.  
    11. t = 2775
    12. For i = 1 To 54                 ' Add Line Numbers
    13.     t = t + 225                 ' to form
    14.     picI_Print.CurrentX = 0
    15.     picI_Print.CurrentY = t
    16.        picI_Print.Print i
    17.        picI_Print.Line (0, t)-(picI_Print.Width, t) 'Make rows 225 twips apart
    18.    Next
    19.    '''' Make columns
    20.     picI_Print.Line (300, 2400)-(300, picI_Print.Height)
    21.     picI_Print.Line (750, 2400)-(750, picI_Print.Height)
    22.     picI_Print.Line (2100, 2400)-(2100, picI_Print.Height)
    23.     picI_Print.Line (3525, 2400)-(3525, picI_Print.Height)
    24.     picI_Print.Line (4500, 2400)-(4500, picI_Print.Height)
    25. End Sub
    26.  
    27. Private Sub Command4_Click()
    28. Me.Hide
    29. Load frmPrint
    30. frmPrint.PrintForm
    31. End Sub








    Edit: Added [vbcode][/vbcode] tags for clarity. - Hack
    Last edited by Hack; Oct 31st, 2005 at 07:52 AM.

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