473,753 Members | 7,825 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Web Browser Control in VB .net

Hi,
Iam a newbie to dotnet and I experience problems in using the Browser
control in VB .net. Though Iam able to use it with its basic features,
I need to customise it.

http://www.codeproject.com/books/0764549146_8.asp
The above link shows where what I want is achived in C#, but I need t
oa cjhive the same in VB .net.

Someone help and guidance would be much appreciated.

Regards
GOkul
Jul 19 '05 #1
17 57394
Gokul

The web page you referenced comes back with an error for me. Can you check
it and re-post. Also, can you be more specific about the kind of problems
you are having?

Charles
"gokul" <go********@yah oo.com> wrote in message
news:c1******** *************** **@posting.goog le.com...
Hi,
Iam a newbie to dotnet and I experience problems in using the Browser
control in VB .net. Though Iam able to use it with its basic features,
I need to customise it.

http://www.codeproject.com/books/0764549146_8.asp
The above link shows where what I want is achived in C#, but I need t
oa cjhive the same in VB .net.

Someone help and guidance would be much appreciated.

Regards
GOkul

Jul 19 '05 #2
Hi Charles Law,
Iam a newbie to dotnet and I experience problems in using the Browser
control in VB .net.
Though Iam able to use it with its basic features,
I need to customise it.

http://www.codeproject.com/books/0764549146_8.asp

The above links works perfectly....fi ne for me...please try copying and
pasting the link in the browser.
check the HTML customisation part....
Listing 8-36:: The Complete Code for MainForm of MyCustomWebBrow ser

This is the code which I need in VB.Net.
Regards
Gokul

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3
Hi Gokul

I can see the code you are referring to. There is a lot there, and much of
it can be achieved with the WebBrowser control directly, without any special
effort.

You say you are able to use it with basic features, so I am not sure which
ones are causing you problems. Rather than trawl through the listing, can
you identify some of the specific problems you are having? For example, to
print you would use

AxWebBrowser1.E xecWB(OLECMDID_ PRINT, OLECMDEXECOPT_P ROMPTUSER)

Alternatively, are you trying to show a custom context menu with the
IDocHostUIHandl er interface, or is it something else?

Regards

Charles
"Gokul RajaD" <gr***@rediffma il.com> wrote in message
news:OA******** *****@tk2msftng p13.phx.gbl...
Hi Charles Law,
Iam a newbie to dotnet and I experience problems in using the Browser
control in VB .net.
Though Iam able to use it with its basic features,
I need to customise it.

http://www.codeproject.com/books/0764549146_8.asp

The above links works perfectly....fi ne for me...please try copying and
pasting the link in the browser.
check the HTML customisation part....
Listing 8-36:: The Complete Code for MainForm of MyCustomWebBrow ser

This is the code which I need in VB.Net.
Regards
Gokul

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #4
Dear Charles Law,
I need to remove the 3D border of the Webbrowser control, they say it
could be achieved using IDocHostUIHandl er.

and also Iam trying to change the Context menu.
Apart from it Iam trying to capture the word/text on which the mouse
is pointing using API calls.....do u have any idea about it!!!!?

Thank You for the prompt replies.

Letz work on it to make a wonderful product and share the Concepts and
ideas.
Regards
Gokul
Jul 19 '05 #5
Hi Gokul

Ok, here goes. It works something like this.

First, include the following interface definition stuff somewhere convenient
(I have a separate module with these kind of interfaces in):

