Imports System
Imports System.net
Public Class frmResolve
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents lblhost As System.Windows.Forms.Label
Friend WithEvents txthost As System.Windows.Forms.TextBox
Friend WithEvents lblip As System.Windows.Forms.Label
Friend WithEvents txtip As System.Windows.Forms.TextBox
Friend WithEvents cmdresolve As System.Windows.Forms.Button
Friend WithEvents cmdcopy As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.lblhost = New System.Windows.Forms.Label
Me.txthost = New System.Windows.Forms.TextBox
Me.lblip = New System.Windows.Forms.Label
Me.txtip = New System.Windows.Forms.TextBox
Me.cmdresolve = New System.Windows.Forms.Button
Me.cmdcopy = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'lblhost
'
Me.lblhost.Location = New System.Drawing.Point(8, 8)
Me.lblhost.Name = "lblhost"
Me.lblhost.Size = New System.Drawing.Size(64, 16)
Me.lblhost.TabIndex = 0
Me.lblhost.Text = "Hostname:"
'
'txthost
'
Me.txthost.Location = New System.Drawing.Point(8, 24)
Me.txthost.Name = "txthost"
Me.txthost.Size = New System.Drawing.Size(232, 20)
Me.txthost.TabIndex = 1
Me.txthost.Text = "www.google.com"
'
'lblip
'
Me.lblip.Location = New System.Drawing.Point(8, 48)
Me.lblip.Name = "lblip"
Me.lblip.Size = New System.Drawing.Size(24, 16)
Me.lblip.TabIndex = 2
Me.lblip.Text = "Ip:"
'
'txtip
'
Me.txtip.Location = New System.Drawing.Point(8, 64)
Me.txtip.Name = "txtip"
Me.txtip.Size = New System.Drawing.Size(232, 20)
Me.txtip.TabIndex = 3
Me.txtip.Text = ""
'
'cmdresolve
'
Me.cmdresolve.Location = New System.Drawing.Point(8, 96)
Me.cmdresolve.Name = "cmdresolve"
Me.cmdresolve.Size = New System.Drawing.Size(232, 24)
Me.cmdresolve.TabIndex = 4
Me.cmdresolve.Text = "Risolvi"
'
'cmdcopy
'
Me.cmdcopy.Location = New System.Drawing.Point(8, 128)
Me.cmdcopy.Name = "cmdcopy"
Me.cmdcopy.Size = New System.Drawing.Size(232, 24)
Me.cmdcopy.TabIndex = 5
Me.cmdcopy.Text = "Copia"
'
'frmResolve
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(250, 160)
Me.Controls.Add(Me.cmdcopy)
Me.Controls.Add(Me.cmdresolve)
Me.Controls.Add(Me.txtip)
Me.Controls.Add(Me.lblip)
Me.Controls.Add(Me.txthost)
Me.Controls.Add(Me.lblhost)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "frmResolve"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Resolve - DC++ Hubsoft Checker"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub cmdresolve_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdresolve.Click
Dim Ihe As IPHostEntry
Ihe = Dns.Resolve(txthost.Text)
txtip.Text = Ihe.AddressList(0).ToString
End Sub
Private Sub cmdcopy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdcopy.Click
Clipboard.SetDataObject(txtip.Text)
End Sub
End Class