Imports System.Reflection Public Class SplashForm Inherits Form Private ReadOnly closeTimer As New System.Windows.Forms.Timer() Public Sub New() FormBorderStyle = FormBorderStyle.None StartPosition = FormStartPosition.CenterScreen ClientSize = New Size(560, 260) BackColor = Color.FromArgb(12, 18, 24) ShowInTaskbar = False Dim iconPath = IO.Path.Combine(Application.StartupPath, "Assets", "app-icon.png") Dim picture As New PictureBox With { .SizeMode = PictureBoxSizeMode.Zoom, .Left = 34, .Top = 42, .Width = 150, .Height = 150 } If IO.File.Exists(iconPath) Then picture.Image = Image.FromFile(iconPath) End If Controls.Add(picture) Dim title As New Label With { .Text = "LMEMoxaTransfer", .ForeColor = Color.White, .Font = New Font("Segoe UI", 24.0F, FontStyle.Bold), .Left = 205, .Top = 62, .Width = 335, .Height = 44 } Controls.Add(title) Dim subtitle As New Label With { .Text = "Trasferimento programmi Okuma via Moxa", .ForeColor = Color.FromArgb(170, 225, 220), .Font = New Font("Segoe UI", 10.5F), .Left = 208, .Top = 112, .Width = 330, .Height = 28 } Controls.Add(subtitle) Dim versionLabel As New Label With { .Text = $"Compomac SPA - Livio Merola - v{Assembly.GetExecutingAssembly().GetName().Version}", .ForeColor = Color.FromArgb(180, 190, 200), .Font = New Font("Segoe UI", 9.0F), .Left = 208, .Top = 154, .Width = 330, .Height = 28 } Controls.Add(versionLabel) closeTimer.Interval = 1400 AddHandler closeTimer.Tick, Sub() closeTimer.Stop() Close() End Sub End Sub Protected Overrides Sub OnShown(e As EventArgs) MyBase.OnShown(e) closeTimer.Start() End Sub End Class