<code>
Public Enum DOCHOSTUIFLAG
DOCHOSTUIFLAG_D IALOG = &H1
DOCHOSTUIFLAG_D ISABLE_HELP_MEN U = &H2
DOCHOSTUIFLAG_N O3DBORDER = &H4
DOCHOSTUIFLAG_S CROLL_NO = &H8
DOCHOSTUIFLAG_D ISABLE_SCRIPT_I NACTIVE = &H10
DOCHOSTUIFLAG_O PENNEWWIN = &H20
DOCHOSTUIFLAG_D ISABLE_OFFSCREE N = &H40
DOCHOSTUIFLAG_F LAT_SCROLLBAR = &H80
DOCHOSTUIFLAG_D IV_BLOCKDEFAULT = &H100
DOCHOSTUIFLAG_A CTIVATE_CLIENTH IT_ONLY = &H200
DOCHOSTUIFLAG_O VERRIDEBEHAVIOR FACTORY = &H400
DOCHOSTUIFLAG_C ODEPAGELINKEDFO NTS = &H800
DOCHOSTUIFLAG_U RL_ENCODING_DIS ABLE_UTF8 = &H1000
DOCHOSTUIFLAG_U RL_ENCODING_ENA BLE_UTF8 = &H2000
DOCHOSTUIFLAG_E NABLE_FORMS_AUT OCOMPLETE = &H4000
DOCHOSTUIFLAG_E NABLE_INPLACE_N AVIGATION = &H10000
DOCHOSTUIFLAG_I ME_ENABLE_RECON VERSION = &H20000
DOCHOSTUIFLAG_T HEME = &H40000
DOCHOSTUIFLAG_N OTHEME = &H80000
DOCHOSTUIFLAG_N OPICS = &H100000
DOCHOSTUIFLAG_N O3DOUTERBORDER = &H200000
End Enum

Public Enum DOCHOSTUIDBLCLK
DOCHOSTUIDBLCLK _DEFAULT = 0
DOCHOSTUIDBLCLK _SHOWPROPERTIES = 1
DOCHOSTUIDBLCLK _SHOWCODE = 2
End Enum

' MSG structure
<StructLayout(L ayoutKind.Seque ntial)> _
Public Structure MSG
Dim hwnd As IntPtr
Dim message As Integer
Dim wParam As Integer
Dim lParam As Integer
Dim time As Integer
Dim pt As tagPOINT
End Structure

' DOCHOSTUIINFO structure
<StructLayout(L ayoutKind.Seque ntial)> _
Public Structure DOCHOSTUIINFO
Dim cbSize As Integer
Dim dwFlags As DOCHOSTUIFLAG
Dim dwDoubleClick As DOCHOSTUIDBLCLK
Dim pchHostCss As String
Dim pchHostNS As String
End Structure

' OLEMENUGROUPWID THS structure
<StructLayout(L ayoutKind.Seque ntial)> _
Public Structure OLEMENUGROUPWID THS
<MarshalAs(Unma nagedType.ByVal Array, SizeConst:=6)> _
Dim width() As Integer
End Structure

' ICustomDoc interface
<ComVisible(Tru e), ComImport(),
Guid("3050f3f0-98b5-11cf-bb82-00aa00bdce0b"), _
InterfaceTypeAt tribute(ComInte rfaceType.Inter faceIsIUnknown) > _
Public Interface ICustomDoc
Sub SetUIHandler(By Val pUIHandler As IDocHostUIHandl er)
End Interface

' IOleWindow interface
<ComVisible(Tru e), ComImport(),
Guid("00000114-0000-0000-C000-000000000046"), _
InterfaceTypeAt tribute(ComInte rfaceType.Inter faceIsIUnknown) > _
Public Interface IOleWindow
Sub GetWindow(ByVal phwnd As IntPtr)
Sub ContextSensitiv eHelp(ByVal fEnterMode As Boolean)
End Interface

' IOleInPlaceActi veObject interface
<ComVisible(Tru e), ComImport(),
Guid("00000117-0000-0000-C000-000000000046"), _
InterfaceTypeAt tribute(ComInte rfaceType.Inter faceIsIUnknown) > _
Public Interface IOleInPlaceActi veObject : Inherits IOleWindow
' IOleWindow interface
Shadows Sub GetWindow(ByVal phwnd As IntPtr)
Shadows Sub ContextSensitiv eHelp(ByVal fEnterMode As Boolean)
Sub TranslateAccele rator(ByRef lpmsg As MSG)
Sub OnFrameWindowAc tivate(ByVal fActivate As Boolean)
Sub OnDocWindowActi vate(ByVal fActivate As Boolean)
Sub ResizeBorder(By Ref prcBorder As tagRECT, ByVal pUIWindow As
IOleInPlaceUIWi ndow, ByVal fFrameWindow As Boolean)
Sub EnableModeless( ByVal fEnable As Boolean)
End Interface

