![]() ![]() ' StrInput = rs!KOD & Space( 9 - Len(rs!KOD)) & Space( 12 - Len(rs!eep_ic)) & rs!eep_ic & _ StrStatus = IIf(strResign "", "H", strStatus) If strResign "" Then strJoinResign = strResign StrJoinResign = Left(strJoin & Space(8), 8) StrResign = IIf("" & RS1!dtresign = "", "", Format("" & RS1!dtresign, "ddMMyyyy")) ' If Dir(spath) "" Then spath = txtSocsoLoc.Text & "NOMANTH.TXT" 'MsgBox " " & tFileName, vbInformation, Me.Caption RS2.Open uSQL, Conn, adOpenStatic, adLockReadOnly RS1.Open vSQL, Conn, adOpenStatic, adLockReadOnly " SOA_PAYYEAR = " & Year(dtpSocsoDate.Value) & " AND (SOA_SOAMTEE+SOA_SOAMTER) > 0 " USQL = " SELECT soa_month FROM DMF_SocsoArrears WHERE SOA_PAYMONTH = " & Month(dtpSocsoDate.Value) & " AND " & _ PrintDocument.Text = System.IO.File.VSQL = vSQL & " GROUP BY SOA_COMPNO, SOA_FAC, EEP_NAME, EEP_IC, EEP_SOCSONO, dtjoin, dtresign ORDER BY SOA_COMPNO, SOA_FAC, EEP_NAME " PrintDocument.Text = System.IO.File.ReadAllText("") PrintDocument.Text = System.IO.File.ReadAllText(TD.FileName) TD.Filter = "Text Files|*.txt|All Files|*.*" Private Sub OnGetTextFile(ByVal sender As, ByVal e As EventArgs)ĭim TD As OpenFileDialog = New OpenFileDialog ![]() Then you can use the template from here: If the answer is Yes, then you can access the file directly as part of the printing process. So the question is: how do you intend to get the file contents into your application? Will the filename always be exactly the same, and will the file always be stored at the same location on the drive? If you want to print some text that is part of your application, then the user does not need to get involved with a file. Your user is going to get involved in selecting a file if you want to print a file. The above should I focused my attention? Any sample code would be appreciated that would give me a start. Should I use PrintDocument, Printform, or Printdialog? I do not wish for the user to get involved on selecting a file. txt and I need some understanding of where do I go from here. ' The following code will render a simple ' This code will be called when the control is drawn. ' by handling the document's PrintPage event.Īs. ' The PrintDialog will print the document ' If the result is OK then print the document. ' dialog, either this property or the PrinterSettings propertyĪs DialogResult = PrintDialog1.ShowDialog() ' which the PrintPage Event has been handled. ![]() ' Set the Document property to the PrintDocument for ' Allow the user to choose the page range he or she would ' This method will set properties on the PrintDialog object and Where do I specify my file name in the following code: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |