Hi, bing made this code
Code:
Private Sub Form_Open(Cancel As Integer)Dim browser As Microsoft.Web.WebView2.WinForms.WebView2
'Ottenere gli elementi HTML delle caselle di testo da riempire usando il metodo GetElementById o GetElementsByClassName del documento HTML. Per esempio:
Dim txtNome As Object
Dim txtCognome As Object
Set txtNome = browser.CoreWebView2.Document.GetElementById("nome")
Set txtCognome = browser.CoreWebView2.Document.GetElementById("cognome")
'Assegnare all’oggetto browser il controllo edge desiderato. Per esempio:
Set browser = Me.WebView21
'Navigare al sito web che contiene le caselle di testo da riempire. Per esempio:
browser.CoreWebView2.Navigate "https://www.example.com"
'Attendere che la pagina sia completamente caricata. Per esempio:
Do While browser.CoreWebView2.ReadyState <> CoreWebView2ReadyState.Complete
DoEvents
Loop
'Assegnare i valori desiderati agli elementi HTML usando la proprietà Value. Per esempio:
txtNome.Value = "Mario"
txtCognome.Value = "Rossi"
End Sub
i use it to fill a web site with two values in two textbox, but i get the error cause i have not reference of the edge control.
It told me that the reference is "Microsoft.Web.WebView2.WinForms.dll", but i cannot find in reference list, and if i click on browse this dll is not in the place bing told me, but it says that's ok. However, i cannot add the reference, it is impossible.
How can i add edge control reference?
thx