Hi All,
I am currently programming Bill and Money Receipt Printing program. It is almost finished but struck with one problem. My problem goes here:
I have created One MDI Form with 3 mdi Child forms namely, frmBillHeader, frmBillMain and frmBillFooter.
BillHeader contains Company Name with Address and Contact No.
Bill Main form contains the main part of Bill like Particulars, Quantity, Rate and Amount.
Bill Footer form contains some advertising slogans of Company.
I was forced to make three mdi child forms because all I want to print cannot be accommodate in one form.

Now I want to print all these three forms in vertical position as if one form. I want to print form because my form contains picture like logo of company. I have tried tried the following code:

mnuPrint_Click()
frmmdiBill.PrintForm 'Name of my mdi form
End sub

Thanks in advance for any type of help.

Hmmm... Three child forms... Well, you are either going to need to capture a screenshot of each and assemble a bitmap from them and then print that out, or use a report of some kind. Either a data report or crystal reports should do the trick for you if you go that route. Now, if you have VB6.0 pro or enterprise, you should find a directory called crystal on your install disks. This is crystal reports 4.5 or 4.6. and is fairly easy to use...

Good Luck

Thanx vb5prgrmr for your quick reply. As you said i believe using Crystal Report might solve my problem but to be frank i have downloaded VB6 from Internet and it is standalone exe file. Moreover i haven't used Crystal Report before but I am well known to MS Access Reports.

I want to print these three child forms through code without capturing Screen shot.

Thanks

There is no built in method for this....you would have to write the code yourself. I agree with vb5prgrmr.
There have been a number of posts about screenshots....try searching there first.you can see this link

Thanx vb5prgrmr and abu taher for giving link. I hope that link will be helpful to solve my problem. I will go on to the links and rate your post.

Thankx once again

I have gone through all the links given but still cant solve it. By the way is there any code for printing MDI form?

Well you have to know that there is a difference between printing a form and printing the contents of the form...

Look at Printer.Print "my string" along with currentx/y properties for printing information...

Good Luck

Thanks VB5prgrmr
I have combined the codes from Links you and abu taher has given me. I have edited some codes to meet my requirement.

Thanks once again for the trouble you and abu taher take.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.