473,385 Members | 1,780 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Add to Favorites / Organize Favorites dialogs

I'm implementing the WebBrowser control in my app and I would like to be able
to show the Add to Favorites and Organize Favorites dialogs that are used in
Internet Explorer. Is this possible?

Thanks,
Lance

Nov 21 '05 #1
17 2630
ljEvend,

Was it you I showed this week the as far as I remember me first and last
(greath) help I ever got from Herfried.

\\\
AxWebBrowser.Navigate("about:<html><body
onload=javascript:window.external.addFavorite('" + textbox1.Text +
"')></body></html>")
///

I hope this helps,

Cor
Nov 21 '05 #2
"ljlevend2" <lj*******@nospam.nospam> schrieb:
I'm implementing the WebBrowser control in my app and I would like to be
able
to show the Add to Favorites and Organize Favorites dialogs that are used
in
Internet Explorer. Is this possible?


Normally this should work using 'ExecWB' + 'IDM_ADDFAVORITES', but I could
not get it work.

'IDM_ADDFAVORITES' Command ID
<URL:http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/mshtml/reference/commandids.asp>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
Thanks a lot for the idea. That sounds similar to what I am looking for, but
I could not get it to work. Any other ideas or suggestions?

Thanks again,
Lance

Nov 21 '05 #4
Peter,

""Peter Huang" [MSFT]" <v-******@online.microsoft.com> schrieb:
So far the AxWebBrowser1.ExecWB method did not support IDM_ADDFAVORITES.
I didn't find any information in the documentation which states that
'IDM_ADDFAVORITES' is not supported by 'WebBrowser', however, as it doesn't
work it is obviously not supported.
I think you may try Cor's suggestion


ACK. If you do not want to change the URL in the primary webbrowser control
you may want to place a second webbrowser control on the form and prevent
the user from accessing it as shown below:

\\\

' Dummy webbrowser control used to display the favorites dialog.
With Me.AxWebBrowser2
.TabStop = False
.Size = New Size(0, 0)
End With
Me.AxWebBrowser1.Navigate("http://dotnet.mvps.org/dotnet/")
..
..
..
Me.AxWebBrowser2.Navigate( _
"about:<html><head></head>" & _
"<body onload=""javascript:window.external.addFavorite('" & _
Me.AxWebBrowser1.LocationURL & _
"');""></body></html>" _
)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5
Peter,
think you may try Cor's suggestion


I think that Herfried did not see that it is his sollution, therefore you
did probably of course mean.

"Think you may try Cor's suggestion to use Herfrieds solution showed in far
past to Cor".

Although I agree with you probably as well that this is very confusing for
the OP.

:-)))

Cor
Nov 21 '05 #6
Hi

Thank's Herfried and Cor's reply.
I am sorry I did not make it clear, I do not mean IWebBrowser2 unmanged
interface did not support IDM_ADDFAVORITES.
I means the AxWebrowser managed Wrap did not have the option
IDM_ADDFAVORITES, if we use VB.NET with ExecWB, the intellisence will popup
a list which did not include the IDM_ADDFAVORITES.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #7
> ACK. If you do not want to change the URL in the primary webbrowser control
you may want to place a second webbrowser control on the form and prevent
the user from accessing it as shown below:


It looks like that should work, but unfortunately I do not know how to
create the AxWebBrowser. I am only familiar with the
Windows.Forms.WebBrowser control. If you could help me with this I think I
would be in good shape.

Thanks again,
Lance

Nov 21 '05 #8
"ljlevend2" <lj*******@nospam.nospam> schrieb:
ACK. If you do not want to change the URL in the primary webbrowser
control
you may want to place a second webbrowser control on the form and prevent
the user from accessing it as shown below:


It looks like that should work, but unfortunately I do not know how to
create the AxWebBrowser. I am only familiar with the
Windows.Forms.WebBrowser control. If you could help me with this I think
I
would be in good shape.


Are you using .NET 2.0?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #9
Yes, I am using v2.0.

"Herfried K. Wagner [MVP]" wrote:
"ljlevend2" <lj*******@nospam.nospam> schrieb:
ACK. If you do not want to change the URL in the primary webbrowser
control
you may want to place a second webbrowser control on the form and prevent
the user from accessing it as shown below:


