|
-
Aug 21st, 2010, 07:26 PM
#1
Thread Starter
New Member
[HELP] Printing Picture box
see, i am making a project that prints. but its too long for a form so i added it on a picture box so i can use a scroll, not, my problem is. when i print it, only the form size is printed? i use "Form1.PrintForm" but it wont work. can anybody help me? please please please i need help from IT experts in here. here is my sample of my project
Download Link:
http://www.mediafire.com/?7z4d02yl028yblf
-
Aug 23rd, 2010, 10:52 PM
#2
Thread Starter
New Member
Re: [HELP] Printing Picture box
i need help please....... im using VB 6
-
Aug 24th, 2010, 06:15 AM
#3
Re: [HELP] Printing Picture box
-
Aug 24th, 2010, 06:31 AM
#4
Re: [HELP] Printing Picture box
check out the project from microsoft for printing forms etc, has a function to print picturebox to page size
http://support.microsoft.com/default...b;en-us;161299
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Aug 24th, 2010, 11:57 PM
#5
Thread Starter
New Member
Re: [HELP] Printing Picture box
i dont understand. can anybody edit or teach me where to put those codes?
-
Aug 25th, 2010, 05:53 AM
#6
Thread Starter
New Member
Re: [HELP] Printing Picture box
anyone can teach me where to put the codes? here's the ink of the code http://www.andreavb.com/tip070013.html
-
Aug 25th, 2010, 06:25 AM
#7
Re: [HELP] Printing Picture box
did you try creating a new project and adding the controls suggested and this code?
it is mostly correct though the api declares should be declared public if they are put in a module with the printpicturebox procedure
in fact all the code could go into a form as is
just get it working in a new project before trying to add to your existing project
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Aug 26th, 2010, 07:21 AM
#8
Thread Starter
New Member
Re: [HELP] Printing Picture box
i dont understand it 
can somebody make a demo for me? or a sampe project. please....... this is just important
-
Aug 27th, 2010, 05:56 PM
#9
Thread Starter
New Member
Re: [HELP] Printing Picture box
Help please....
-
Aug 27th, 2010, 07:01 PM
#10
Re: [HELP] Printing Picture box
don't bump your threads
why do you expect someone else to do for you?
we have already googled for you
there are 2 sample method to what you have asked, i have not tested the one from andreavb, which looks very simple to incorporate into any project, but i have tested the microsoft one and it works correctly and has many more options
if you show what code you have done so far and what parts are giving problem you will get plenty of help,
if you do not want to do any of this yourself, you could try the rentacoder site and pay someone to do for you
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Aug 28th, 2010, 06:38 PM
#11
Thread Starter
New Member
Re: [HELP] Printing Picture box
well, i dont understand it. where to find module
-
Aug 28th, 2010, 09:45 PM
#12
Re: [HELP] Printing Picture box
add a module
menu > project > addmodule
just select default module in dialog
in the module, paste all the code, in the first 2 blue areas
make sure to have a picturebox picture1 can be hidden
put the code in the 3rd blue box into you print command button, or whatever you are using to print
i made a project up, to test, in about 3 minutes, from the result i suggest looking more at the microsoft solution i posted above, it gives a much better result, with a lot more options
it includes fairly comprehensive instructions, as to where to place code, make sure to add all the required controls to the form, you do not need all the code for what you want to do, just the code for capture client and printpicturetofitpage, but as you can paste all just as easy to include all, you can comment out what you don't need after
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Aug 29th, 2010, 05:35 PM
#13
Thread Starter
New Member
Re: [HELP] Printing Picture box
ok thank you, i will try that one. i will post here if something goes wrong
-
Aug 30th, 2010, 12:22 AM
#14
Thread Starter
New Member
Re: [HELP] Printing Picture box
hey it says "Run time error 6, Overflow"? what does that mean? i should reduce the size of the picturebox?
-
Aug 30th, 2010, 04:22 AM
#15
Re: [HELP] Printing Picture box
the pictureboxs should, i believe, be set for autosize, i think the code takes care of that
i did not get an overflow error when i tried either of the projects
where do you get the overflow error, which line?
which code are you working with?
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Sep 2nd, 2010, 09:57 AM
#16
Thread Starter
New Member
Re: [HELP] Printing Picture box
this one
Code:
If Pic.Height >= Pic.Width Then
Prn.Orientation = vbPRORPortrait ' Taller than wide.
Else
Prn.Orientation = vbPRORLandscape ' Wider than tall.
End If
that bold code was high lighted with yellow,
-
Sep 2nd, 2010, 04:33 PM
#17
Re: [HELP] Printing Picture box
i do not see any reason why you should get overflow error on that line, i have tested this project with no errors
does your printer have ability to print landscape and portrait?
if you know which way you want to print you could just comment out that section of code
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Sep 3rd, 2010, 09:35 AM
#18
Thread Starter
New Member
Re: [HELP] Printing Picture box
how? maybe thats the reason
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|