| | |
know when print job is finished
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Feb 2008
Posts: 20
Reputation:
Solved Threads: 0
Last edited by sal21; Mar 1st, 2008 at 7:03 am.
you meant you want to check whether the file has any content in it or not? if it is a zero length file then you wish to abort the print job else you want to give confirmation?
is that so or anything else?
plz buddy make your post more clear so it can be understandable by those people who will afford to make replies against your post.
ok......
hv a nice day
is that so or anything else?
plz buddy make your post more clear so it can be understandable by those people who will afford to make replies against your post.
ok......
hv a nice day
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Have a problem? Don't worry just give me a call and I'll fix it for you.
•
•
Join Date: Feb 2008
Posts: 20
Reputation:
Solved Threads: 0
•
•
•
•
you meant you want to check whether the file has any content in it or not? if it is a zero length file then you wish to abort the print job else you want to give confirmation?
is that so or anything else?
plz buddy make your post more clear so it can be understandable by those people who will afford to make replies against your post.
ok......
hv a nice day
YES!!!! Perfect.
Sorry for my enghlish but i'm Italian from Napoli...
ok try this code.
replace the Red marked portion with the physical location of the file that you wish to check and print.
plz let me know if this helps you to solve out ur problem.
regards
Shouvik
Dim fl As Long, confirm As Integer, str As String, FNum As Integer fl = FileLen("c:\aa.txt") If fl = 0 Then MsgBox "zero length file." Else confirm = MsgBox("Do you wish to print?", vbYesNo) If confirm = vbYes Then Text1.Text = "" FNum = FreeFile Open "c:\aa.txt" For Input As #1 str = Input(LOF(FNum), #FNum) Close #FNum Text1.Text = str Printer.Print Text1.Text Printer.EndDoc MsgBox "Control passed to printer. Please verify.", vbInformation, "Print" End Else Exit Sub End If End If
replace the Red marked portion with the physical location of the file that you wish to check and print.
plz let me know if this helps you to solve out ur problem.
regards
Shouvik
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Have a problem? Don't worry just give me a call and I'll fix it for you.
![]() |
Similar Threads
- preg_match validation help please (PHP)
- Help me. I don't know what to do (Viruses, Spyware and other Nasties)
- backdoor.huai (Viruses, Spyware and other Nasties)
- Trojan Horse - HELP PLEASE (Viruses, Spyware and other Nasties)
- Connecting to web server using client desktop application (Visual Basic 4 / 5 / 6)
- key board virus (Viruses, Spyware and other Nasties)
- need help asap :) (Java)
- HighJackThis File Log, Help Needed. (Viruses, Spyware and other Nasties)
- Completely stumped by sudden IE slowdown (Web Browsers)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: invalid data source error in my thesis project
- Next Thread: Open a form by variable
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