' IOleInPlaceUIWi ndow interface
<ComVisible(Tru e), ComImport(),
Guid("00000115-0000-0000-C000-000000000046"), _
InterfaceTypeAt tribute(ComInte rfaceType.Inter faceIsIUnknown) > _
Public Interface IOleInPlaceUIWi ndow : Inherits IOleWindow
' IOleWindow interface
Shadows Sub GetWindow(ByVal phwnd As IntPtr)
Shadows Sub ContextSensitiv eHelp(ByVal fEnterMode As Boolean)
Sub GetBorder(ByRef lprectBorder As tagRECT)
Sub RequestBorderSp ace(ByRef pborderwidths As tagRECT)
Sub SetBorderSpace( ByRef pborderwidths As tagRECT)
Sub SetActiveObject (ByVal pActiveObject As IOleInPlaceActi veObject,
ByVal pszObjName As String)
End Interface

' IDropTarget interface
<ComVisible(Tru e), ComImport(),
Guid("00000122-0000-0000-C000-000000000046"), _
InterfaceTypeAt tribute(ComInte rfaceType.Inter faceIsIUnknown) > _
Public Interface IDropTarget
Sub DragEnter(ByVal pDataObj As IDataObject, ByVal grfKeyState As
Integer, ByVal pt As tagPOINT, ByRef pdwEffect As Integer)
Sub DragOver(ByVal grfKeyState As Integer, ByVal pt As tagPOINT, ByRef
pdwEffect As Integer)
Sub DragLeave()
Sub Drop(ByVal pDataObj As IDataObject, ByVal grfKeyState As Integer,
ByVal pt As tagPOINT, ByRef pdwEffect As Integer)
End Interface

' IOleInPlaceFram e interface
<ComVisible(Tru e), ComImport(),
Guid("00000116-0000-0000-C000-000000000046"), _
InterfaceTypeAt tribute(ComInte rfaceType.Inter faceIsIUnknown) > _
Public Interface IOleInPlaceFram e : Inherits IOleInPlaceUIWi ndow
' IOleWindow interface
Shadows Sub GetWindow(ByVal phwnd As IntPtr)
Shadows Sub ContextSensitiv eHelp(ByVal fEnterMode As Boolean)

' IOleInPlaceUIWi ndow interface
Shadows Sub GetBorder(ByRef lprectBorder As tagRECT)
Shadows Sub RequestBorderSp ace(ByRef pborderwidths As tagRECT)
Shadows Sub SetBorderSpace( ByRef pborderwidths As tagRECT)
Shadows Sub SetActiveObject (ByVal pActiveObject As
IOleInPlaceActi veObject, ByVal pszObjName As String)

' TODO: hmenuShared should be a reference to a remotable handle
Sub InsertMenus(ByV al hmenuShared As IntPtr, ByRef lpMenuWidths As
OLEMENUGROUPWID THS)
Sub SetMenu(ByVal hmenuShared As IntPtr, ByVal holemenu As IntPtr, ByVal
hwndActiveObjec t As IntPtr)
Sub RemoveMenus(ByV al hmenuShared As IntPtr)
Sub SetStatusText(B yVal pszStatusText As String)
Sub EnableModeless( ByVal fEnable As Boolean)
Sub TranslateAccele rator(ByRef lpmsg As MSG, ByVal wID As UInt16)
End Interface

' IDocHostUIHandl er interface
<ComVisible(Tru e), ComImport(),
Guid("bd3f23c0-d43e-11cf-893b-00aa00bdce1a"), _
InterfaceTypeAt tribute(ComInte rfaceType.Inter faceIsIUnknown) > _
Public Interface IDocHostUIHandl er

