Results 1 to 7 of 7

Thread: Help with printing

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    4

    Question

    I have made a menu item in a Visual Basic 6.0 program I am working on to print some data in a certain grid. How do I tell it to print the data that is on the screen at a certain time (when the user tells it to print). Grid is fixed number of columns but number of rows may vary. mnuFilePrint_Click() type thing. HELP please.

  2. #2
    Lively Member Dr_Evil's Avatar
    Join Date
    Mar 2000
    Location
    Columbus, OH
    Posts
    105
    What type of grid are you using?
    Dr_Evil
    Senior Programmer
    VS6 EE
    VS.NET EA

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    4
    a ms flex grid. I have it connected with an Access database but I can't figure out the code to make it print the listings on the grid when on screen.

  4. #4
    Lively Member Dr_Evil's Avatar
    Join Date
    Mar 2000
    Location
    Columbus, OH
    Posts
    105
    This is the only way I know of to print a MSFlexGrid. It works but the resolution isn't the best.
    Code:
    Private Sub Command1_Click()
        Printer.PaintPicture MSFlexGrid1.Picture, 0, 0
        Printer.EndDoc
    End Sub
    Hope this helps
    Dr_Evil
    Senior Programmer
    VS6 EE
    VS.NET EA

  5. #5

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    4

    Unhappy

    Well... thanks but I am trying to write code to make a loop work that will count the columns and then print the rows with line breaks...

  6. #6
    Lively Member Dr_Evil's Avatar
    Join Date
    Mar 2000
    Location
    Columbus, OH
    Posts
    105
    I had the same problem when using MSFlexGrid. I just wrote a query that would return the same results and used it in the Data Report Designer or Crystal Reports. Sorry I couldn't help.
    Dr_Evil
    Senior Programmer
    VS6 EE
    VS.NET EA

  7. #7

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    4

    Unhappy

    Hey, don't feel bad. Thanks for trying to help me. I could have done the whole thing in Access but I just can't get it to work in VB. Very frustrating.

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