Dear sirs
I`ve added Microsoft Web browser componet to my project
I`d like to know how can I view a web page in it?
thanks
Mohammed 7 2357
Mohammed,
Add this code.
//declaration
private AxSHDocVw.AxWebBrowser mTestBrowser;
//Initialization of browser
this.mTestBrowser = new AxSHDocVw.AxWebBrowser();
((System.ComponentModel.ISupportInitialize)(this.m TestBrowser)).BeginInit();
this.mTestBrowser.OcxState =
((System.Windows.Forms.AxHost.State)(resources.Get Object("mTestBrowse.OcxSta
te")));
((System.ComponentModel.ISupportInitialize)(this.m TestBrowser)).EndInit();
//declare events
this.mTestBrowse.DocumentComplete += new
AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent Handler(this.mTestBrowser_
DocumentComplete);
///To view webpage
object Zero = 0;
object EmptyString= "";
mTestBrowser.Navigate("http://www.microsoft.com", ref Zero, ref EmptyString,
ref EmptyString, ref EmptyString);
Shak
"Mohammed Abdel-Razzak" <an*******@discussions.microsoft.com> wrote in
message news:1d*****************************@phx.gbl... Dear sirs I`ve added Microsoft Web browser componet to my project I`d like to know how can I view a web page in it?
thanks Mohammed
Dear Sir
thanks very much for the code you gave me, it was really
so helpful
but actuallty I want to open a web page exists in my
computer not at the web
thanks
Mohammed -----Original Message----- Mohammed,
Add this code.
//declaration private AxSHDocVw.AxWebBrowser mTestBrowser;
//Initialization of browser this.mTestBrowser = new AxSHDocVw.AxWebBrowser(); ((System.ComponentModel.ISupportInitialize)
(this.mTestBrowser)).BeginInit();this.mTestBrowser.OcxState = ((System.Windows.Forms.AxHost.State)(resources.Ge tObject
("mTestBrowse.OcxState"))); ((System.ComponentModel.ISupportInitialize)
(this.mTestBrowser)).EndInit(); //declare events this.mTestBrowse.DocumentComplete += new AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEven tHandler
(this.mTestBrowser_DocumentComplete);
///To view webpage object Zero = 0; object EmptyString= ""; mTestBrowser.Navigate("http://www.microsoft.com", ref
Zero, ref EmptyString,ref EmptyString, ref EmptyString);
Shak "Mohammed Abdel-Razzak"
<an*******@discussions.microsoft.com> wrote inmessage news:1d*****************************@phx.gbl... Dear sirs I`ve added Microsoft Web browser componet to my project I`d like to know how can I view a web page in it?
thanks Mohammed
.
Mohammed,
In this case, change the first parameter of the call to Nagivate2 to the
path of your file, and it will load fine.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Mohammed Abdel-Razzak" <an*******@discussions.microsoft.com> wrote in
message news:1d*****************************@phx.gbl... Dear Sir thanks very much for the code you gave me, it was really so helpful but actuallty I want to open a web page exists in my computer not at the web
thanks Mohammed
-----Original Message----- Mohammed,
Add this code.
//declaration private AxSHDocVw.AxWebBrowser mTestBrowser;
//Initialization of browser this.mTestBrowser = new AxSHDocVw.AxWebBrowser(); ((System.ComponentModel.ISupportInitialize) (this.mTestBrowser)).BeginInit();this.mTestBrowser.OcxState = ((System.Windows.Forms.AxHost.State)(resources.Ge tObject ("mTestBrowse.OcxState"))); ((System.ComponentModel.ISupportInitialize) (this.mTestBrowser)).EndInit(); //declare events this.mTestBrowse.DocumentComplete += new AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEven tHandler
(this.mTestBrowser_DocumentComplete);
///To view webpage object Zero = 0; object EmptyString= ""; mTestBrowser.Navigate("http://www.microsoft.com", ref Zero, ref EmptyString,ref EmptyString, ref EmptyString);
Shak "Mohammed Abdel-Razzak" <an*******@discussions.microsoft.com> wrote inmessage news:1d*****************************@phx.gbl... Dear sirs I`ve added Microsoft Web browser componet to my project I`d like to know how can I view a web page in it?
thanks Mohammed
.
Sir
I`ve written the following code but it didn`t work and
gave me an error
this.axWebBrowser1.Navigate2("c:\\index.html", ref Zero,
ref EmptyString, ref EmptyString, ref EmptyString); -----Original Message----- Mohammed,
In this case, change the first parameter of the call
to Nagivate2 to thepath of your file, and it will load fine.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Mohammed Abdel-Razzak"
<an*******@discussions.microsoft.com> wrote inmessage news:1d*****************************@phx.gbl... Dear Sir thanks very much for the code you gave me, it was really so helpful but actuallty I want to open a web page exists in my computer not at the web
thanks Mohammed
>-----Original Message----- >Mohammed, > >Add this code. > >//declaration >private AxSHDocVw.AxWebBrowser mTestBrowser; > >//Initialization of browser >this.mTestBrowser = new AxSHDocVw.AxWebBrowser(); >((System.ComponentModel.ISupportInitialize) (this.mTestBrowser)).BeginInit(); >this.mTestBrowser.OcxState = >((System.Windows.Forms.AxHost.State)
(resources.GetObject ("mTestBrowse.OcxSta >te"))); >((System.ComponentModel.ISupportInitialize) (this.mTestBrowser)).EndInit(); > >//declare events >this.mTestBrowse.DocumentComplete += new AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEven tHandler (this.mTestBrowser_ >DocumentComplete); > >///To view webpage >object Zero = 0; >object EmptyString= ""; >mTestBrowser.Navigate("http://www.microsoft.com", ref Zero, ref EmptyString, >ref EmptyString, ref EmptyString); > >Shak > > > >"Mohammed Abdel-Razzak" <an*******@discussions.microsoft.com> wrote in >message news:1d*****************************@phx.gbl... >> Dear sirs >> I`ve added Microsoft Web browser componet to my
project >> I`d like to know how can I view a web page in it? >> >> thanks >> Mohammed > > >. >
.
Mohammed you have to pass
..Navigate2("file://c:\napabatch.bat",blah,blah)
to open the file from your computer.
Shak
"Mohammed Abdel-Razzak" <an*******@discussions.microsoft.com> wrote in
message news:1d*****************************@phx.gbl... Sir I`ve written the following code but it didn`t work and gave me an error
this.axWebBrowser1.Navigate2("c:\\index.html", ref Zero, ref EmptyString, ref EmptyString, ref EmptyString);
-----Original Message----- Mohammed,
In this case, change the first parameter of the call to Nagivate2 to thepath of your file, and it will load fine.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Mohammed Abdel-Razzak" <an*******@discussions.microsoft.com> wrote inmessage news:1d*****************************@phx.gbl... Dear Sir thanks very much for the code you gave me, it was really so helpful but actuallty I want to open a web page exists in my computer not at the web
thanks Mohammed
>-----Original Message----- >Mohammed, > >Add this code. > >//declaration >private AxSHDocVw.AxWebBrowser mTestBrowser; > >//Initialization of browser >this.mTestBrowser = new AxSHDocVw.AxWebBrowser(); >((System.ComponentModel.ISupportInitialize) (this.mTestBrowser)).BeginInit(); >this.mTestBrowser.OcxState = >((System.Windows.Forms.AxHost.State) (resources.GetObject ("mTestBrowse.OcxSta >te"))); >((System.ComponentModel.ISupportInitialize) (this.mTestBrowser)).EndInit(); > >//declare events >this.mTestBrowse.DocumentComplete += new AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEven tHandler (this.mTestBrowser_ >DocumentComplete); > >///To view webpage >object Zero = 0; >object EmptyString= ""; >mTestBrowser.Navigate("http://www.microsoft.com", ref Zero, ref EmptyString, >ref EmptyString, ref EmptyString); > >Shak > > > >"Mohammed Abdel-Razzak" <an*******@discussions.microsoft.com> wrote in >message news:1d*****************************@phx.gbl... >> Dear sirs >> I`ve added Microsoft Web browser componet to my project >> I`d like to know how can I view a web page in it? >> >> thanks >> Mohammed > > >. >
.
Sir
thanks very much it worked, but with ..Navigate
("file://c:\napabatch.bat",blah,blah)
not with Navigate2("file://c:\napabatch.bat",blah,blah)
thanks very much again
Mohammed -----Original Message----- Mohammed you have to pass
..Navigate2("file://c:\napabatch.bat",blah,blah)
to open the file from your computer.
Shak
"Mohammed Abdel-Razzak"
<an*******@discussions.microsoft.com> wrote inmessage news:1d*****************************@phx.gbl... Sir I`ve written the following code but it didn`t work and gave me an error
this.axWebBrowser1.Navigate2("c:\\index.html", ref Zero, ref EmptyString, ref EmptyString, ref EmptyString);
>-----Original Message----- >Mohammed, > > In this case, change the first parameter of the
call to Nagivate2 to the >path of your file, and it will load fine. > > >-- > - Nicholas Paldino [.NET/C# MVP] > - mv*@spam.guard.caspershouse.com > >"Mohammed Abdel-Razzak" <an*******@discussions.microsoft.com> wrote in >message news:1d*****************************@phx.gbl... >> Dear Sir >> thanks very much for the code you gave me, it was
really >> so helpful >> but actuallty I want to open a web page exists in my >> computer not at the web >> >> thanks >> Mohammed >> >> >> >-----Original Message----- >> >Mohammed, >> > >> >Add this code. >> > >> >//declaration >> >private AxSHDocVw.AxWebBrowser mTestBrowser; >> > >> >//Initialization of browser >> >this.mTestBrowser = new AxSHDocVw.AxWebBrowser(); >> >((System.ComponentModel.ISupportInitialize) >> (this.mTestBrowser)).BeginInit(); >> >this.mTestBrowser.OcxState = >> >((System.Windows.Forms.AxHost.State) (resources.GetObject >> ("mTestBrowse.OcxSta >> >te"))); >> >((System.ComponentModel.ISupportInitialize) >> (this.mTestBrowser)).EndInit(); >> > >> >//declare events >> >this.mTestBrowse.DocumentComplete += new >>
AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEven tHandler >> (this.mTestBrowser_ >> >DocumentComplete); >> > >> >///To view webpage >> >object Zero = 0; >> >object EmptyString= ""; >> >mTestBrowser.Navigate("http://www.microsoft.com",
ref >> Zero, ref EmptyString, >> >ref EmptyString, ref EmptyString); >> > >> >Shak >> > >> > >> > >> >"Mohammed Abdel-Razzak" >> <an*******@discussions.microsoft.com> wrote in >> >message news:1d5b301c453ba$7aedbe00
$a*******@phx.gbl... >> >> Dear sirs >> >> I`ve added Microsoft Web browser componet to my project >> >> I`d like to know how can I view a web page in it? >> >> >> >> thanks >> >> Mohammed >> > >> > >> >. >> > > > >. >
.
Mohammed.
Navigate - Navigates to a resource identified by a URL or to the file
identified by a full path.
Navigate2 - Navigates the browser to a location that might not be able to be
expressed as a URL, such as a pointer to an item identifier list (PIDL) for
an entity in the Microsoft Windows shell namespace
For your situation, you have to use Navigate. I am glad it worked.
Shak.
"Mohammed Abdel-Razzak" <an*******@discussions.microsoft.com> wrote in
message news:1d*****************************@phx.gbl... Sir thanks very much it worked, but with ..Navigate ("file://c:\napabatch.bat",blah,blah) not with Navigate2("file://c:\napabatch.bat",blah,blah)
thanks very much again Mohammed -----Original Message----- Mohammed you have to pass
..Navigate2("file://c:\napabatch.bat",blah,blah)
to open the file from your computer.
Shak
"Mohammed Abdel-Razzak" <an*******@discussions.microsoft.com> wrote inmessage news:1d*****************************@phx.gbl... Sir I`ve written the following code but it didn`t work and gave me an error
this.axWebBrowser1.Navigate2("c:\\index.html", ref Zero, ref EmptyString, ref EmptyString, ref EmptyString);
>-----Original Message----- >Mohammed, > > In this case, change the first parameter of the call to Nagivate2 to the >path of your file, and it will load fine. > > >-- > - Nicholas Paldino [.NET/C# MVP] > - mv*@spam.guard.caspershouse.com > >"Mohammed Abdel-Razzak" <an*******@discussions.microsoft.com> wrote in >message news:1d*****************************@phx.gbl... >> Dear Sir >> thanks very much for the code you gave me, it was really >> so helpful >> but actuallty I want to open a web page exists in my >> computer not at the web >> >> thanks >> Mohammed >> >> >> >-----Original Message----- >> >Mohammed, >> > >> >Add this code. >> > >> >//declaration >> >private AxSHDocVw.AxWebBrowser mTestBrowser; >> > >> >//Initialization of browser >> >this.mTestBrowser = new AxSHDocVw.AxWebBrowser(); >> >((System.ComponentModel.ISupportInitialize) >> (this.mTestBrowser)).BeginInit(); >> >this.mTestBrowser.OcxState = >> >((System.Windows.Forms.AxHost.State) (resources.GetObject >> ("mTestBrowse.OcxSta >> >te"))); >> >((System.ComponentModel.ISupportInitialize) >> (this.mTestBrowser)).EndInit(); >> > >> >//declare events >> >this.mTestBrowse.DocumentComplete += new >> AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEven tHandler >> (this.mTestBrowser_ >> >DocumentComplete); >> > >> >///To view webpage >> >object Zero = 0; >> >object EmptyString= ""; >> >mTestBrowser.Navigate("http://www.microsoft.com", ref >> Zero, ref EmptyString, >> >ref EmptyString, ref EmptyString); >> > >> >Shak >> > >> > >> > >> >"Mohammed Abdel-Razzak" >> <an*******@discussions.microsoft.com> wrote in >> >message news:1d5b301c453ba$7aedbe00 $a*******@phx.gbl... >> >> Dear sirs >> >> I`ve added Microsoft Web browser componet to my project >> >> I`d like to know how can I view a web page in it? >> >> >> >> thanks >> >> Mohammed >> > >> > >> >. >> > > > >. >
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Rory Plaire |
last post by:
Hi,
I've been working with the J# browser control. I understand that v1.1b is
scriptable, but can't find any examples on how to do this. Can someone point
me in the right direction?
thanks,...
|
by: R. Smits |
last post by:
I've have got this script, the only thing I want to be changed is the first
part. It has to detect IE version 6 instead of just "Microsoft Internet
Explorer". Can somebody help me out?
I tried...
|
by: Richard P |
last post by:
I am experiencing some browser weirdness.
My app uses session state to hide values I prefer to keep out of the
querystring. I am testing to see what happens when cookies are fully
disabled in IE...
|
by: hzgt9b |
last post by:
I am using a web browser control to display some PPT slides saved as HTML. My
client has recently asked that the background of the browser be changed to
sonething other than white so that the...
|
by: Xah Lee |
last post by:
Microsoft Hatred, FAQ
Xah Lee, 20020518
Question: U.S. Judges are not morons, and quite a few others are
not morons. They find MS guilty, so it must be true.
Answer: so did the German...
|
by: hb |
last post by:
Hi,
Would you please tell me how to detect if the client's browser is closed?
I need such event to trigger a database modification.
Thank you
hb
|
by: Paul W |
last post by:
Hi - can someone point me to info on the issues/resolutions of supporting
the safari browser?
To help me understand, if I was developing pages in say FrontPage, what
attributes would I set for...
|
by: |
last post by:
I am working on an ASP.NET application that seems to be limiting browser
histories to only one entry. I am not using SmartNavigation on any of the
pages, and that is the only thing that I have...
|
by: CMM |
last post by:
So I'm half way through overseeing a large project in ASP.NET 2.0. My
superiors have decided that it would be nice if we ensured the site worked
on all the major platforms (as they see it: IE,...
|
by: igotyourdotnet |
last post by:
I have a web app that I want to make the pages render correctly based on what
type of browser is connected. How can I determine if the browser is the
desktop IE version or a handheld device version?
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |