473,386 Members | 1,873 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,386 software developers and data experts.

webbrowser control border

Using VS 2005, load a very simple document using <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
results in a 3D border around the control at run time. Load the same
document using <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN"> and there is no 3D border. I am trying to eliminate
the 3D border. I have tried setting the <body> border style in the
document to overide this, but it has no affect when <!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> is in place. Would anyone
know how to address this? Thanks.

Feb 22 '06 #1
3 4770
<cd*********@datacor.com> schrieb:
Using VS 2005, load a very simple document using <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
results in a 3D border around the control at run time. Load the same
document using <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN"> and there is no 3D border. I am trying to eliminate
the 3D border. I have tried setting the <body> border style in the
document to overide this, but it has no affect when <!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> is in place. Would anyone
know how to address this?


Did you already try '<body style="border: none">...</body>'?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Feb 22 '06 #2
I did.

Feb 22 '06 #3
Implement the IDocHostUIHandler interface in the parent form, and in
GetHostInfo() set

dwflags = DOCHOSTUIFLAG_NO3DBORDER

something like this

<code>
Public Function GetHostInfo(ByRef pInfo As DOCHOSTUIINFO) As HRESULT
Implements IDocHostUIHandler.GetHostInfo

With pInfo
.cbSize = Len(pInfo)

' Turn off 3D-border, and some other optional stuff
.dwFlags = DOCHOSTUIFLAG.DOCHOSTUIFLAG_DIV_BLOCKDEFAULT Or _
DOCHOSTUIFLAG.DOCHOSTUIFLAG_FLAT_SCROLLBAR Or _
DOCHOSTUIFLAG.DOCHOSTUIFLAG_NO3DBORDER

.dwDoubleClick = DOCHOSTUIDBLCLK.DOCHOSTUIDBLCLK_DEFAULT
.pchHostCss = 0
.pchHostNS = 0
End With

Return HRESULT.S_OK

End Function
</code>

You set your form as the UI handler by calling this function

<code>
Private Sub SetUIHandler()

'************************************************* ********
' Get a handle to the ICustomDoc interface on the document
Dim icd As ICustomDoc

icd = DirectCast(WebBrowser1.Document.DomDocument, ICustomDoc)

icd.SetUIHandler(Me)
'************************************************* ********

'*** Remember to wait for the readyState to go to "complete" before
returning ***

End Sub
</code>

HTH

Charles
<cd*********@datacor.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Using VS 2005, load a very simple document using <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
results in a 3D border around the control at run time. Load the same
document using <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN"> and there is no 3D border. I am trying to eliminate
the 3D border. I have tried setting the <body> border style in the
document to overide this, but it has no affect when <!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> is in place. Would anyone
know how to address this? Thanks.

Feb 28 '06 #4

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

Similar topics

0
by: Trevor Fairchild | last post by:
I'm trying to have VB6 write an html file during run-time, with some VBScript functionality. The intent is to display images based on the current record within the program - using a WebBrowser -...
5
by: Noozer | last post by:
I've got a WebBrowser control (AxBrowse - VCMAXB.DLL) and I'm having a few difficulties with it. Just looking for a few pointers, not whole solutions here. I've tried looking at the MSDN help files...
9
by: ASP .NET Newbie | last post by:
How can I run a WebBrowser control using ASP.NET/VB.NET? I know I can use the WebClient to get the page data, but I need to be able to use the WebBrowser (AxWebBrowser)? Thanks, Chad
0
by: Jim Hubbard | last post by:
How would I implement the IDispatch interface to handle the following in VB.Net <BEGIN> Controlling Download and Execution The WebBrowser Control gives you control over what it downloads,...
0
by: Quantix | last post by:
I've been having a number of headaches trying to use the Webbrowser control and MSHTML to generate off screen images of webpages. I've got it working on a good number of sites, except the following...
12
by: Alex Clark | last post by:
Greetings, (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs). I've decided to take advantage of the layout characteristics of HTML documents to simplify my printing tasks, but...
8
by: Prosperz | last post by:
Hi, I would like to make thumbnails of web page by capture content of a WebBrowser. By example, capture http://www.google.com. I used WebBrowser control with Framework 2.0. I try this : ...
11
by: Anil Gupte | last post by:
....and how do I insert one into my form? I used in VB 6.0 last, but cannot figure out where it is in .Net Thanx, -- Anil Gupte www.keeninc.net www.icinema.com
5
by: kimiraikkonen | last post by:
Hi, I couldn't find a necessary class which shows when mouse hovers on a link in Webbrowser control. Think of there's a status bar(text), when mouse comes on a link, the URL must be shown in...
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:
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...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.