|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Process.StartHello,
I'm trying to launch a text file in the Notepad application. When I click the menu item, the application is not launched and the text file is not launched. Listed below is the code. Code: Private Sub MenuItem_Help_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MenuItem_Help.Click 'Process.Start("Notepad.exe", "Help.txt") End Sub <lakep***@yahoo.com> schrieb:
> I'm trying to launch a text file in the Notepad application. When I The line is commented out. Remove the "'" character in front of it.> click the menu item, the application is not launched and the text file > is not launched. Listed below is the code. > > Code: > > Private Sub MenuItem_Help_Click(ByVal sender As Object, ByVal e As > System.EventArgs) Handles MenuItem_Help.Click > 'Process.Start("Notepad.exe", "Help.txt") > End Sub -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> Oops. Sorry. I have modified the code by adding some additional
implementation and commenting that line out. The actual code is not commented out. It still doesn't launch the application. Thanks. Herfried K. Wagner [MVP] wrote: Show quoteHide quote > <lakep***@yahoo.com> schrieb: > > I'm trying to launch a text file in the Notepad application. When I > > click the menu item, the application is not launched and the text file > > is not launched. Listed below is the code. > > > > Code: > > > > Private Sub MenuItem_Help_Click(ByVal sender As Object, ByVal e As > > System.EventArgs) Handles MenuItem_Help.Click > > 'Process.Start("Notepad.exe", "Help.txt") > > End Sub > > The line is commented out. Remove the "'" character in front of it. > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://dotnet.mvps.org/dotnet/faqs/> Lakepier,
This may sound a bit simplistic, but is the path to the Help.txt file on the local machine? Or is it on a network? Bruce <lakep***@yahoo.com> wrote in message Show quoteHide quote news:1167533321.779242.278970@n51g2000cwc.googlegroups.com... > Oops. Sorry. I have modified the code by adding some additional > implementation and commenting that line out. The actual code is not > commented out. It still doesn't launch the application. > Thanks. > Herfried K. Wagner [MVP] wrote: >> <lakep***@yahoo.com> schrieb: >> > I'm trying to launch a text file in the Notepad application. When I >> > click the menu item, the application is not launched and the text file >> > is not launched. Listed below is the code. >> > >> > Code: >> > >> > Private Sub MenuItem_Help_Click(ByVal sender As Object, ByVal e As >> > System.EventArgs) Handles MenuItem_Help.Click >> > 'Process.Start("Notepad.exe", "Help.txt") >> > End Sub >> >> The line is commented out. Remove the "'" character in front of it. >> >> -- >> M S Herfried K. Wagner >> M V P <URL:http://dotnet.mvps.org/> >> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> > It's on a local machine.
Bruce W. Darby wrote: Show quoteHide quote > Lakepier, > > This may sound a bit simplistic, but is the path to the Help.txt file on the > local machine? Or is it on a network? > > Bruce > > <lakep***@yahoo.com> wrote in message > news:1167533321.779242.278970@n51g2000cwc.googlegroups.com... > > Oops. Sorry. I have modified the code by adding some additional > > implementation and commenting that line out. The actual code is not > > commented out. It still doesn't launch the application. > > Thanks. > > Herfried K. Wagner [MVP] wrote: > >> <lakep***@yahoo.com> schrieb: > >> > I'm trying to launch a text file in the Notepad application. When I > >> > click the menu item, the application is not launched and the text file > >> > is not launched. Listed below is the code. > >> > > >> > Code: > >> > > >> > Private Sub MenuItem_Help_Click(ByVal sender As Object, ByVal e As > >> > System.EventArgs) Handles MenuItem_Help.Click > >> > 'Process.Start("Notepad.exe", "Help.txt") > >> > End Sub > >> > >> The line is commented out. Remove the "'" character in front of it. > >> > >> -- > >> M S Herfried K. Wagner > >> M V P <URL:http://dotnet.mvps.org/> > >> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> > > Seriously this is only one line of code what could be programmed wrong?
It's not ASP code right? Here is what you do to debug these things. 1) trace it with the debugger and make certain the event fires and that line executes. 2) spell notepad.exe as "errorpad.exe" and see if it fails. 3) substitute any other app you have installed for notepad and see if it works. 4) open a new project, add a new form, add a new button and put the notepad code in that one. Let us know what happened. <lakep***@yahoo.com> wrote in message Show quoteHide quote news:1167533321.779242.278970@n51g2000cwc.googlegroups.com... > Oops. Sorry. I have modified the code by adding some additional > implementation and commenting that line out. The actual code is not > commented out. It still doesn't launch the application. > Thanks. > Herfried K. Wagner [MVP] wrote: >> <lakep***@yahoo.com> schrieb: >> > I'm trying to launch a text file in the Notepad application. When I >> > click the menu item, the application is not launched and the text file >> > is not launched. Listed below is the code. >> > >> > Code: >> > >> > Private Sub MenuItem_Help_Click(ByVal sender As Object, ByVal e As >> > System.EventArgs) Handles MenuItem_Help.Click >> > 'Process.Start("Notepad.exe", "Help.txt") >> > End Sub >> >> The line is commented out. Remove the "'" character in front of it. >> >> -- >> M S Herfried K. Wagner >> M V P <URL:http://dotnet.mvps.org/> >> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> > Thank you! It works. I put a breakpoint in the method and it never
executed. The code was in the incorrect method. Tom Leylan wrote: Show quoteHide quote > Seriously this is only one line of code what could be programmed wrong? > It's not ASP code right? > > Here is what you do to debug these things. > > 1) trace it with the debugger and make certain the event fires and that line > executes. > 2) spell notepad.exe as "errorpad.exe" and see if it fails. > 3) substitute any other app you have installed for notepad and see if it > works. > 4) open a new project, add a new form, add a new button and put the notepad > code in that one. > > Let us know what happened. > > <lakep***@yahoo.com> wrote in message > news:1167533321.779242.278970@n51g2000cwc.googlegroups.com... > > Oops. Sorry. I have modified the code by adding some additional > > implementation and commenting that line out. The actual code is not > > commented out. It still doesn't launch the application. > > Thanks. > > Herfried K. Wagner [MVP] wrote: > >> <lakep***@yahoo.com> schrieb: > >> > I'm trying to launch a text file in the Notepad application. When I > >> > click the menu item, the application is not launched and the text file > >> > is not launched. Listed below is the code. > >> > > >> > Code: > >> > > >> > Private Sub MenuItem_Help_Click(ByVal sender As Object, ByVal e As > >> > System.EventArgs) Handles MenuItem_Help.Click > >> > 'Process.Start("Notepad.exe", "Help.txt") > >> > End Sub > >> > >> The line is commented out. Remove the "'" character in front of it. > >> > >> -- > >> M S Herfried K. Wagner > >> M V P <URL:http://dotnet.mvps.org/> > >> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> > >
ExecuteNonQuery - problem
How to modify label.text in a dynamically generated label in VB.net Typing Markup Tags Ending in /> Forms ok in design mode, cropped in run mode, only on my monitor complie Errors Dumb question Open a file wiht "(" in the filename? question about returning value of a function RE: VB.NET Service Timer Issue Resource Directory VB.NET 2005 |
|||||||||||||||||||||||