Jump to content
Xtreme .Net Talk

maxter

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by maxter

  1. Hello, I've problems with one assembly. I'm using and have referenced Microsoft.mshtml.dll, which is Primary Interop Assembly. It's in "D:\Program Files\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll". Public Class Enlaces Private Enlace As mshtml.HTMLAnchorElement Public Sub New(ByVal e As mshtml.HTMLAnchorElement) Try Enlace = New mshtml.HTMLAnchorElement() Enlace = e AddHandler DirectCast(Enlace, mshtml.HTMLAnchorEvents2_Event).onclick, AddressOf EnlaceOnClick Catch exc As Exception MsgBox("Error en constructor de Enlace: " + exc.Message, MsgBoxStyle.Critical) End Try End Sub Private Function EnlaceOnClick(ByVal pEvtObj As mshtml.IHTMLEventObj) As Boolean Return True End Function End Class I debugged it, and the sentece "Enlace = new mshtml.HTMLAnchorElement()" raise the follow error: "COM Objet with CLSID {3050F248-98B5-11CF-BB82-00AA00BDCE0B} is either not valid or not registered" I tried register it, with command "regsvr32" but with this I can't register it, when I execute regsvr32 "D:\Program Files\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll" raise new error: "D:\Program Files\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll was loaded, but the DllRegisterServer entry point was not found. DllRegisterServer may not be exported, or a corrupt version of D:\Program Files\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll may be in memory. Consider using PView to detect and remove it" Perhaps if is a assembly....so to register assemblies I use command regasm "D:\Program Files\Microsoft.NET\Primary InteropAssemblies\Microsoft.mshtml.dll" This go ok, but I can't resolve the problem. I don't know what is wrong, I'm lose. I found the CLSID in the registry with this values: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{3050F248-98B5-11CF-BB82-00AA00BDCE0B}\InprocServer32 Assembly: Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Class: mshtml.HTMLAnchorElementClass CodeBase: file:///D:/Program Files/Microsoft.NET/Primary Interop Assemblies/Microsoft.mshtml.dll RunTimeVersion: v1.0.3705 Please, help me. Thanks.
  2. Well we can capture click events, but in a HTML document there are forms, inputs, textareas, .... and if I want capture change events of several html components like inputs areas, textareas,... I've thinking about: - parse html document to extract each html control and add a eventhandler for it, is it possible?? or - wait until web page go to next page, but before capture the state of all html controls. Because i want record user actions over web pages. And after play user actions recorded automatically. Can u help me??? Thanks so much.
  3. NOW, I'M SURE. See... DATASETS is the key to 'serialize' DATA to XML. The DataSet class has several methods for reading and writing data as XML. For it, follow this steps: 1. Obtain data from your container or database. 2. Pass it to a DataSet. 3. Invoke to writeXML method of dataset class. See this example 'Saving a DataSet to a file as XML' 'Before you must populate DataSet . . . ' Save dataSet as XML. ds.WriteXml("mydataXML.xml") Its all. Also you can overload WriteXML method. To read data and import it again to a DataSet Dim ds As New DataSet( ) ds.ReadXml("mydataXML.xml") ALSO!! You can work as before with your own schema. Look at, you have to your use GetXml and GetXmlSchema methods to obtain the schema wich your DataSet work. And WriteXml and WriteXmlSchema methods to configure DataSet with your own schema.
  4. I'm confused... Well, data class, what like is it???? I think you needn't serialize your data class because Web Services .NET convert automaticaly in XML document. OK? You only must construct one function that returned a DataSet, and Web Service will converted to .XML document your DataSet automaticaly, doesn't? <webmethod()> public function GetAllDatas() as DataSet . . . return MyDataSet end function Perhaps, you want construct your own XML document. Then yes, you need serialize your data to your own document. At the end, if I was you, I serialize to XML if you need a particular XML document. And don't know, I'm so beginner......excuse me if it I'm saying, is stupid. Answer me and let me learn much. Bye.
  5. HTML DOM??? Doesn't the same that MSHTML Library, no? I think no. But is similar.
  6. needn't In my opinion... you needn't implement serializable class to develop a WebService. But is rare, that you want return a class. Normaly, in WebServices the results returned are access to ejecute functions, you can offer at user the functions or subs of the class. no.... I don't know, jejeje im beginner developer.... Bye.
  7. Can you tell me: Where can I found full reference about MSHTML Library? I found a reference in: Microsoft MSHTML reference But it doesn't FULL reference.
  8. SOLUTION kaka, i found the solution. I'm beginner in .net and I don't feel well with it. Ea replacing the follow function in the eventos class: ... Public Sub onmouseover(ByVal pEvtObj As mshtml.IHTMLEventObj) Dim HTML As String HTML = pEvtObj.srcElement.innerText System.Console.WriteLine (HTML) 'The follow line fail!!!!!!!!!! 'HTML = doc.parentWindow.event.srcElement.innerText End Sub ... Sorry by the intrusion. I'm sure that I'll return. Ooooh excuse my english is verry bad. I hope you understand me. See you. Agur.
  9. capture onmouseover browser event Hello, I have read this thread and i'm very interesed. But I have done several test and I can't get found my example program. The main problem: i can't capture the text of html element when onmouseover. Let me see show the code, follow: Public Class Eventos Private WithEvents IExplorer As SHDocVw.InternetExplorer Protected doc As mshtml.HTMLDocument Public Sub New() System.Console.WriteLine("Y yo estoy aqui??") If IExplorer Is Nothing Then IExplorer = New SHDocVw.InternetExplorer() End If 'doc = DirectCast(IExplorer.Document, mshtml.HTMLDocument) 'AddHandler DirectCast(doc, mshtml.HTMLDocumentEvents_Event).onmouseover, New mshtml.HTMLDocumentEvents_onmouseoverEventHandler(AddressOf onmouseover) End Sub Private Sub IExplorer_DownloadBegin() Handles IExplorer.DownloadBegin System.Console.WriteLine("Download Begin.") doc = DirectCast(IExplorer.Document, mshtml.HTMLDocument) 'AddHandler DirectCast(doc, mshtml.HTMLDocumentEvents_Event).onmouseover, New mshtml.HTMLDocumentEvents_onmouseoverEventHandler(AddressOf coñazo) AddHandler DirectCast(doc, mshtml.HTMLDocumentEvents2_Event).onmouseover, AddressOf onmouseover End Sub Public Sub IExplorer_DocumentComplete(ByVal pDisp As Object, ByRef URL As Object) Handles IExplorer.DocumentComplete System.Console.WriteLine("Document Complete.") End Sub Public Sub dosomething() IExplorer.AddressBar = True IExplorer.StatusBar = True IExplorer.Visible = True IExplorer.Navigate("http://www.microsoft.com") System.Console.WriteLine("Beginnig...") End Sub Public Sub onmouseover(ByVal pEvtObj As mshtml.IHTMLEventObj) Dim HTML As String 'The follow line fail!!!!!!!!!! HTML = doc.parentWindow.event.srcElement.innerText System.Console.WriteLine(HTML) End Sub End Class Can you say me, what im doing wrong please. THANKS SO MUCH!
×
×
  • Create New...