Print contents of a frame control in vb 6.0?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • samvb
    New Member
    • Oct 2006
    • 228

    Print contents of a frame control in vb 6.0?

    Hi,
    I was asked by my department to print contents of a frame control. The program was designed by another person and now, i am asked to add this specific task. I dont have proper documentation of the program but i do have the code. Now, i want to include a button and be able to print the contents of a frame control he placed?

    Any ideas would be appreciated highly.
  • smartchap
    New Member
    • Dec 2007
    • 236

    #2
    If you can post the zip file of the code then it will be ok otherwise tell waht are the controls in Frame Control which you want to be printed. Also in which format.

    Comment

    • smartchap
      New Member
      • Dec 2007
      • 236

      #3
      I think you must use DataReport for this job.

      Comment

      • samvb
        New Member
        • Oct 2006
        • 228

        #4
        I want to print to a paper, if thats wat u mean by the format thing. the controls inside it are label,textbox,c ombobox and one image box. btw, i was thinking if the job could be simplified by using a picture box instead of a frame control? i already tried that and there was no print output at all.

        Comment

        • smartchap
          New Member
          • Dec 2007
          • 236

          #5
          Dear Sam

          Use DataReport for this job or u may use Crystal Report also.

          Comment

          • 9815402440
            New Member
            • Oct 2007
            • 180

            #6
            hi
            use following logic

            private sub cmdPrint_Click( )
            with frame1
            .Top = me.scaletop
            .left = me.scaleleft
            .borderstyel = 0
            .backcolor = vbwhite
            'for all text boxes
            textbox1.border style =0
            textbox1.appear ance=0
            'back style of all lable controls must be set to zero
            .zorder vbbringtofront
            end with
            me.printform
            end sub

            regards
            manpreet singh dhillon hoshiarpur

            Comment

            • smartchap
              New Member
              • Dec 2007
              • 236

              #7
              If add following 2 lines before Me.PrintForm then only the frame contents will be printed otherwise other things also will be printed.

              Code:
              Me.Width = Me.Frame1.Width
              Me.Height = Me.Frame1.Height

              Comment

              Working...