[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 183
  • Last Modified:

In vb5 Open Notepad with contents of text box

In vb5 is it possible to write code to Open Notepad with contents of a text box copied into notepad.  If so How?
0
donb1
Asked:
donb1
1 Solution
 
Erick37Commented:
Try this:

Private Sub Command1_Click()
    Dim pid As Long
    'Open Notepad
    pid = Shell("notepad.exe", vbNormalFocus)
    'Copy the text to clipboard
    Clipboard.Clear
    Clipboard.SetText Text1.Text, 1
    'Send a shift+ins to paste text into notepad
    SendKeys "+{INSERT}"
End Sub
0
 
donb1Author Commented:
works great, thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now