|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
setting form properties during runtimeOK--Beginner question--
I have a project with one form -- Form1. To change the text, why can't I use "Form1.Text = something"? Instead I have to use "Form1.ActiveForm.Text = Something". As an exercise, I rewrote a timer app that I wrote in VB 5.0. You set the time, and when it runs, it minimizes until the time is up, and then pops back up again and gives an alerting sound. In VB 5.0, I was able to write the time to the forms text property, while the timer was counting down and the form was minimized, so you could see how much time was left by looking in the task bar. Now, when I try to do this and the form minimizes, it throws an exception when the time (ie form text) changes -- (I guess when the form is minimized, it is no longer an active form). I'm confused. Jim Jim Madsen <jus***@nobody.com> wrote in news:uM7uWFOOHHA.448
@TK2MSFTNGP04.phx.gbl: > I have a project with one form -- Form1. To change the text, why can't Is form1 your instance name or your class name?> I use "Form1.Text = something"? If it's your class name, you must refer to the current instance. For example, if you displayed the new form as: Dim _MyForm as new Form1 You can change the title by going _MyForm.Title = "SomeTitle"
breaking up a String into an array of chars and adding to datatable
Option Strict issue Make the value of MyObjectA equal to the value of MyObjectB? System.Net.Sockets.SocketException Error not CLS-compliant How to go to the next control? Automate file downloads Newbie Missing Something with Access DB Update Using VB .NET converting bitarray to int64 ListView and Registry Key |
|||||||||||||||||||||||