algorithmic modeling for Rhino
Hi,
I want to display a window saying "Please wait,..." while my vb script is running, using a form and a label. The form appears, but not the label inside. I dont understand why.
Here is my script :
Dim form1 As New Windows.Forms.Form
Dim label1 As New Windows.Forms.Label
label1.Autosize = True
label1.BackColor = System.Drawing.SystemColors.Control
label1.ForeColor = System.Drawing.SystemColors.ControlText
label1.Location = New System.Drawing.Point(0, 0)
label1.Name = "Label1"
label1.Size = New System.Drawing.Size(179, 13)
label1.TabIndex = 0
label1.Text = "Calcul en cours, merci de patienter..."
label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
label1.Visible = False
form1.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
form1.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
form1.ClientSize = New System.Drawing.Size(231, 61)
form1.ControlBox = False
form1.Controls.Add(label1)
form1.Name = "Dédé F."
form1.Text = "Dédé F."
form1.TransparencyKey = System.Drawing.Color.White
form1.StartPosition = FormStartPosition.CenterScreen
form1.Cursor = Cursors.WaitCursor
form1.Show()
Any idea ?
Tags:
Replies are closed for this discussion.
maybe that..
label1.Visible = True instead of label1.Visible = False
label1.Visible = False determines whether the control is visible or hidden. So that is not the problem.
I got the solution on a vb.net forum, I have to add this line at the end of my script :
form1.Refresh()
Thanks anyway
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson.
Powered by