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
System Info - Form1.vb

Form1.vb

Caricato da:
Scarica il programma completo

  1. Imports System
  2. Imports System.IO
  3. Public Class Form1
  4.     Inherits System.Windows.Forms.Form
  5.     Dim n As Environment
  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 TextBox1 As System.Windows.Forms.TextBox
  35.     Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
  36.     Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
  37.     Friend WithEvents Button1 As System.Windows.Forms.Button
  38.     Friend WithEvents Label1 As System.Windows.Forms.Label
  39.     Friend WithEvents Label2 As System.Windows.Forms.Label
  40.     Friend WithEvents Label3 As System.Windows.Forms.Label
  41.     Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
  42.     Friend WithEvents TextBox5 As System.Windows.Forms.TextBox
  43.     Friend WithEvents Label4 As System.Windows.Forms.Label
  44.     Friend WithEvents Label5 As System.Windows.Forms.Label
  45.     Friend WithEvents LinkLabel1 As System.Windows.Forms.LinkLabel
  46.     Friend WithEvents Label6 As System.Windows.Forms.Label
  47.     Friend WithEvents LinkLabel2 As System.Windows.Forms.LinkLabel
  48.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  49.         Me.TextBox1 = New System.Windows.Forms.TextBox
  50.         Me.TextBox2 = New System.Windows.Forms.TextBox
  51.         Me.TextBox3 = New System.Windows.Forms.TextBox
  52.         Me.Button1 = New System.Windows.Forms.Button
  53.         Me.Label1 = New System.Windows.Forms.Label
  54.         Me.Label2 = New System.Windows.Forms.Label
  55.         Me.Label3 = New System.Windows.Forms.Label
  56.         Me.TextBox4 = New System.Windows.Forms.TextBox
  57.         Me.TextBox5 = New System.Windows.Forms.TextBox
  58.         Me.Label4 = New System.Windows.Forms.Label
  59.         Me.Label5 = New System.Windows.Forms.Label
  60.         Me.LinkLabel1 = New System.Windows.Forms.LinkLabel
  61.         Me.Label6 = New System.Windows.Forms.Label
  62.         Me.LinkLabel2 = New System.Windows.Forms.LinkLabel
  63.         Me.SuspendLayout()
  64.         '
  65.         'TextBox1
  66.         '
  67.         Me.TextBox1.Location = New System.Drawing.Point(8, 24)
  68.         Me.TextBox1.Multiline = True
  69.         Me.TextBox1.Name = "TextBox1"
  70.         Me.TextBox1.Size = New System.Drawing.Size(176, 32)
  71.         Me.TextBox1.TabIndex = 2
  72.         Me.TextBox1.Text = "System1"
  73.         '
  74.         'TextBox2
  75.         '
  76.         Me.TextBox2.Location = New System.Drawing.Point(8, 72)
  77.         Me.TextBox2.Multiline = True
  78.         Me.TextBox2.Name = "TextBox2"
  79.         Me.TextBox2.Size = New System.Drawing.Size(176, 32)
  80.         Me.TextBox2.TabIndex = 3
  81.         Me.TextBox2.Text = "System2"
  82.         '
  83.         'TextBox3
  84.         '
  85.         Me.TextBox3.Location = New System.Drawing.Point(8, 120)
  86.         Me.TextBox3.Multiline = True
  87.         Me.TextBox3.Name = "TextBox3"
  88.         Me.TextBox3.Size = New System.Drawing.Size(176, 32)
  89.         Me.TextBox3.TabIndex = 4
  90.         Me.TextBox3.Text = "System3"
  91.         '
  92.         'Button1
  93.         '
  94.         Me.Button1.Location = New System.Drawing.Point(192, 120)
  95.         Me.Button1.Name = "Button1"
  96.         Me.Button1.Size = New System.Drawing.Size(168, 32)
  97.         Me.Button1.TabIndex = 5
  98.         Me.Button1.Text = "Refresh All"
  99.         '
  100.         'Label1
  101.         '
  102.         Me.Label1.Location = New System.Drawing.Point(8, 8)
  103.         Me.Label1.Name = "Label1"
  104.         Me.Label1.Size = New System.Drawing.Size(128, 16)
  105.         Me.Label1.TabIndex = 6
  106.         Me.Label1.Text = "Username:"
  107.         '
  108.         'Label2
  109.         '
  110.         Me.Label2.Location = New System.Drawing.Point(8, 56)
  111.         Me.Label2.Name = "Label2"
  112.         Me.Label2.Size = New System.Drawing.Size(104, 16)
  113.         Me.Label2.TabIndex = 7
  114.         Me.Label2.Text = "Computer Name:"
  115.         '
  116.         'Label3
  117.         '
  118.         Me.Label3.Location = New System.Drawing.Point(8, 104)
  119.         Me.Label3.Name = "Label3"
  120.         Me.Label3.Size = New System.Drawing.Size(144, 16)
  121.         Me.Label3.TabIndex = 8
  122.         Me.Label3.Text = "Operative System Platform:"
  123.         '
  124.         'TextBox4
  125.         '
  126.         Me.TextBox4.Location = New System.Drawing.Point(8, 168)
  127.         Me.TextBox4.Multiline = True
  128.         Me.TextBox4.Name = "TextBox4"
  129.         Me.TextBox4.Size = New System.Drawing.Size(176, 32)
  130.         Me.TextBox4.TabIndex = 9
  131.         Me.TextBox4.Text = "System4"
  132.         '
  133.         'TextBox5
  134.         '
  135.         Me.TextBox5.Location = New System.Drawing.Point(8, 216)
  136.         Me.TextBox5.Multiline = True
  137.         Me.TextBox5.Name = "TextBox5"
  138.         Me.TextBox5.Size = New System.Drawing.Size(176, 32)
  139.         Me.TextBox5.TabIndex = 10
  140.         Me.TextBox5.Text = "System5"
  141.         '
  142.         'Label4
  143.         '
  144.         Me.Label4.Location = New System.Drawing.Point(8, 152)
  145.         Me.Label4.Name = "Label4"
  146.         Me.Label4.Size = New System.Drawing.Size(144, 16)
  147.         Me.Label4.TabIndex = 11
  148.         Me.Label4.Text = "Operative System Version:"
  149.         '
  150.         'Label5
  151.         '
  152.         Me.Label5.Location = New System.Drawing.Point(8, 200)
  153.         Me.Label5.Name = "Label5"
  154.         Me.Label5.Size = New System.Drawing.Size(128, 16)
  155.         Me.Label5.TabIndex = 12
  156.         Me.Label5.Text = "System Directory:"
  157.         '
  158.         'LinkLabel1
  159.         '
  160.         Me.LinkLabel1.Location = New System.Drawing.Point(200, 24)
  161.         Me.LinkLabel1.Name = "LinkLabel1"
  162.         Me.LinkLabel1.Size = New System.Drawing.Size(112, 16)
  163.         Me.LinkLabel1.TabIndex = 13
  164.         Me.LinkLabel1.TabStop = True
  165.         Me.LinkLabel1.Text = "Created by Citynova"
  166.         '
  167.         'Label6
  168.         '
  169.         Me.Label6.Location = New System.Drawing.Point(240, 48)
  170.         Me.Label6.Name = "Label6"
  171.         Me.Label6.Size = New System.Drawing.Size(24, 16)
  172.         Me.Label6.TabIndex = 14
  173.         Me.Label6.Text = "For"
  174.         '
  175.         'LinkLabel2
  176.         '
  177.         Me.LinkLabel2.Location = New System.Drawing.Point(200, 72)
  178.         Me.LinkLabel2.Name = "LinkLabel2"
  179.         Me.LinkLabel2.Size = New System.Drawing.Size(136, 16)
  180.         Me.LinkLabel2.TabIndex = 15
  181.         Me.LinkLabel2.TabStop = True
  182.         Me.LinkLabel2.Text = "Piero Tofy's Community"
  183.         '
  184.         'Form1
  185.         '
  186.         Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
  187.         Me.ClientSize = New System.Drawing.Size(368, 254)
  188.         Me.Controls.Add(Me.LinkLabel2)
  189.         Me.Controls.Add(Me.Label6)
  190.         Me.Controls.Add(Me.LinkLabel1)
  191.         Me.Controls.Add(Me.Label5)
  192.         Me.Controls.Add(Me.Label4)
  193.         Me.Controls.Add(Me.TextBox5)
  194.         Me.Controls.Add(Me.TextBox4)
  195.         Me.Controls.Add(Me.Label3)
  196.         Me.Controls.Add(Me.Label2)
  197.         Me.Controls.Add(Me.Label1)
  198.         Me.Controls.Add(Me.Button1)
  199.         Me.Controls.Add(Me.TextBox3)
  200.         Me.Controls.Add(Me.TextBox2)
  201.         Me.Controls.Add(Me.TextBox1)
  202.         Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
  203.         Me.MaximizeBox = False
  204.         Me.Name = "Form1"
  205.         Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
  206.         Me.Text = "System Info by Citynova"
  207.         Me.ResumeLayout(False)
  208.  
  209.     End Sub
  210.  
  211. #End Region
  212.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  213.         TextBox1.Text = n.UserName.ToString
  214.         TextBox2.Text = n.MachineName.ToString
  215.         TextBox3.Text = n.OSVersion.Platform.ToString
  216.         TextBox4.Text = n.OSVersion.Version.ToString
  217.         TextBox5.Text = n.GetFolderPath(Environment.SpecialFolder.System)
  218.     End Sub
  219.  
  220.     Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  221.         TextBox1.Text = n.UserName.ToString
  222.         TextBox2.Text = n.MachineName.ToString
  223.         TextBox3.Text = n.OSVersion.Platform.ToString
  224.         TextBox4.Text = n.OSVersion.Version.ToString
  225.         TextBox5.Text = n.GetFolderPath(Environment.SpecialFolder.System)
  226.     End Sub
  227.  
  228.     Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
  229.         Shell("explorer.exe http://www.cityhack.altervista.org")
  230.     End Sub
  231.  
  232.     Private Sub LinkLabel2_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel2.LinkClicked
  233.         Shell("explorer.exe http://www.pierotofy.it")
  234.     End Sub
  235. End Class