Minimize State

  • Thread starter Thread starter kjmwashere
  • Start date Start date
K

kjmwashere

I am tyring to make if the form is minimized and a change
occurs in the label(txtDisplay) to have the form alert
the user. This does not seem to work. Any ideas?

Private Sub txtDisplay_TextChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles
txtDisplay.TextChanged
If Me.WindowState.Minimized Then
MsgBox("New Event")
Else

End If
End Sub
 
Hello,

kjmwashere said:
I am tyring to make if the form is minimized and a change
occurs in the label(txtDisplay) to have the form alert
the user. This does not seem to work. Any ideas?

Private Sub txtDisplay_TextChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles
txtDisplay.TextChanged
If Me.WindowState.Minimized Then

Replace the line above with 'If Me.WindowState = WindowState.Minimized
Then'.
 
HI this was perfect.

Great ng by the way.

DO you know how to make the minimized item in the task
bar light up? I have been only able to get it to reappear
which would be really annoying if the user wants to
ignore it....
 
Hello,

Tom Spink said:
Private Declare Function FlashWindow Lib "user32.dll"
(ByVal Handle As IntPtr, ByVal bInvert As Boolean) As Integer


Public Sub FlashMe()
FlashWindow(Me.Handle, True)
End Sub

Place it in your form, and when you want it to flash, call FlashMe

That's a good idea. I always _hate_ windows flashing in the taskbar...

;-)
 
Herfried K. Wagner said:
That's a good idea. I always _hate_ windows flashing in the
taskbar...

;-)

I hate windows coming to foreground and asking me if I really want to format
my HD when I was about to press <enter>.

;-))
 
Write a DLL that intercepts calls to FlashWindow, and just consume the
message. ;-)

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

"Chaos, Panic, Disorder, my work here is done"


: Hello,
:
: > Private Declare Function FlashWindow Lib "user32.dll"
: > (ByVal Handle As IntPtr, ByVal bInvert As Boolean) As Integer
: >
: >
: > Public Sub FlashMe()
: > FlashWindow(Me.Handle, True)
: > End Sub
: >
: > Place it in your form, and when you want it to flash, call FlashMe
:
: That's a good idea. I always _hate_ windows flashing in the taskbar...
:
: ;-)
:
: --
: Herfried K. Wagner
: MVP · VB Classic, VB.NET
: http://www.mvps.org/dotnet
:
:
 
Hello,

Armin Zingler said:
I hate windows coming to foreground and asking me
if I really want to format my HD when I was about to
press <enter>.

Maybe you should update your virus scanner.

;-)
 
Back
Top