<PreserveSig( )> _
Function ShowContextMenu ( _
ByVal dwID As Integer, _
ByRef ppt As tagPOINT, _
<MarshalAs(Unma nagedType.IUnkn own)> ByVal pcmdtReserved As Object, _
<MarshalAs(Unma nagedType.IDisp atch)> ByVal pdispReserved As Object)
As Integer

Sub GetHostInfo(ByR ef pInfo As DOCHOSTUIINFO)

<PreserveSig( )> _
Function ShowUI( _
ByVal dwID As Integer, _
ByVal pActiveObject As IOleInPlaceActi veObject, _
ByVal pCommandTarget As IOleCommandTarg et, _
ByVal pFrame As IOleInPlaceFram e, _
ByVal pDoc As IOleInPlaceUIWi ndow) As Integer

Sub HideUI()
Sub UpdateUI()
Sub EnableModeless( ByVal fEnable As Boolean)
Sub OnDocWindowActi vate(ByVal fActivate As Boolean)
Sub OnFrameWindowAc tivate(ByVal fActivate As Boolean)

Sub ResizeBorder( _
ByRef prcBorder As tagRECT, _
ByVal pUIWindow As IOleInPlaceUIWi ndow, _
ByVal fFrameWindow As Boolean)

<PreserveSig( )> _
Function TranslateAccele rator( _
ByRef lpMsg As MSG, _
ByRef pguidCmdGroup As Guid, _
ByVal nCmdID As Integer) As Integer

Sub GetOptionKeyPat h( _
ByRef pchKey As String, _
ByVal dw As Integer)

Sub GetDropTarget( _
ByVal pDropTarget As IDropTarget, _
ByRef ppDropTarget As IDropTarget)

Sub GetExternal(<Ma rshalAs(Unmanag edType.IDispatc h)> ByRef ppDispatch As
Object)

<PreserveSig( )> _
Function TranslateUrl( _
ByVal dwTranslate As Integer, _
ByRef pchURLIn As UInt16, _
ByVal ppchURLOut As IntPtr) As Integer

<PreserveSig( )> _
Function FilterDataObjec t( _
ByVal pDO As IDataObject, _
ByRef ppDORet As IDataObject) As Integer

End Interface
</code>

Next, create a class (I call mine DocHostUIHandle r) and implement
IDocHostUIHandl er. If you are using V2003 you will get all the subs and
functions filled in for you; wonderful.

For convenience, define the following at the top of the class.

<code>
Private Const S_OK As Integer = 0
Private Const S_FALSE As Integer = 1
</code>

For every function that you are not going to intercept, return S_FALSE. That
will signal that you have not provided your own implementation. If you want
to prevent something, like the context menu, you can return S_TRUE in
ShowContextMenu (), for example. To change it, provide your own and then
return S_TRUE.

Now create a function in you main code, somewhere:

<code>
Private Sub SetUIHandler()

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

icd = CType(AxWebBrow ser1.Document, ICustomDoc)
icd.SetUIHandle r(New DocHostUIHandle r)

' *** Make sure you wait for a readystate of DocumentComplet e here ***

End Sub
</code>

Now, call SetUIHandler in the DocumentComplet e event of the AxWebBrowser1.

Finally, going back to the class that implements IDocHostUIHandl er, my
GetHostInfo does this:

<code>
With pInfo
.cbSize = Len(pInfo)
.dwFlags = DOCHOSTUIFLAG.D OCHOSTUIFLAG_DI V_BLOCKDEFAULT
.dwDoubleClick = DOCHOSTUIDBLCLK .DOCHOSTUIDBLCL K_DEFAULT
End With
</code>

You can set the flags to what you like, for example, one of them affects the
3D border. The definition of the flags is in the MSDN.

Well, that's it. I hope I've included everything. Let me know how you get
on.
HTH

