Answered by:
About Box settings

Question
-
I've created an about box form my application however, when I change the text name in the settings portion of properties It is not reflected even after building and saving my application. Is there something I'm missing (from the obvious)?Saturday, December 20, 2008 7:18 PM
Answers
-
Hello bendernut,
The reason why your change does not appear to be effected is because the Designer code (the code that you change in the Properties Window in the Text field) is executed before the Form Load Event. And, within the Form Load Event for the About Dialog, the default is to set the Text to "Me.Text = String.Format("About {0}", ApplicationTitle)". You can view the actual code that you create in the Designer by doing the following:
First, click on "Show All Files":
This will then enable you to view the code-behind in your About Dialog:
Select AboutBox1.Designer.vb and click "View Code".
You will then see the code within and somewhere within the code you will see something that looks like this:' 'AboutBox1 ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.OKButton Me.ClientSize = New System.Drawing.Size(414, 276) Me.Controls.Add(Me.TableLayoutPanel) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "AboutBox1" Me.Padding = New System.Windows.Forms.Padding(9) Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent Me.Text = "My About Dialog" Me.TableLayoutPanel.ResumeLayout(False) Me.TableLayoutPanel.PerformLayout() CType(Me.LogoPictureBox, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False)
If the Text that I changed in Designer was changed to "My About Dialog", you can view the Text change here. Again, the designer code is executed before the Form_Load Event, so that is why the code "appears" to "automatically overrides any changes made in the properties section".
Any questions, feel free to post.
Also, if your question is answered please select "Mark as Answer" near my post.
Best Regards,
Adjutor- Edited by Adjutor Sunday, December 21, 2008 1:31 AM ...
- Proposed as answer by Adjutor Sunday, December 21, 2008 1:31 AM
- Marked as answer by Martin Xie - MSFT Friday, December 26, 2008 2:46 AM
Saturday, December 20, 2008 10:19 PM -
Hello bendernut,
You did indeed change the Text property of the About Form, but since the About Form has some Windows Form Generated code, the Text Property will change back to it's default upon Form Load. The following shows the Text Property set within the About Form's Load Event:
Me.Text = String.Format("About {0}", ApplicationTitle)
Just click on view code for the About Form and you will see this right away. You can just comment or delete this, so the changes you make in the Designer will be reflected as you expect.
I hope this clarifies the issue. Any questions, feel free to post.
Best Regards,
Adjutor- Marked as answer by Martin Xie - MSFT Friday, December 26, 2008 2:50 AM
Saturday, December 20, 2008 8:14 PM
All replies
-
Hello bendernut,
You did indeed change the Text property of the About Form, but since the About Form has some Windows Form Generated code, the Text Property will change back to it's default upon Form Load. The following shows the Text Property set within the About Form's Load Event:
Me.Text = String.Format("About {0}", ApplicationTitle)
Just click on view code for the About Form and you will see this right away. You can just comment or delete this, so the changes you make in the Designer will be reflected as you expect.
I hope this clarifies the issue. Any questions, feel free to post.
Best Regards,
Adjutor- Marked as answer by Martin Xie - MSFT Friday, December 26, 2008 2:50 AM
Saturday, December 20, 2008 8:14 PM -
Thanks. I wonder why the code automatically overrides any changes made in the properties section?Saturday, December 20, 2008 9:23 PM
-
Hello bendernut,
The reason why your change does not appear to be effected is because the Designer code (the code that you change in the Properties Window in the Text field) is executed before the Form Load Event. And, within the Form Load Event for the About Dialog, the default is to set the Text to "Me.Text = String.Format("About {0}", ApplicationTitle)". You can view the actual code that you create in the Designer by doing the following:
First, click on "Show All Files":
This will then enable you to view the code-behind in your About Dialog:
Select AboutBox1.Designer.vb and click "View Code".
You will then see the code within and somewhere within the code you will see something that looks like this:' 'AboutBox1 ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.OKButton Me.ClientSize = New System.Drawing.Size(414, 276) Me.Controls.Add(Me.TableLayoutPanel) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "AboutBox1" Me.Padding = New System.Windows.Forms.Padding(9) Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent Me.Text = "My About Dialog" Me.TableLayoutPanel.ResumeLayout(False) Me.TableLayoutPanel.PerformLayout() CType(Me.LogoPictureBox, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False)
If the Text that I changed in Designer was changed to "My About Dialog", you can view the Text change here. Again, the designer code is executed before the Form_Load Event, so that is why the code "appears" to "automatically overrides any changes made in the properties section".
Any questions, feel free to post.
Also, if your question is answered please select "Mark as Answer" near my post.
Best Regards,
Adjutor- Edited by Adjutor Sunday, December 21, 2008 1:31 AM ...
- Proposed as answer by Adjutor Sunday, December 21, 2008 1:31 AM
- Marked as answer by Martin Xie - MSFT Friday, December 26, 2008 2:46 AM
Saturday, December 20, 2008 10:19 PM -
Probably you are changing in wrong place!
Go to Application Properties
Go to Application Tab(default tab)
Click Assembly Information and change it there
Arjun PaudelSunday, December 21, 2008 3:56 AM -
Hi Martin!
Just a question, isnt it good to change those things from Assembly information, thats why there is AboutDialog and default code. Isn't that recommended option? Otherwise we could just do a normal form for AboutDialog.
Sorry just making myself sure, Thanks
Arjun
Arjun PaudelFriday, December 26, 2008 2:56 AM