Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
DC++ Hubsoft Checker - frmResolve.vb

frmResolve.vb

Caricato da:
Scarica il programma completo

  1. Imports System
  2. Imports System.net
  3. Public Class frmResolve
  4.     Inherits System.Windows.Forms.Form
  5.  
  6. #Region " Windows Form Designer generated code "
  7.  
  8.     Public Sub New()
  9.         MyBase.New()
  10.  
  11.         'This call is required by the Windows Form Designer.
  12.         InitializeComponent()
  13.  
  14.         'Add any initialization after the InitializeComponent() call
  15.  
  16.     End Sub
  17.  
  18.     'Form overrides dispose to clean up the component list.
  19.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
  20.         If disposing Then
  21.             If Not (components Is Nothing) Then
  22.                 components.Dispose()
  23.             End If
  24.         End If
  25.         MyBase.Dispose(disposing)
  26.     End Sub
  27.  
  28.     'Required by the Windows Form Designer
  29.     Private components As System.ComponentModel.IContainer
  30.  
  31.     'NOTE: The following procedure is required by the Windows Form Designer
  32.     'It can be modified using the Windows Form Designer.  
  33.     'Do not modify it using the code editor.
  34.     Friend WithEvents lblhost As System.Windows.Forms.Label
  35.     Friend WithEvents txthost As System.Windows.Forms.TextBox
  36.     Friend WithEvents lblip As System.Windows.Forms.Label
  37.     Friend WithEvents txtip As System.Windows.Forms.TextBox
  38.     Friend WithEvents cmdresolve As System.Windows.Forms.Button
  39.     Friend WithEvents cmdcopy As System.Windows.Forms.Button
  40.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  41.         Me.lblhost = New System.Windows.Forms.Label
  42.         Me.txthost = New System.Windows.Forms.TextBox
  43.         Me.lblip = New System.Windows.Forms.Label
  44.         Me.txtip = New System.Windows.Forms.TextBox
  45.         Me.cmdresolve = New System.Windows.Forms.Button
  46.         Me.cmdcopy = New System.Windows.Forms.Button
  47.         Me.SuspendLayout()
  48.         '
  49.         'lblhost
  50.         '
  51.         Me.lblhost.Location = New System.Drawing.Point(8, 8)
  52.         Me.lblhost.Name = "lblhost"
  53.         Me.lblhost.Size = New System.Drawing.Size(64, 16)
  54.         Me.lblhost.TabIndex = 0
  55.         Me.lblhost.Text = "Hostname:"
  56.         '
  57.         'txthost
  58.         '
  59.         Me.txthost.Location = New System.Drawing.Point(8, 24)
  60.         Me.txthost.Name = "txthost"
  61.         Me.txthost.Size = New System.Drawing.Size(232, 20)
  62.         Me.txthost.TabIndex = 1
  63.         Me.txthost.Text = "www.google.com"
  64.         '
  65.         'lblip
  66.         '
  67.         Me.lblip.Location = New System.Drawing.Point(8, 48)
  68.         Me.lblip.Name = "lblip"
  69.         Me.lblip.Size = New System.Drawing.Size(24, 16)
  70.         Me.lblip.TabIndex = 2
  71.         Me.lblip.Text = "Ip:"
  72.         '
  73.         'txtip
  74.         '
  75.         Me.txtip.Location = New System.Drawing.Point(8, 64)
  76.         Me.txtip.Name = "txtip"
  77.         Me.txtip.Size = New System.Drawing.Size(232, 20)
  78.         Me.txtip.TabIndex = 3
  79.         Me.txtip.Text = ""
  80.         '
  81.         'cmdresolve
  82.         '
  83.         Me.cmdresolve.Location = New System.Drawing.Point(8, 96)
  84.         Me.cmdresolve.Name = "cmdresolve"
  85.         Me.cmdresolve.Size = New System.Drawing.Size(232, 24)
  86.         Me.cmdresolve.TabIndex = 4
  87.         Me.cmdresolve.Text = "Risolvi"
  88.         '
  89.         'cmdcopy
  90.         '
  91.         Me.cmdcopy.Location = New System.Drawing.Point(8, 128)
  92.         Me.cmdcopy.Name = "cmdcopy"
  93.         Me.cmdcopy.Size = New System.Drawing.Size(232, 24)
  94.         Me.cmdcopy.TabIndex = 5
  95.         Me.cmdcopy.Text = "Copia"
  96.         '
  97.         'frmResolve
  98.         '
  99.         Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
  100.         Me.ClientSize = New System.Drawing.Size(250, 160)
  101.         Me.Controls.Add(Me.cmdcopy)
  102.         Me.Controls.Add(Me.cmdresolve)
  103.         Me.Controls.Add(Me.txtip)
  104.         Me.Controls.Add(Me.lblip)
  105.         Me.Controls.Add(Me.txthost)
  106.         Me.Controls.Add(Me.lblhost)
  107.         Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
  108.         Me.MaximizeBox = False
  109.         Me.MinimizeBox = False
  110.         Me.Name = "frmResolve"
  111.         Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
  112.         Me.Text = "Resolve - DC++ Hubsoft Checker"
  113.         Me.ResumeLayout(False)
  114.  
  115.     End Sub
  116.  
  117. #End Region
  118.  
  119.     Private Sub cmdresolve_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdresolve.Click
  120.         Dim Ihe As IPHostEntry
  121.         Ihe = Dns.Resolve(txthost.Text)
  122.         txtip.Text = Ihe.AddressList(0).ToString
  123.     End Sub
  124.  
  125.     Private Sub cmdcopy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdcopy.Click
  126.         Clipboard.SetDataObject(txtip.Text)
  127.     End Sub
  128. End Class