Charles
"gokul" <go********@yah oo.com> wrote in message
news:c1******** *************** ***@posting.goo gle.com...
Dear Charles Law,
I need to remove the 3D border of the Webbrowser control, they say it
could be achieved using IDocHostUIHandl er.

and also Iam trying to change the Context menu.
Apart from it Iam trying to capture the word/text on which the mouse
is pointing using API calls.....do u have any idea about it!!!!?

Thank You for the prompt replies.

Letz work on it to make a wonderful product and share the Concepts and
ideas.
Regards
Gokul

Jul 19 '05 #6
Hi Gokul
When you say you could not implement GetHostInfo, did you get an error, or
did it just not work?

Here is my version of GetHostInfo:

<code>
Public Sub GetHostInfo(ByR ef pInfo As DOCHOSTUIINFO) Implements
IDocHostUIHandl er.GetHostInfo

With pInfo
.cbSize = Len(pInfo)
.dwFlags = DOCHOSTUIFLAG.D OCHOSTUIFLAG_DI V_BLOCKDEFAULT Or _
DOCHOSTUIFLAG.D OCHOSTUIFLAG_FL AT_SCROLLBAR Or _
DOCHOSTUIFLAG.D OCHOSTUIFLAG_NO 3DBORDER

.dwDoubleClick = DOCHOSTUIDBLCLK .DOCHOSTUIDBLCL K_DEFAULT
End With

End Sub
<code>

This successfully removes the 3D border, and also gives me a flat scroll
bar.

For additional information, I am using Windows 2000, SP4 and VS2003

Regards

Charles
"gokul" <go********@yah oo.com> wrote in message
news:c1******** *************** ***@posting.goo gle.com...
Hi Charles,
Thank you for a wonderful reply.
I was able to implement your code, but stuck half the way......I
implemented the Context Menu but Iam unable to implement
GetHostInfo.... .to remove 3D borders.....cou ld you please send me a
code snippet.

Not to forget the smile :) it brought, when the code was working.....
Thanks for it once again.
Regards
Gokul Raja.D

Jul 19 '05 #7
Hi Charles,

By the time I replied U sat on it to give a last shot..........a nd
made it to work after a couple of tweaks......... ......

Its pretty fine.......now. ....

Thank You

Regards
Gokul Raja.D
Jul 19 '05 #8
The tweaks are:

1.
These Interface(IOleC ommandTarget) were missing and it gave an error
during Compilation, so I added this code:
<code>
<StructLayout(L ayoutKind.Seque ntial)> _
Public Structure OLECMDTEXT
Public cmdtextf As UInt32
Public cwActual As UInt32
Public cwBuf As UInt32
Public rgwz As Char
End Structure

<StructLayout(L ayoutKind.Seque ntial)> _
Public Structure OLECMD
Public cmdID As Long
Public cmdf As UInt64
End Structure

' Interop definition for IOleCommandTarg et.
<ComImport(), Guid("b722bccb-4e68-101b-a2bc-00aa00404770"), _
InterfaceType(C omInterfaceType .InterfaceIsIUn known)> _
Public Interface IOleCommandTarg et
Sub QueryStatus(ByR ef pguidCmdGroup As Guid, ByVal cCmds As
UInt32, _
<MarshalAs(Unma nagedType.LPArr ay, SizeParamIndex: =1)> ByVal
prgCmds As OLECMD, _
ByRef pCmdText As OLECMDTEXT)

Sub Exec(ByRef pguidCmdGroup As Guid, ByVal nCmdId As Long, _
ByVal nCmdExecOpt As Long, ByRef pvaIn As Object, _
ByRef pvaOut As Object)
End Interface
</code>

2. During the first time the Noborder or FlatScroll..... none of the
setting were taking place only we load it again it got
implemented...s o just triggered as follows:
AxWebBrowser1.N avigate("about: blank")
AxWebBrowser1.N avigate("http://www.google.com" )

So this tweak allowed to achieve the desired effect on the Control
during load itself......... ..
It works pretty fine now......
Regards
Gokul Raja.D
Jul 19 '05 #9
Hi Gokul

