Home All Groups Group Topic Archive Search About
Author
30 Dec 2006 4:09 PM
lakepeir
Hello,

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

Author
30 Dec 2006 4:18 PM
Herfried K. Wagner [MVP]
<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/>
Author
31 Dec 2006 2:48 AM
lakepeir
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/>
Author
31 Dec 2006 3:22 AM
Bruce W. Darby
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/>
>
Author
4 Jan 2007 3:42 PM
lakepeir
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/>
> >
Author
31 Dec 2006 4:07 AM
Tom Leylan
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/>
>
Author
4 Jan 2007 3:49 PM
lakepeir
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/>
> >