Results 1 to 3 of 3

Thread: Display text only while form is minimized

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2003
    Location
    MS
    Posts
    22

    Display text only while form is minimized

    I want to display some timer text while my form1 is minimized ... I tried "From1.activeform.text = "mytimertextgoeshere" but that throws an exception and applies it to all forms that become active. How can I apply only to the main form and only when the minimize button is clicked?

  2. #2
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    VB Code:
    1. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    2.         If Me.WindowState = FormWindowState.Minimized Then
    3.             Me.Text = "minimized"
    4.         Else
    5.             Me.Text = "not minimized"
    6.         End If
    7.     End Sub

  3. #3
    Hyperactive Member sw_is_great's Avatar
    Join Date
    Nov 2003
    Posts
    330
    use the WindowState property in code
    Regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width