Yes, sorry for missing those out. I have included mine below. They are
different in some places. It won't make any difference to you at this stage,
but I would suggest changing them because it will make a difference if you
use the IOLECommandTarg et interface in future. In particular, the 'longs'
translate to integers in .NET.

<code>
' OLECMD
<StructLayout(L ayoutKind.Seque ntial)> _
Public Structure OLECMD
Public cmdID As Int32
Public cmdf As Int32
End Structure

' OLECMDTEXT
<StructLayout(L ayoutKind.Seque ntial, CharSet:=CharSe t.Unicode)> _
Public Class OLECMDTEXT
Public cmdtextf As OLECMDTEXTF
Public cwActual As Int32
Private cwBuf As Int32 = 256 'Make sure this is the same as SizeConst
below

<MarshalAs(Unma nagedType.ByVal TStr, SizeConst:=256) > _
Public text As String
End Class

' IOleCommandTarg et interface
<ComImport(), Guid("b722bccb-4e68-101b-a2bc-00aa00404770"), _
InterfaceType(C omInterfaceType .InterfaceIsIUn known)> _
Public Interface IOleCommandTarg et

Sub QueryStatus(ByR ef pguidCmdGroup As Guid, ByVal cCmds As Int32, _
<InAttribute( ), Out(), MarshalAs(Unman agedType.LPArra y,
SizeParamIndex: =1)> ByVal prgCmds() As OLECMD, <InAttribute( ), Out()> ByVal
pCmdText As OLECMDTEXT)

Sub Exec(ByRef pguidCmdGroup As Guid, ByVal nCmdId As Int32, _
ByVal nCmdExecOpt As Int32, ByVal pvaIn As OLEVARIANT, ByVal pvaOut
As OLEVARIANT)

End Interface
</code>

Also, I would recommend putting a wait after every navigate. I call a
function WaitReady(), below

<code>
Private Sub WaitReady()
Do Until AxWebBrowser1.R eadyState =
SHDocVw.tagREAD YSTATE.READYSTA TE_COMPLETE
Application.DoE vents()
Loop
End Sub
</code>

You could probably dispense with the second navigate then.

The reason for the wait is that pages are loaded asynchronously. Therefore,
the first navigate returns immediately, even before the page has been
initialised. The second navigate then causes the first one to be cancelled,
and the second page gets loaded.

As a general rule, before doing anything else, always navigate to
about:blank and wait for complete. This ensures that the control is always
fully initialised before you proceed.

HTH

Charles
"gokul" <go********@yah oo.com> wrote in message
news:c1******** *************** ***@posting.goo gle.com...
The tweaks are:

1.
These Interface(IOleC ommandTarget) were missing and it gave an error
during Compilation, so I added this code:
<code>
<StructLayout(L ayoutKind.Seque ntial)> _
Public Structure OLECMDTEXT
Public cmdtextf As UInt32
Public cwActual As UInt32
Public cwBuf As UInt32
Public rgwz As Char
End Structure

<StructLayout(L ayoutKind.Seque ntial)> _
Public Structure OLECMD
Public cmdID As Long
Public cmdf As UInt64
End Structure

' Interop definition for IOleCommandTarg et.
<ComImport(), Guid("b722bccb-4e68-101b-a2bc-00aa00404770"), _
InterfaceType(C omInterfaceType .InterfaceIsIUn known)> _
Public Interface IOleCommandTarg et
Sub QueryStatus(ByR ef pguidCmdGroup As Guid, ByVal cCmds As
UInt32, _
<MarshalAs(Unma nagedType.LPArr ay, SizeParamIndex: =1)> ByVal
prgCmds As OLECMD, _
ByRef pCmdText As OLECMDTEXT)

Sub Exec(ByRef pguidCmdGroup As Guid, ByVal nCmdId As Long, _
ByVal nCmdExecOpt As Long, ByRef pvaIn As Object, _
ByRef pvaOut As Object)
End Interface
</code>

