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. How to open word or notepad from the vb.net link?

How to open word or notepad from the vb.net link?

Scheduled Pinned Locked Moved Visual Basic
csharptutorialquestion
7 Posts 4 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.
  • U Offline
    U Offline
    User 2232424
    wrote on last edited by
    #1

    Hai, I am beginners of vb.net. I want to open word or notepad or any exe files through from the vb.net link. How it is possible? any body knows give some idea to me.

    D P 2 Replies Last reply
    0
    • U User 2232424

      Hai, I am beginners of vb.net. I want to open word or notepad or any exe files through from the vb.net link. How it is possible? any body knows give some idea to me.

      D Offline
      D Offline
      darkshadow
      wrote on last edited by
      #2

      If nobody offers a better idea, this is how it was done in vb6. Perhaps you can use this as a starting point: Private Declare Function ShellExecute Lib "shell32.dll" _ Alias "ShellExecuteA" _ (ByVal hwnd As Long, ByVal lpOperation As String, _ ByVal lpFile As String, ByVal lpParameters As String, _ ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Private Const SW_SHOWNORMAL As Long = 1 Dim nResult As Long, pathName As String pathname = nResult = ShellExecute(Me.hwnd, "Open", pathname , 0, 0, SW_SHOWNORMAL)

      1 Reply Last reply
      0
      • U User 2232424

        Hai, I am beginners of vb.net. I want to open word or notepad or any exe files through from the vb.net link. How it is possible? any body knows give some idea to me.

        P Offline
        P Offline
        PranjalSharma
        wrote on last edited by
        #3

        There is a method which runs .exe files or .bat files etc in vb.net. System.Diagnostics.Process.Start() here the code try this Add a linklabel to a form and on linkclicked event write this code System.Diagnostics.Process.Start("notepad.exe") 'This would open a notepad and if you want to open a WordPad. Then in place of "Notepad.exe" write "WordPad.exe" -I Hope This Helps ... Pranjal :)

        A 1 Reply Last reply
        0
        • P PranjalSharma

          There is a method which runs .exe files or .bat files etc in vb.net. System.Diagnostics.Process.Start() here the code try this Add a linklabel to a form and on linkclicked event write this code System.Diagnostics.Process.Start("notepad.exe") 'This would open a notepad and if you want to open a WordPad. Then in place of "Notepad.exe" write "WordPad.exe" -I Hope This Helps ... Pranjal :)

          A Offline
          A Offline
          Anonymous
          wrote on last edited by
          #4

          Thank u verymuch for ur timely help.

          A 1 Reply Last reply
          0
          • A Anonymous

            Thank u verymuch for ur timely help.

            A Offline
            A Offline
            Anonymous
            wrote on last edited by
            #5

            Sir, Fine seeing ur reply immediately.its a great effort. one more help please.i have form with some input fields and i insert those values into database and below the form i have a datagrid to which i view the data which add to database i.e. whole data that are present inthe database. but my problem is the data gets added but its getting repeated in viewing the datagrid.i tried using datagrid.refresh method it doesnt work . is there anyother method to view the data in the datagrid without getting repeated.kindly help me. and i thank u in advance for ur effort.

            P 1 Reply Last reply
            0
            • A Anonymous

              Sir, Fine seeing ur reply immediately.its a great effort. one more help please.i have form with some input fields and i insert those values into database and below the form i have a datagrid to which i view the data which add to database i.e. whole data that are present inthe database. but my problem is the data gets added but its getting repeated in viewing the datagrid.i tried using datagrid.refresh method it doesnt work . is there anyother method to view the data in the datagrid without getting repeated.kindly help me. and i thank u in advance for ur effort.

              P Offline
              P Offline
              PranjalSharma
              wrote on last edited by
              #6

              take a dataset fill it using a DataAdapter the assign this dataset to grid's datasource property. When ever you save the data then first call dataset.clear() it would clear existing data in dataset, then refill the dataset using DataAdapter and reassign dataset to grids datasource. this would prevent showing repetative entries in grid. ...Pranjal

              A 1 Reply Last reply
              0
              • P PranjalSharma

                take a dataset fill it using a DataAdapter the assign this dataset to grid's datasource property. When ever you save the data then first call dataset.clear() it would clear existing data in dataset, then refill the dataset using DataAdapter and reassign dataset to grids datasource. this would prevent showing repetative entries in grid. ...Pranjal

                A Offline
                A Offline
                Anonymous
                wrote on last edited by
                #7

                Thank u verymuch for ur timely help

                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