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