2. During the first time the Noborder or FlatScroll..... none of the
setting were taking place only we load it again it got
implemented...s o just triggered as follows:
AxWebBrowser1.N avigate("about: blank")
AxWebBrowser1.N avigate("http://www.google.com" )

So this tweak allowed to achieve the desired effect on the Control
during load itself......... ..
It works pretty fine now......
Regards
Gokul Raja.D

Jul 19 '05 #10

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

Similar topics

12
3520
by: Simon Harvey | last post by:
Whato chaps, I work (or am hoping to work! :) for a company that specialises in the following: - Localisation of media - including software, manuals, literature and training material. - Creating training material themselves in many langauges built to order. The main thing I'm thinking about for the company is maybe a sort of content
2
2374
by: dxben | last post by:
I am considering a situation where I have (n) number of form windows, each with an instance of the Microsoft Web Browser Control (IE) on each form. In each web browser control is an HTML page that has a Java applet. This is the only way I am aware of to get a Java applet to paint within a .NET Forms window. Given that scenario I am trying to determine whethere there would be one Java VM loaded for all of the (n) applets inside the (n) MS...
0
2464
by: AlanF | last post by:
Here is my perplexing issue and I've looked EVERYWHERE for help (well almost everywhere.... probably should have started here :)) I am using a Webclient to successfully retrieve a "downloadata" string that contains a fully formed HTML page from a CGI-based process on a Web server. I need to use the Webclient because it a) allows me to specifiy credentials and b) forms the query string in a very readable and maintainable fashion. Here is...
0
1836
by: Nigel | last post by:
I successfully create a .NET Component (Visual Basic .NET) that would print, unfortunately when used within a web browser it appears that .NET security doesn't allow you to run code that interacts with the file system (including printing) from the web browser. How do I disabled this so I can get my windows form control to work within IE? Also, do any have any printing code or know how I can implement multipage printing using the...
15
4778
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update button will verify the information that has been entered and updates the data base if the data is correct. Update will throw an exception if the data is not validate based on some given rules. I also have a custom error handling page to show the...
1
4775
by: Oenone | last post by:
I've reached the conversion of a part of my application from VB6 to VB.NET which uses the COM Web Browser control to display HTML content generated by my application. The general approach used in VB6 is as follows: Open the form containing the browser Wait a few seconds for the Browser.Document property to initialise With the Document object, call the following methods: .Clear()
5
2015
by: BrianGenisio | last post by:
Hello all, Suppose I am using the browser control in my application to display my own HTML code. Now, suppose I want to show images on the page that I currently have in memory. One way to do this is to write the image to the file system... presumably the temp space... and then grab the IHtmlImgElement object, and set the source to the file location. This works really well.
2
10396
by: Lyle Fairfield | last post by:
I am using Microsoft’s Web Browser Control embedded on an Access Form to browse a specific site. I have a good reason for doing so; the pages on this site run code which aborts their display unless their window is the top window; they also treat all child windows as not-logged in windows. So I have not accomplished what I want with HTA’s or IFrames or Pop-Up Windows. But the Access Form/MS Web Browser combination gives me a top window with...
53
4751
by: Hexman | last post by:
Hello All, I'd like your comments on the code below. The sub does exactly what I want it to do but I don't feel that it is solid as all. It seems like I'm using some VB6 code, .Net2003 code, and .Net2005 code. I'm developing in vb.net 2005. This test sub just reads an input text file, writing out records to another text file, eliminating records that have a '99' in them (it is similar to a CSV file). Some of my concerns are:
4
1742
by: James | last post by:
Hello everyone, While loading a page (http://www.edmonton.ca/portal/server.pt?space=CommunityPage&control=SetCommunity&CommunityID=239) into a webbrowser control I use invokemember on the 'onclick' event from 'cmdBusStopScheduleSubmit' element - see below. ONCLICK ========= <input type="submit" name="cmdBusStopScheduleSubmit" value="Get Bus Stop
0
9072
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9653
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9333
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6151
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4771
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4942
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3395
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2872
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2284
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.