Well if u say alignment, its the duty of code forming the text file. There u have to take care while setting coordinates using TAB().
Create text file is to be saved. Now follow these steps to print with DMP.
1) create a DOS batch file using
VB itself in the same fashion u have created text file with.
Bacthc file should contain this line:-
TYPE c:\a.txt>prn ''''I assume that C:\a.txt is to be printed.
please manage the path of text file.
Now save this batch file. For example with the name "DMPout.bat"
2)Now Declare a variable without any datatype in
VB (may be inside a button click)
Public Sub PrintData()
Dim RetVal
RetVal = Shell ("c:\DMPOut.bat")
Kill "c:\DMPout.bat"
unload me
End SUB
This will send the output through the DOS Shell and so its very fast on DMPs. Make sure to make ur DMP as default printer before firing the code. U can use CommonDialog's ShowPrint method to set the printer settings.
B. Anant