It looks like that should work, but unfortunately I do not know how to
create the AxWebBrowser. I am only familiar with the
Windows.Forms.WebBrowser control. If you could help me with this I think
I
would be in good shape.


Are you using .NET 2.0?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #10
Hi

In 2.0, we have wrap the WebBrowser control as a buildin control, we do not
try to generate the AxWebBrowser via COM Interop, just use the WebBrowser
control.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #11
Thanks. I am using the WebBrowser control in v2.0. The problem is that I
don't see things like ExecWB or IDM_ADDFAVORITES. I also tried the following
example from Herfried for showing favorites, but that didn't work (which I
assume is because I was using the WebBrowser control in v2.0 rather than
AxWebBrowser).

Me.AxWebBrowser2.Navigate( _
"about:<html><head></head>" & _
"<body onload=""javascript:window.external.addFavorite('" & _
Me.AxWebBrowser1.LocationURL & _
"');""></body></html>" _
)

So, I guess what I need to know is how to show the Add to Favorites and
Organize Favorites dialogs when using the WebBrowser control in v2.0.

Thanks again!
Lance
""Peter Huang" [MSFT]" wrote:
Hi

In 2.0, we have wrap the WebBrowser control as a buildin control, we do not
try to generate the AxWebBrowser via COM Interop, just use the WebBrowser
control.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #12
Hi,

Currently I am researching the issue and we will reply here with more
information as soon as possible.
If you have any more concerns on it, please feel free to post here.

Thanks for your understanding!

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #13
Hi

Based on my research, I think you may to add a COM reference to the dll
below from the ToolBox(just as you do with an ocx) and you will get the
AxWebBrowser.
c:\WINDOWS\system32\shdocvw.dll

And then you can use the Cor's suggestion that use the code below to add
fav.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Me.AxWebBrowser1.Navigate( _
"about:<html><head></head>" & _
"<body onload=""javascript:window.external.addFavorite('" & _
Me.AxWebBrowser1.LocationURL & _
"');""></body></html>" _
)
End Sub

Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Me.AxWebBrowser1.Navigate("www.google.com")
End Sub

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #14
That is great! Thanks a lot. Do you know if there is a similar way to show
the Organize Favorites dialog?

Thanks again!
Lance

Nov 21 '05 #15
Hi

You can use the similar ways.
Me.AxWebBrowser1.Navigate( _
"about:<html><head></head>" & _
"<body
onload=""javascript:window.external.ShowBrowserUI( 'OrganizeFavorites',null);
""></body></html>" _
)
Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 23 '05 #16
That's great. Thanks again!
Lance

Nov 23 '05 #17
Hi

You are welcomed!

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 23 '05 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Alexandre Almeida | last post by:
hello, how can i put my IE favorites into a database(access). i'm trying to manage my favotites using a web page. thanks on advance AA
9
by: shank | last post by:
Is there any one "add to favorites" code that will work for IE, NS, AOL, and a host of others? At least some code that will give me an effective "add to favorites" for the highest percentage of...
5
by: JP | last post by:
I have the need to be able to access the IE5+ favorites menu, read the title and URL for each shortcut so I can render the person's favorites list on a web page. The project I'm working on is...
9
by: Dennis Ruppert | last post by:
Greetings This is rather ambitious: I have a split database that contains many different reports. I have a form that the end user launches the reports from. They select the report criteria...
2
by: clintonG | last post by:
I've been hunting around. Does anybody have a URL to Microsoft'sdocumentation for Favorites? -- <%= Clinton Gallagher METROmilwaukee (sm) "A Regional Information Service" NET csgallagher AT...
2
by: Tom McL. | last post by:
I have a new computer which came with sp2 and framework 1.1. I have noticed that my favorites that contain links to visual basic.net subjects that were saved under the earlier version framework...
5
by: draken | last post by:
Basically, what I am looking to do is to sync up browsers favorites via a website without a download. I thought of javascript when first doing this, as I know, mozilla would allow me to pull them...
6
by: Killer42 | last post by:
I have actually asked a pretty similar question here in the past, without a great deal of success. But I've decided to try a different tack. So, what are the ways in which a network admin could...
5
by: andrewq2 | last post by:
I have a post in fourms.micorsoft.com but no one is responding, and i had good luck in google groups befor so i decieded on posting my question here also. Im trying to add a favorites function to...
0
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
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...
0
marktang
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.