Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9138141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:13:04+00:00 2026-06-17T09:13:04+00:00

I want to open Notepad from Silverlight and then paste some text into it.

  • 0

I want to open Notepad from Silverlight and then paste some text into it. I was able to use the clipboard method to move the text I want to the clipboard. Then I use shell to open notepad. The final step is to paste the contents of the clipboard into notepad. This can be done by the user pressing Ctrl-V or Edit – Paste

However, this is an unsatisfactory solution. I’d like to automate the last step, pasting the clipboard into notepad.

Here is my code:

 System.Windows.Clipboard.SetText(l_StringBuilder.ToString)


                ' next open notepad
  OpenShell("notepad.exe")


  System.Windows.Clipboard.GetText() ‘ this does not work


    Private Sub OpenShell(p_Program As String)
        Try
            If (AutomationFactory.IsAvailable) Then
                Dim shell = AutomationFactory.CreateObject("Shell.Application")


                shell.ShellExecute(p_Program) 'Open notepad

            End If

        Catch ex As Exception
            MessageBox.Show(ex.ToString)

        End Try
    End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:13:05+00:00Added an answer on June 17, 2026 at 9:13 am

    I got the answer in another forum. Here is the link to it:

    http://social.msdn.microsoft.com/Forums/en-US/silverlightnet/thread/b787244d-a0a9-4aea-8858-e94644742ff0/#05ca684e-1d22-4bca-a207-9c422a7cf5d6

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use tempfile.NamedTemporaryFile() to write some contents into it and then open
i want to open notepad, word or excel files from sql server using some
I want to open a MFC modeless dialog from a MFC dll injected into
From c#, I want to launch a process which will open a text file
I am making a Java program and want to open a text(notepad) file ,that
I want it like when we do open with and then choose Notepad. So
I read a text file from the hard drive, then I want to put
I want to open a notepad file using VisualBasic.Interaction.Shell method. At present I get
I want open a path to vim from Screen's copy-mode by Ctrl-A f similarly
Want to open firefox from terminal at linux with firebug enabled // Terminal $

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.