
February 26th, 2006, 09:05 PM
| | | How do I tell FIREFOX to open a file
Hi, I am invoking Firefox, and for testing IE, from my VB program. The
instruction are of this kind:
Process.Start("IExplore.exe", Parameter)
Process.Start("Firefox.exe", Parameter)
where Parameter is a string with the path of the web page:
Parameter="C:\Documents and Settings\User\Desktop\Visual Studio
Projects\Test\bin\Html\webpage.htm"
Both the commands open correctly the respective applications. IE6 also
open the file. Firefox does NOT open the file. It opens and gives this
message:
-----------------------------
File not found
Firefox can't find the file at /C:/Documents.
* Check the file name for capitalization or other typing errors.
* Check to see if the file was moved, renamed or deleted.
Try Again
----------------------------
Could you tell me how to modify the file name string (Parameter), so
that Firefox take it correctly ? How does it expect the file name?
-Pam | 
February 26th, 2006, 09:55 PM
| | | Re: How do I tell FIREFOX to open a file pamelafluente@libero.it wrote:[color=blue]
> Hi, I am invoking Firefox, and for testing IE, from my VB program. The
> instruction are of this kind:
>
> Process.Start("IExplore.exe", Parameter)
> Process.Start("Firefox.exe", Parameter)
>
> where Parameter is a string with the path of the web page:
>
> Parameter="C:\Documents and Settings\User\Desktop\Visual Studio
> Projects\Test\bin\Html\webpage.htm"
>
> Both the commands open correctly the respective applications. IE6 also
> open the file. Firefox does NOT open the file. It opens and gives this
> message:
> -----------------------------
> File not found
> Firefox can't find the file at /C:/Documents.
> * Check the file name for capitalization or other typing errors.
> * Check to see if the file was moved, renamed or deleted.
> Try Again
> ----------------------------
>
> Could you tell me how to modify the file name string (Parameter), so
> that Firefox take it correctly ? How does it expect the file name?
>
> -Pam[/color]
Try URLEncoding the path - replacing the spaces with %20
HTH
/P. | 
February 26th, 2006, 10:05 PM
| | | Re: How do I tell FIREFOX to open a file
BRAVO!!
this did it:
Try
FileName = "file:///" & FileName.Replace(" ", "%20")
System.Diagnostics.Process.Start("Firefox.exe", FileName)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Information)
End Try
Thank you verry much!!
PS
Firefox, is always more rigorous than IE, eh? !
Is any other char that, for generality, I should take care of?
-Pam
Paxton ha scritto:
[color=blue]
> pamelafluente@libero.it wrote:[color=green]
> > Hi, I am invoking Firefox, and for testing IE, from my VB program. The
> > instruction are of this kind:
> >
> > Process.Start("IExplore.exe", Parameter)
> > Process.Start("Firefox.exe", Parameter)
> >
> > where Parameter is a string with the path of the web page:
> >
> > Parameter="C:\Documents and Settings\User\Desktop\Visual Studio
> > Projects\Test\bin\Html\webpage.htm"
> >
> > Both the commands open correctly the respective applications. IE6 also
> > open the file. Firefox does NOT open the file. It opens and gives this
> > message:
> > -----------------------------
> > File not found
> > Firefox can't find the file at /C:/Documents.
> > * Check the file name for capitalization or other typing errors.
> > * Check to see if the file was moved, renamed or deleted.
> > Try Again
> > ----------------------------
> >
> > Could you tell me how to modify the file name string (Parameter), so
> > that Firefox take it correctly ? How does it expect the file name?
> >
> > -Pam[/color]
>
> Try URLEncoding the path - replacing the spaces with %20
>
> HTH
>
> /P.[/color] | 
February 26th, 2006, 10:25 PM
| | | Re: How do I tell FIREFOX to open a file
If you are using dotnet, the System.Web.HttpUtility class offers a
URLEncode method you can use which will take care of all chars that
might cause problems.
/P.
pamelaflue...@libero.it wrote:[color=blue]
> BRAVO!!
>
> this did it:
>
> Try
> FileName = "file:///" & FileName.Replace(" ", "%20")
> System.Diagnostics.Process.Start("Firefox.exe", FileName)
> Catch ex As Exception
> MsgBox(ex.Message, MsgBoxStyle.Information)
> End Try
>
> Thank you verry much!!
>
> PS
> Firefox, is always more rigorous than IE, eh? !
>
> Is any other char that, for generality, I should take care of?
>
>
> -Pam
>
> Paxton ha scritto:
>[color=green]
> > pamelafluente@libero.it wrote:[color=darkred]
> > > Hi, I am invoking Firefox, and for testing IE, from my VB program. The
> > > instruction are of this kind:
> > >
> > > Process.Start("IExplore.exe", Parameter)
> > > Process.Start("Firefox.exe", Parameter)
> > >
> > > where Parameter is a string with the path of the web page:
> > >
> > > Parameter="C:\Documents and Settings\User\Desktop\Visual Studio
> > > Projects\Test\bin\Html\webpage.htm"
> > >
> > > Both the commands open correctly the respective applications. IE6 also
> > > open the file. Firefox does NOT open the file. It opens and gives this
> > > message:
> > > -----------------------------
> > > File not found
> > > Firefox can't find the file at /C:/Documents.
> > > * Check the file name for capitalization or other typing errors.
> > > * Check to see if the file was moved, renamed or deleted.
> > > Try Again
> > > ----------------------------
> > >
> > > Could you tell me how to modify the file name string (Parameter), so
> > > that Firefox take it correctly ? How does it expect the file name?
> > >
> > > -Pam[/color]
> >
> > Try URLEncoding the path - replacing the spaces with %20
> >
> > HTH
> >
> > /P.[/color][/color] | 
February 26th, 2006, 11:35 PM
| | | Re: How do I tell FIREFOX to open a file
I am doing a Windows Application, not a web application.
If I use:
FileName = System.Web.HttpUtility.HtmlEncode(FileName)
I get this compiler error: 'HttpUtility' is not a member of 'Web'
I am not sure whether the above can be used in Windows application
(??). It would seems that is related with the presence of a web server.
I am not sure but I am afraid I have to code the filtering manually.
Is there a place with a full list of all need to be filtered so that I
can do it?
I could do something on the lines (perhaps a little awkward, eh?):
Dim WebSymbols As String() = New String() { _
"&", "&", _
">", ">", _
"<", "<", _
...
" ", " ", _
vbCrLf, "<br>" _
}
Function MyHtmlEncode(ByVal Text As String) As String
Dim WebText As New System.Text.StringBuilder(Text)
For i As Integer = 0 To WebSymbols.Length - 1 Step 2
WebText = WebText.Replace(WebSymbols(i), WebSymbols(i + 1))
Next i
Return WebText.ToString
End Function
In this case I would need a complete list of symbols. Any hint or
pointer? | 
February 27th, 2006, 10:15 AM
| | | Re: How do I tell FIREFOX to open a file pamelafluente@libero.it wrote:[color=blue]
> I am doing a Windows Application, not a web application.
> If I use:
>
> FileName = System.Web.HttpUtility.HtmlEncode(FileName)
>
> I get this compiler error: 'HttpUtility' is not a member of 'Web'
>
> I am not sure whether the above can be used in Windows application
> (??). It would seems that is related with the presence of a web server.
> I am not sure but I am afraid I have to code the filtering manually.
>
> Is there a place with a full list of all need to be filtered so that I
> can do it?
>
> I could do something on the lines (perhaps a little awkward, eh?):
>
> Dim WebSymbols As String() = New String() { _
> "&", "&", _
> ">", ">", _
> "<", "<", _
> ...
> " ", " ", _
> vbCrLf, "<br>" _
> }
>
>
> Function MyHtmlEncode(ByVal Text As String) As String
>
> Dim WebText As New System.Text.StringBuilder(Text)
> For i As Integer = 0 To WebSymbols.Length - 1 Step 2
> WebText = WebText.Replace(WebSymbols(i), WebSymbols(i + 1))
> Next i
> Return WebText.ToString
>
> End Function
>
> In this case I would need a complete list of symbols. Any hint or
> pointer?[/color]
I would have thought you could import the namespace into your project
and use its methods. I thought that was one of the main points behind
OOP in dotnet.
Alternatively, create a blank file in notepad, give it a name using all
the legal filename special characters and save it as an htm file -
something like "£$% ^&!*()_+=-.htm. Then browse to it with Firefox
and see which of the special chars it's happy with, and which ones it
encodes in the address bar.
If you want further advice/help with dotnet, one of the
microsoft.public.dotnet.framework* groups would be best. The CSS bods
of this group are probably wondering what on earth we are going on
about :-)
/P. | 
February 27th, 2006, 12:05 PM
| | | Re: How do I tell FIREFOX to open a file pamelafluente@libero.it schrieb:[color=blue]
> BRAVO!!
>
> this did it:
>
> Try
> FileName = "file:///" & FileName.Replace(" ", "%20")
> System.Diagnostics.Process.Start("Firefox.exe", FileName)
> Catch ex As Exception
> MsgBox(ex.Message, MsgBoxStyle.Information)
> End Try
>
> Thank you verry much!!
>[/color]
What's that got to do with CSS? | 
February 27th, 2006, 05:55 PM
| | | Re: How do I tell FIREFOX to open a file
Yes, Christian is perfectly right!!
Actually, it's because the original question regarded essentially
Firefox.
I remember that in the past I came here a couple of times and actually
the guys here let me understand how important is Firefox in the
browser's world (where I am it is hardly known) and how important is to
make application which also support well Firefox.
I also remembered how good and helpful are the people in this group. So
having a question about Firefox, this seemed the first choice to go.
Sorry if it is turning OT.
Ah, an observation (more on topic) . I have seen that in web page we
(and hence any filter) replace " " with while within the command
line this doesn't work and it wants "%20". So I am just thinking that
perhaps for the the command line (file name, etc.) the replacement can
be different wrt to the html body (??) Is this so?
thank you very much
-Pam
The CSS bods[color=blue]
> of this group are probably wondering what on earth we are going on
> about :-)
>
> /P.[/color] | 
February 28th, 2006, 01:35 PM
| | | Re: How do I tell FIREFOX to open a file
In <1141062047.068833.228510@e56g2000cwe.googlegroups .com>, on
02/27/2006
at 09:40 AM, pamelafluente@libero.it said:
[color=blue]
>I also remembered how good and helpful are the people in this group.[/color]
Sure, for questions about CSS. Why do you expect people to be less
helpful if you post a question to the proper group?
--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>
Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to spamtrap@library.lspace.org | | Thread Tools | Search this Thread | | | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 205,338 network members.
|