Visual Basic Codes
ActiveX
Miscellaneous
Applications
Code Snippets
Common Dialogs
Special Effects
Database Stuff
Date Time
Files Drives
Forms
Graphics Games
Internet Stuff
Multimedia
Other
Strings
Windows
Visual Basic > ActiveX Controls sample source codes
Writing to a Text File in A particular Row Col
Writing to a Text File in A particular Row Col Function Say(Row As Integer, Col As Integer, ToPassString As String) ' Function to print a text at the given X & Y 'Routine to Initialse the Printer If (Row = 0 And Col = 1) Then ToPassString = Chr(27) + "@" + ToPassString End If If IsNull(gFileNum) Or gFileNum = 0 Then gFileNum = 1 ' Initialising over If Row <> OldX Then Y = 1 If POldString <> "" Then Print #gFileNum, POldString End If POldString = Space(Col - Y) + ToPassString For i = 1 To Row - OldX - 1 Print #gFileNum, Next i Else If Col > Len(POldString) Then POldString = POldString + Space(Col - Len(POldString) - 1) + ToPassString Else POldString = POldString + ToPassString End If End If OldX = Row Y = Col + Len(ToPassString) End Function
Privacy Policy
|
Link to Us
|
Links