Rev | Line | |
---|
[110] | 1 | Imports System.Diagnostics |
---|
| 2 | Imports System.Drawing |
---|
| 3 | Imports System.Drawing.Imaging |
---|
| 4 | |
---|
| 5 | Public Class MainForm |
---|
| 6 | Private WithEvents Animation As ProgressAnimation |
---|
| 7 | |
---|
| 8 | Private Sub MainForm_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load |
---|
| 9 | Animation = New ProgressAnimation |
---|
| 10 | Controls.Add(Animation) |
---|
| 11 | Animation.Dock = DockStyle.Fill |
---|
| 12 | Dim CurrentScreen As Screen = Screen.FromControl(Me) |
---|
| 13 | Width = CurrentScreen.WorkingArea.Width * 7 / 8 |
---|
| 14 | Height = CurrentScreen.WorkingArea.Height * 7 / 8 |
---|
| 15 | Left = (CurrentScreen.WorkingArea.Width - Width) / 2 |
---|
| 16 | Top = (CurrentScreen.WorkingArea.Height - Height) / 2 |
---|
| 17 | End Sub |
---|
| 18 | Private Sub MainForm_KeyPress(sender As System.Object, e As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress |
---|
| 19 | If e.KeyChar = Chr(27) Then Close() |
---|
| 20 | End Sub |
---|
| 21 | Private Sub Animation_KeyPress(sender As System.Object, e As System.Windows.Forms.KeyPressEventArgs) Handles Animation.KeyPress |
---|
| 22 | If e.KeyChar = Chr(27) Then Close() |
---|
| 23 | End Sub |
---|
| 24 | End Class |
---|
Note: See
TracBrowser
for help on using the repository browser.