Skip to content

Instantly share code, notes, and snippets.

View codebeta's full-sized avatar
:octocat:
I'm a leaf on the wind. Watch how I soar.

Nicole Daniella Murillo codebeta

:octocat:
I'm a leaf on the wind. Watch how I soar.
View GitHub Profile
@codebeta
codebeta / XMLElements
Last active August 29, 2015 14:15
Adding or creating XML elements
     Dim xdocXML As XDocument
 
     Dim xmlNewElement As XElement = _
             <Root>
                 <Person>
                     <Name><%= txtName.Text.Trim %></Name>
                     <Phone><%= formatPhone(txtPhone.text) %></Phone>
                 </Person>
             </Root>
 
Dim newFormControl As New frmForm1
newFormControl.TopLevel = False
newFormControl.Visible = True
newFormControl.Dock = DockStyle.Fill
newFormControl.FormBorderStyle = Windows.Forms.FormBorderStyle.None
tcSettings.TabPages(0).Controls.Add(newFormControl)
### Keybase proof
I hereby claim:
* I am codebeta on github.
* I am codebeta (https://keybase.io/codebeta) on keybase.
* I have a public key whose fingerprint is 3394 1A0C AC58 0D69 0BD3 B055 311B 5912 4F28 6069
To claim this, I am signing this object:
Private Sub wbBrowser_NewWindow3(sender As Object, e As AxSHDocVw.DWebBrowserEvents2_NewWindow3Event) Handles wbBrowser.NewWindow3 e.cancel = True
Dim frmWB As spmlWebBrowser = New spmlWebBrowser
frmWB.MdiParent = spmltMain
frmWB.Show()
frmWB.loadURL(e.bstrUrl)
End Sub
Dim web_request As System.Net.HttpWebRequest = System.Net.WebRequest.Create(New Uri(webBrowser.LocationURL.ToString).Host)
Dim web_response As System.Net.HttpWebResponse = web_request.getresponse
Dim web_stream As System.IO.Stream = web_response.GetResponseStream
Dim wClient As New WebClient Dim memoryStream As New MemoryStream(wClient.DownloadData(“http://” & New Uri(webBrowser.LocationURL.ToString).Host & “/favicon.ico”))
Dim wIcon As New Icon(memoryStream) Me.Icon = wIcon
Dim image As Image = image.FromStream(web_stream)
imagelist1.images.add(image)
Private Sub favIcon()
Try
Dim wClient As New WebClient
Dim baseURL As String = New Uri(wbBrowser.LocationURL.ToString).Host.ToString
If New Uri(wbBrowser.LocationURL.ToString).Port.ToString <> “80” AndAlso New Uri(wbBrowser.LocationURL.ToString).Port.ToString <> “443” Then
baseURL = baseURL & “:” & New Uri(wbBrowser.LocationURL.ToString).Port.ToString
End If
logDebug(“[INFO] Getting FavIcon from “ & baseURL)
Dim memoryStream As New MemoryStream(wClient.DownloadData(“http://” & baseURL & “/favicon.ico”))
Dim wIcon As New Icon(memoryStream)
Public sshClient As Renci.SshNet.SshClient