I am developing an application in Visual Basic in which i have to enter the details of candidates and after that clicking on the print button, the details of that particular candidate get printed out without using/going to a report.
I want to know how can i do that, also i don't know anything about print command in visual basic. so, if anyone can explain me about this too.
this will directly print your text to the printer attached.( just be sure to configure the printer in the control panel) try exploring the Printer class and you can see it works.. change the CurrentX and currentY values to positon your text.
A better and most easy way to get something printed on to the printer is the following code.
Dim Str1 As String
Open "LPT1" For Output As #1
Str1="Testing the Printer"
Line Output #1 Str1
can you make me understand this code. or just let me know what is #1 stand for.
also, if this code will work to print the candidate details. and one more thing from where i can get notes on vb print command/ statement to understand it fully and better.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...