By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,703 Members | 1,400 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,703 IT Pros & Developers. It's quick & easy.

Minimize State

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Hello,

"kjmwashere" <km***@werety.com> schrieb:
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'.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #2

P: n/a
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....
-----Original Message-----
Hello,

"kjmwashere" <km***@werety.com> schrieb:
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.MinimizedThen'.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
.

Nov 20 '05 #3

P: n/a
Hello,

"Tom Spink" <th**********@ntlworld.com> schrieb:
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
Nov 20 '05 #4

P: n/a
"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> schrieb

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>.

;-))
--
Armin

Nov 20 '05 #5

P: n/a
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"
"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:O3*************@tk2msftngp13.phx.gbl...
: Hello,
:
: "Tom Spink" <th**********@ntlworld.com> schrieb:
: > 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
:
:
Nov 20 '05 #6

P: n/a
Hello,

"Armin Zingler" <az*******@freenet.de> schrieb:
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.

;-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #7

P: n/a
Hello,

"Tom Spink" <th**********@ntlworld.com> schrieb:
Write a DLL that intercepts calls to FlashWindow, and just
consume the message. ;-)


ROFL

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.