Click here to Skip to main content
15,881,882 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Remote Debugging in Visual Basic 6.0 Pin
Dave Kreskowiak18-May-12 2:09
mveDave Kreskowiak18-May-12 2:09 
GeneralRe: Remote Debugging in Visual Basic 6.0 Pin
acects18-May-12 2:19
acects18-May-12 2:19 
GeneralRe: Remote Debugging in Visual Basic 6.0 Pin
Dave Kreskowiak18-May-12 3:23
mveDave Kreskowiak18-May-12 3:23 
AnswerRe: Remote Debugging in Visual Basic 6.0 Pin
Eddy Vluggen19-May-12 0:51
professionalEddy Vluggen19-May-12 0:51 
QuestionNeed advice on printing reports from Visual Basic Pin
kentuckyjoe16-May-12 15:26
kentuckyjoe16-May-12 15:26 
AnswerRe: Need advice on printing reports from Visual Basic Pin
Dave Kreskowiak17-May-12 2:01
mveDave Kreskowiak17-May-12 2:01 
GeneralRe: Need advice on printing reports from Visual Basic Pin
kentuckyjoe17-May-12 15:24
kentuckyjoe17-May-12 15:24 
AnswerRe: Need advice on printing reports from Visual Basic Pin
dg6yhw1123-May-12 8:28
dg6yhw1123-May-12 8:28 
I don't know exactly what you're trying to accomplish but I never ever use Crystal Reports. Controlling the printer (in VB 6 at least) is a very simple process.

dim something as stdfont to allow you to change fonts and their characteristics during the run (Don't use the printer font properties for this they don't work well) stdfont is a standard type supplied in VB 6.

Open the printer

set the fonts in the something variable

position the printer cursor using printer.currentx and printer.currenty

Line spacing (kerning) is determined by the font, of course. You can use printer.currenty to override that.

dump the text using printer.print "sometext" If you want all the output on the same line then add a ; (printer.print "sometext";) and you can avoid the printer.currenty statement.

and repeat.

If you're printing a columnar report, add a test to determine end of page (the printer dimensions are twips) I usually leave 1/2" = 720 twips of air @ the bottom to allow for the different unprintable areas

printer.newpage ejects the page

end the job with printer.enddoc

abort using printer.killdoc

If the output exceeds 1 page you'll probably want to have a heading procedure. Printer.page tells you the page number that you can add to your report if you feel like it.

I have used this for over 10 years to print all kinds of reports including form filling.
Murray

GeneralRe: Need advice on printing reports from Visual Basic Pin
kentuckyjoe23-May-12 9:36
kentuckyjoe23-May-12 9:36 
GeneralRe: Need advice on printing reports from Visual Basic Pin
kentuckyjoe23-May-12 11:09
kentuckyjoe23-May-12 11:09 
GeneralRe: Need advice on printing reports from Visual Basic Pin
dg6yhw1123-May-12 11:55
dg6yhw1123-May-12 11:55 
GeneralRe: Need advice on printing reports from Visual Basic Pin
kentuckyjoe23-May-12 14:18
kentuckyjoe23-May-12 14:18 
GeneralRe: Need advice on printing reports from Visual Basic Pin
kentuckyjoe23-May-12 14:56
kentuckyjoe23-May-12 14:56 
GeneralRe: Need advice on printing reports from Visual Basic Pin
dg6yhw1124-May-12 6:01
dg6yhw1124-May-12 6:01 
GeneralRe: Need advice on printing reports from Visual Basic Pin
kentuckyjoe24-May-12 14:10
kentuckyjoe24-May-12 14:10 
GeneralRe: Need advice on printing reports from Visual Basic Pin
dg6yhw1125-May-12 5:48
dg6yhw1125-May-12 5:48 
GeneralRe: Need advice on printing reports from Visual Basic Pin
kentuckyjoe25-May-12 8:22
kentuckyjoe25-May-12 8:22 
GeneralRe: Need advice on printing reports from Visual Basic Pin
dg6yhw1129-May-12 6:14
dg6yhw1129-May-12 6:14 
GeneralRe: Need advice on printing reports from Visual Basic Pin
kentuckyjoe29-May-12 16:42
kentuckyjoe29-May-12 16:42 
GeneralRe: Need advice on printing reports from Visual Basic Pin
dg6yhw1130-May-12 5:51
dg6yhw1130-May-12 5:51 
GeneralRe: Need advice on printing reports from Visual Basic Pin
kentuckyjoe30-May-12 6:42
kentuckyjoe30-May-12 6:42 
GeneralRe: Need advice on printing reports from Visual Basic Pin
dg6yhw1130-May-12 8:42
dg6yhw1130-May-12 8:42 
GeneralRe: Need advice on printing reports from Visual Basic Pin
kentuckyjoe30-May-12 16:31
kentuckyjoe30-May-12 16:31 
QuestionHow to semd sms more than 160 character in 0ne SMS? Pin
rusydan.khir15-May-12 4:04
rusydan.khir15-May-12 4:04 
AnswerRe: How to semd sms more than 160 character in 0ne SMS? Pin
Dave Kreskowiak15-May-12 4:21
mveDave Kreskowiak15-May-12 4:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.