![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
pamelafluente (AT) libero (DOT) it wrote: 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 Try URLEncoding the path - replacing the spaces with %20 HTH /P. |
#4
| |||
| |||
|
|
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: pamelafluente (AT) libero (DOT) it wrote: 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 Try URLEncoding the path - replacing the spaces with %20 HTH /P. |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
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? |
#7
| |||
| |||
|
|
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!! |
#8
| |||
| |||
|
|
of this group are probably wondering what on earth we are going on about :-) /P. |
#9
| |||
| |||
|
|
I also remembered how good and helpful are the people in this group. |
![]() |
| Thread Tools | |
| Display Modes | |
| |