473,799 Members | 3,098 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Event raised when Application/Form regains focus...

Hello!

So im working on an applicaiton that all pretty much sits on a single
form.

When the application completes a task, I'd like it to use
FlashWindow() to notify the user that it has completed. I have this
part working; however, I cant seem to find the right event to use to
Stop the flashing.

Ive tried the GotFocus and the Enter events on the form, but those
dont seem to do the trick.

Anybody have any ideas?

Thanks!!!

Aug 3 '07
17 5394
G.Doten wrote:
It sounds like he doesn't; it sounds to me like he just wants the
taskbar to flash regardless of whether the window is a candidate for
being brought forward or not.
He wrote:
I dont want the application to flash if it is, cause then i seem to
have to minimize it and restore it before the flashing stops
That contradicts your assertion that "he just wants the taskbar to flash
regardless". It's pretty clear that there are situations in which he
doesn't want the taskbar to flash.

Using Activate(), Windows will only bring the window to the foreground
if it is the closest thing to the foreground window already. If some
other window is active and involved with the user, the taskbar item will
flash as desired.

This is in fact how the flashing should be done, and is consistent with
the standard Windows UI behavior. Doing it some other way is
inconsistent and violates the user's expectations of what will happen.

Pete
Aug 3 '07 #11
Peter Duniho wrote:
G.Doten wrote:
>It sounds like he doesn't; it sounds to me like he just wants the
taskbar to flash regardless of whether the window is a candidate for
being brought forward or not.

He wrote:
>I dont want the application to flash if it is, cause then i seem to
have to minimize it and restore it before the flashing stops

That contradicts your assertion that "he just wants the taskbar to flash
regardless". It's pretty clear that there are situations in which he
doesn't want the taskbar to flash.
I don't see how in contradicts anything.

ShieldsJared wrote:

<quote>
Okay, activated seems to be the one.. however...

Now I seem to be having trouble determining if my application is the
topmost active application that is running.

I dont want the application to flash if it is, cause then i seem to
have to minimize it and restore it before the flashing stops...
</quote>

I read this to mean that he always wants the taskbar to flash, but when
using Activate to do that *and* his app window is the top-most one, then
he has to min/max his app window to get the flashing to stop. I have
seen app windows that behave that way (I have to click in the window,
even though it is top-most, the get the flashing to stop).

It's interesting to note the native FlashWindow works as ShieldsJared
desires, and it doesn't break any GUI paradigm. You may be right that
most windows require you to click in them to stop the flashing of the
taskbar icon, but when the app window is already topmost I find that
incredibly annoying as appranely ShieldsJared does as well.

I just found the workings of the FlashWindow function interesting,
that's all.

--
-glenn-
Aug 3 '07 #12
G.Doten wrote:
>That contradicts your assertion that "he just wants the taskbar to
flash regardless". It's pretty clear that there are situations in
which he doesn't want the taskbar to flash.

I don't see how in contradicts anything.
Why am I not surprised?
Aug 3 '07 #13
Peter Duniho wrote:
G.Doten wrote:
>>That contradicts your assertion that "he just wants the taskbar to
flash regardless". It's pretty clear that there are situations in
which he doesn't want the taskbar to flash.

I don't see how in contradicts anything.

Why am I not surprised?
Because you don't understand what I'm saying?

--
-glenn-
Aug 3 '07 #14
G.Doten wrote:
Because you don't understand what I'm saying?
No...that's not it. Try again.
Aug 3 '07 #15
Peter Duniho wrote:
G.Doten wrote:
>Because you don't understand what I'm saying?

No...that's not it. Try again.
No, I believe that's it. Otherwise you might be able to discuss the
thread rationally. I give you a concrete reason why you don't understand
the issue, and you turn into a little baby.

--
-glenn-
Aug 3 '07 #16
G.Doten wrote:
No, I believe that's it. Otherwise you might be able to discuss the
thread rationally. I give you a concrete reason why you don't understand
the issue, and you turn into a little baby.
Again with the name-calling.

I suppose that without the facts on your side, that's all you have
available to you as a reply. But still...it doesn't exactly help your case.
Aug 3 '07 #17
Peter Duniho wrote:
G.Doten wrote:
>No, I believe that's it. Otherwise you might be able to discuss the
thread rationally. I give you a concrete reason why you don't
understand the issue, and you turn into a little baby.

Again with the name-calling.

I suppose that without the facts on your side, that's all you have
available to you as a reply. But still...it doesn't exactly help your
case.
Yeah, that's it. You refuse to rationally discuss the problem with the
solution *you* have proposed and have the nerve to say that *I* don't
have a case? You are so precious, little one.

You should learn how to distinguish between name-calling and
characterizatio n, BTW.

--
-glenn-
Aug 3 '07 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
2890
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code that applies to all these events, but I need to have specific code execute when the form closes. The properties for this method are sender (the originator) and e (event arguments). I know how to get typeof (sender) to determine what form or...
4
1367
by: Ron Gliane | last post by:
Hi, this seems like something so basic that there must be some way to do it...Is there a way for Visual Studio or some other tool to let me see Events as they are raised in an application? For example, I've created a form with two fields. I would like to be able to see ALL the events for the application as I run/debug it. I want to know that clicking on field1 and then field2 produces: fld1.enter, fld1.leave, fld2.enter, etc. I guess...
5
11074
by: Stan Sainte-Rose | last post by:
Hi, Which event is called when the user click on the close window icon (X) ? I want, when he clicks on this icon, to display a message before closing the form. If he replys by No, I don't want to close the form. Thks for your help Stan
5
3342
by: Steve | last post by:
I have a datagrid in a WinForm. When the user edits an entry in the datagrid, after he leaves that field, I would like to do some cheking. What event fires when the user does that? I need to make sure that the value he modified does not create a dup value in my DB. Thank you for your help, Steve
2
5382
by: Simon Verona | last post by:
I have a usercontrol with code in the "leave" event which updates the final data back into a database. This works fine except if I have a default "accept" button on a form and invoke it by pressing the ENTER key on the keyboard. In this case, it would appear that whilst the code on the button is executing and therefore presumably the button actually has focus, the leave event in the user control is not fired. Should I be interfacing...
1
6319
by: Bob | last post by:
In Vs 2005 you have new applicationsEvents.vb I was testing it in a simple app and found that it was easier to implement unhandled exception management tah it was in Vs2003 (vb.net) You can, if you want to, prevent your app from terminating on an unhandled exception, and for me this is important. In an Ivr app it will let me hang up the phone only on the line that triggered the unhandled exception, leaving other callers to complete their...
5
2167
by: rn5a | last post by:
Consider the following user control which resides in Address.ascx: <script runat="server"> Public Property Address() As String Get Address = txtAddress.Text End Get Set(ByVal value As String) txtAddress.Text = value End Set
5
7460
by: =?Utf-8?B?QmVuIFIu?= | last post by:
Hi, In a .NET 2.0 winforms application, I've got a textbox that, when updated, uses the validated event to cascade the change to another textbox (along with another value). This works well if the user does indeed move the cursor to another textbox, but if the user clicks my "done" toolstripbutton after making a change in the textbox but without moving the cursor out, the validated event never fires. I have a pretty bad workaround where...
0
11357
MMcCarthy
by: MMcCarthy | last post by:
VBA is described as an Event driven programming language. What is meant by this? Access, like most Windows programs, is an event driven application. This means that nothing happens unless it is in response to some event that has been detected by the application. The steps are fairly straightforward: An event happens The event is detected by the application The application responds to the eventThe Windows OS will automatically detect...
0
9687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9541
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10482
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10251
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9072
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.