我在Visual Studio 2010中创建了一个启动画面,并将其设置为项目的启动画面。在这个启动画面中,我只有一个标签和这个进度盘:
https://sites.google.com/site/jaykerh/ProgressDisk.zip?attredirects=0&d=1
这是this控件的更新,带有一个额外的内部计时器。 即使启用并激活进度盘(因此计时器应该工作)我也无法获得加载动画。我也试过实现自己的计时器,但这也不起作用。 我尝试使用backgroundWorker但没有结果......
我可以尝试什么? 谢谢!
这是启动画面设计师代码:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class LoadingScreen
Inherits System.Windows.Forms.Form
'Form esegue l'override del metodo Dispose per pulire l'elenco dei componenti.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Richiesto da Progettazione Windows Form
Private components As System.ComponentModel.IContainer
'NOTA: la procedura che segue è richiesta da Progettazione Windows Form
'Può essere modificata in Progettazione Windows Form.
'Non modificarla nell'editor del codice.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label()
Me.progDisk = New ProgressDisk.ProgressDisk()
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(68, 12)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(158, 50)
Me.Label1.TabIndex = 1
Me.Label1.Text = "Tentativo di connessione in corso..."
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'progDisk
'
Me.progDisk.ActiveForeColor1 = System.Drawing.Color.Red
Me.progDisk.ActiveForeColor2 = System.Drawing.Color.Crimson
Me.progDisk.Animate = True
Me.progDisk.BackGroundColor = System.Drawing.SystemColors.Control
Me.progDisk.BlockSize = ProgressDisk.BlockSize.Medium
Me.progDisk.InactiveForeColor1 = System.Drawing.Color.LavenderBlush
Me.progDisk.InactiveForeColor2 = System.Drawing.Color.LavenderBlush
Me.progDisk.Location = New System.Drawing.Point(12, 12)
Me.progDisk.Name = "progDisk"
Me.progDisk.Size = New System.Drawing.Size(50, 50)
Me.progDisk.TabIndex = 0
Me.progDisk.TimeDelay = 250
Me.progDisk.Value = 9
'
'LoadingScreen
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(238, 74)
Me.ControlBox = False
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.progDisk)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "LoadingScreen"
Me.ShowInTaskbar = False
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.ResumeLayout(False)
End Sub
Friend progDisk As ProgressDisk.ProgressDisk
Friend WithEvents Label1 As System.Windows.Forms.Label
End Class