Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. printing directly from notepad

printing directly from notepad

Scheduled Pinned Locked Moved Visual Basic
linuxsecurityhelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    briogene
    wrote on last edited by
    #1

    i have the following string that i have passed to notepad Private Sub PrintNotepad() Dim MySecurity As New MajiDll.Security Dim strCode As String Dim myNum As Integer strCode = strCode & " NYERI WATER AND SEWERAGE COMPANY LIMITED {ENTER}" strCode = strCode & " P.O Box 1520 {ENTER}" strCode = strCode & " TEL 2034548,2034617,2034623{ENTER 2}" strCode = strCode & " DATE : " & Format(Date, "dd-mm-yy") & "{ENTER}" strCode = strCode & " TIME : " & Format(Time, "hh:mm:ss") & "{ENTER}" strCode = strCode & " NAME: " & lblname.Text & "{ENTER}" strCode = strCode & " ACCOUNT NUMBER: " & txtAccNo & "{ENTER}" strCode = strCode & " PAYMENT FOR : " & cboFundType & "{ENTER}" strCode = strCode & " AMOUNT RECEIVED : " & txtAmntReceived & "{ENTER}" strCode = strCode & " AMOUNT CHARGED : " & txtAmountApply & "{ENTER}" strCode = strCode & " CHANGE : " & lblbal & "{ENTER}" strCode = strCode & " The Sum of Kshs: " & MySecurity.numConverter(txtAmountApply, "Shillings") & "" Shell "Notepad.exe", vbNormalFocus SendKeys strCode, True End Sub Could some one out there help me in printing it directly to a printer as it first opens the notepad then u have to click print for it to print briogene

    C A 2 Replies Last reply
    0
    • B briogene

      i have the following string that i have passed to notepad Private Sub PrintNotepad() Dim MySecurity As New MajiDll.Security Dim strCode As String Dim myNum As Integer strCode = strCode & " NYERI WATER AND SEWERAGE COMPANY LIMITED {ENTER}" strCode = strCode & " P.O Box 1520 {ENTER}" strCode = strCode & " TEL 2034548,2034617,2034623{ENTER 2}" strCode = strCode & " DATE : " & Format(Date, "dd-mm-yy") & "{ENTER}" strCode = strCode & " TIME : " & Format(Time, "hh:mm:ss") & "{ENTER}" strCode = strCode & " NAME: " & lblname.Text & "{ENTER}" strCode = strCode & " ACCOUNT NUMBER: " & txtAccNo & "{ENTER}" strCode = strCode & " PAYMENT FOR : " & cboFundType & "{ENTER}" strCode = strCode & " AMOUNT RECEIVED : " & txtAmntReceived & "{ENTER}" strCode = strCode & " AMOUNT CHARGED : " & txtAmountApply & "{ENTER}" strCode = strCode & " CHANGE : " & lblbal & "{ENTER}" strCode = strCode & " The Sum of Kshs: " & MySecurity.numConverter(txtAmountApply, "Shillings") & "" Shell "Notepad.exe", vbNormalFocus SendKeys strCode, True End Sub Could some one out there help me in printing it directly to a printer as it first opens the notepad then u have to click print for it to print briogene

      C Offline
      C Offline
      Cameron Marsden
      wrote on last edited by
      #2

      Email me on code {at} osdirect dot com dot au and I will send you over a class that will help with the printing... :D Cam

      1 Reply Last reply
      0
      • B briogene

        i have the following string that i have passed to notepad Private Sub PrintNotepad() Dim MySecurity As New MajiDll.Security Dim strCode As String Dim myNum As Integer strCode = strCode & " NYERI WATER AND SEWERAGE COMPANY LIMITED {ENTER}" strCode = strCode & " P.O Box 1520 {ENTER}" strCode = strCode & " TEL 2034548,2034617,2034623{ENTER 2}" strCode = strCode & " DATE : " & Format(Date, "dd-mm-yy") & "{ENTER}" strCode = strCode & " TIME : " & Format(Time, "hh:mm:ss") & "{ENTER}" strCode = strCode & " NAME: " & lblname.Text & "{ENTER}" strCode = strCode & " ACCOUNT NUMBER: " & txtAccNo & "{ENTER}" strCode = strCode & " PAYMENT FOR : " & cboFundType & "{ENTER}" strCode = strCode & " AMOUNT RECEIVED : " & txtAmntReceived & "{ENTER}" strCode = strCode & " AMOUNT CHARGED : " & txtAmountApply & "{ENTER}" strCode = strCode & " CHANGE : " & lblbal & "{ENTER}" strCode = strCode & " The Sum of Kshs: " & MySecurity.numConverter(txtAmountApply, "Shillings") & "" Shell "Notepad.exe", vbNormalFocus SendKeys strCode, True End Sub Could some one out there help me in printing it directly to a printer as it first opens the notepad then u have to click print for it to print briogene

        A Offline
        A Offline
        AliAmjad
        wrote on last edited by
        #3

        briogene wrote:

        SendKeys strCode, True

        After this can't you send the Ctrl and P keys to execute the print command. hope it help !

        AliAmjad(MCP) First make it Run THEN make it Run Fast!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups