Ich hab folgenden Code, für ein verändertes Webbrowsercontrol gefunden.
Here's the translation of the IWebBrowser2 interface to VB.Net...
<ComImport, TypeLibType((TypeLibTypeFlags.FOleAutomation Or ( _
TypeLibTypeFlags.FDual Or TypeLibTypeFlags.FHidden))), Guid( _
"D30C1661-CDAF-11d0-8A3E-00C04FC9E26E"), SuppressUnmanagedCodeSecurity> _
Public Interface IWebBrowser2
' Methods
<DispId(301)> _
Sub ClientToWindow(<Out> ByRef pcx As Integer, <Out> ByRef pcy As Integer)
<DispId(502)> _
Sub ExecWB(<In> ByVal cmdID As OLECMDID, <In> ByVal cmdexecopt As _
OLECMDEXECOPT, ByRef pvaIn As Object, ByVal pvaOut As IntPtr)
<DispId(303)> _
Function GetProperty(<In> ByVal [property] As String) As Object
<DispId(100)> _
Sub GoBack()
<DispId(101)> _
Sub GoForward()
<DispId(102)> _
Sub GoHome()
<DispId(103)> _
Sub GoSearch()
<DispId(104)> _
Sub Navigate(<In> ByVal Url As String, <In> ByRef flags As Object, _
<In> ByRef targetFrameName As Object, <In> ByRef postData As _
Object, <In> ByRef headers As Object)
<DispId(500)> _
Sub Navigate2(<In> ByRef URL As Object, <In> ByRef flags As Object, _
<In> ByRef targetFrameName As Object, <In> ByRef postData As _
Object, <In> ByRef headers As Object)
<DispId(302)> _
Sub PutProperty(<In> ByVal [property] As String, <In> ByVal vtValue As Object)
<DispId(501)> _
Function QueryStatusWB(<In> ByVal cmdID As OLECMDID) As OLECMDF
<DispId(300)> _
Sub Quit()
<DispId(-550)> _
Sub Refresh()
<DispId(105)> _
Sub Refresh2(<In> ByRef level As Object)
<DispId(503)> _
Sub ShowBrowserBar(<In> ByRef pvaClsid As Object, <In> ByRef _
pvarShow As Object, <In> ByRef pvarSize As Object)
<DispId(106)> _
Sub [Stop]()
' Properties
<DispId(555)> _
Property AddressBar As Boolean
<DispId(200)> _
ReadOnly Property Application As <MarshalAs(UnmanagedType.IDispatch)> Object
<DispId(212)> _
ReadOnly Property Busy As Boolean
<DispId(202)> _
ReadOnly Property Container As <MarshalAs(UnmanagedType.IDispatch)> Object
<DispId(203)> _
ReadOnly Property Document As <MarshalAs(UnmanagedType.IDispatch)> Object
<DispId(400)> _
ReadOnly Property FullName As String
<DispId(407)> _
Property FullScreen As Boolean
<DispId(209)> _
Property Height As Integer
<DispId(-515)> _
ReadOnly Property HWND As Integer
<DispId(206)> _
Property Left As Integer
<DispId(210)> _
ReadOnly Property LocationName As String
<DispId(211)> _
ReadOnly Property LocationURL As String
<DispId(406)> _
Property MenuBar As Boolean
<DispId(0)> _
ReadOnly Property Name As String
<DispId(550)> _
Property Offline As Boolean
<DispId(201)> _
ReadOnly Property Parent As <MarshalAs(UnmanagedType.IDispatch)> Object
<DispId(401)> _
ReadOnly Property Path As String
<DispId(-525)> _
ReadOnly Property ReadyState As WebBrowserReadyState
<DispId(552)> _
Property RegisterAsBrowser As Boolean
<DispId(553)> _
Property RegisterAsDropTarget As Boolean
<DispId(556)> _
Property Resizable As Boolean
<DispId(551)> _
Property Silent As Boolean
<DispId(403)> _
Property StatusBar As Boolean
<DispId(404)> _
Property StatusText As String
<DispId(554)> _
Property TheaterMode As Boolean
<DispId(405)> _
Property ToolBar As Integer
<DispId(207)> _
Property Top As Integer
<DispId(204)> _
ReadOnly Property TopLevelContainer As Boolean
<DispId(205)> _
ReadOnly Property Type As String
<DispId(402)> _
Property Visible As Boolean
<DispId(208)> _
Property Width As Integer
End Interface Quelle: http://forums.microsoft.com/msdn/showpost.aspx?postid=7228&siteid=1&PageID=1
Jetzt ist meine Frage: Wie wend ich das in VB.NET an, ich komm mit den Beispielen in C# überhaupt nicht weiter...
[Ich bin noch dabei Visual Basic zu verstehen, wär nett, wenn ihr mir etwas Beispielcode posten könntet, um mich auf den richtigen weg zu bringen - Also ich hab jetzt ein neues Modul angelegt und den code da rein kopiert... nachdem ich
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.ComponentModel
Imports System.Runtime.InteropServices alles eingefügt hab, sind es auch weniger Fehlermeldungen geworden. Aber so richtig weitergebracht hat es mich auch nicht in der Anwendung...
Aller Anfang ist schwer, aber ich geb mir doch Mühe]
________________
Schonmal schönen DANK, an alle die hier gern helfen |