.NET Framework - ShowBalloonTip Problem

Asked By Steve F
25-Sep-08 04:47 PM
I'm having a timeout problem with NotifyIcon.ShowBalloonTip, but not the
problem commonly found.

Most people complain that the balloon shows up too long (even though this is
by design... I've done that reading), but the problem I'm having is the icon
is disappearing too quickly.

Even in an application that all I have is a Form, NotifyIcon and Button,
when the Button_Click action is set for

notifyIcon1.ShowBalloonTip(30000, "Title", "Text", ToolTipIcon.None);

The icon still disappears after 4-5 seconds.  It was my understanding that
this code should make it disappear after 30 seconds. Even if it was set too
low, 5 seconds should be the minimum timeout.

Am I missing something?

-Steve
Timeout
(1)
Button
(1)
Win32
(1)
  Jeroen Mostert replied...
26-Sep-08 01:57 PM
From the documentation: "Minimum and maximum timeout values are enforced by
the operating system and are typically 10 and 30 seconds, respectively,
however this can vary depending on the operating system. Timeout values that
are too large or too small are adjusted to the appropriate minimum or
maximum value."

I don't know if these parameters are actually configurable (they likely are)
and if you have something installed that changes them, but in any case, you
cannot count on the timeout being enforced. For more details, you'll likely
need to delve into the details of the balloon tip control in Win32.

--
J.
  Girish Sarwal replied...
31-Dec-08 02:24 PM
Is your notifyIcon on a Form? Are you hiding the form in code somewhere?
Create New Account
help
requirement, I have downloaded the WSDL document from the application. When I click the submit button in my page, I get the following error: Path property must be set before calling 2. SKFIEC.v3.0 SkillCrest.VistaMetrix.v1.35. SKM.PTW.v6.0.full SKUA.v2009.Win32. SkyMap.Pro.10. Skymatter.Mudbox.v1.0.4.Final Slide.v5.03 SLPS.Matlab.Simulink SofTech.ToolDesigner.v7.5 Softelec.VPstudio.V10 Softerra.LDAP.Administrator.v2008.1. Softgroup. . NET.Advanced.Button.v2.0.3527. Softgroup. . NET.Data.Objects.v2.0.3271. Softgroup. . NET.Forms.Resize.v3 x86 Solid.Edge.ST1.MP7.Portable Solid.Edge.ST2.MP2.Upload.Only Solid.Edge.ST2.Win32 Solid.Edge.V19.Update.5. Solid.Thinking.v4.0 Solid.v4.1.0.137 Solid2000 v2010 Solidworks.PDMWorks.Workgroup.Server.V2008.SP2.1. SolidWorks.Premium.v2010.SP0.0.Finall.for.Win32.Multilanguage.DVD SolidWorks.Premium.v2010.SP0.0.Finall.for.Win64.Multilanguage.DVD SolidWorks.Toolbox.2006. SolidWorks.v2010.SP1.0.Update.Only.Win32 SolidWorks.v2010.SP1.0.Update.Only.Win64 SolutionWare.GeoPath.v4.1 SONIC.FOUNDRY.SOUNDFORGE.V6 CD.4.08.Linux. Star-CD.v4.08.Linux64.1DVD. Star-CD.v4.12.016.Win32 Star-CD.v4.12.016.Win64 Star-Design.For.Star-CCM.Plus.v4.0.LiNUX v3.0.Rev.18.DOS STEP.FOUR.WING.designer.v1.15.German Step7.Smartlabel.for.Win32 Stephen.Schmitt.World.Machine.Pro.v2.2 STERA.3D.v3.3. STFC.DEFORM-2D.V9
then I got a thread (System.Threading.Timer) at the same time for control a timeout for the main program. When my thread timeout expired, I raise an exceptioin "Timeout" in my thread, my main program should be catching the exception and do some code in the case of certain kinds of i / o operations, one way to manage a timeout is simply to close the i / o object from another thread when the timeout occurs. Then, if an i / o operation is pending on the main thread, that operation classes "Scenario" and "Step", which have a System.Thread.Timer for each to control their timeout gestion, in my between "StepStart" and "StepStop", when "Scenario" or "Step" timeout expired, they raise an "exception", then my "main prog" receive the exception, it will stop class: class TimerExample { [STAThread] static void Main() { Thread scenThread = null; try { / / Class Scenario has a timeout 10s Scenario scen = new Scenario(10000); / / start a step which has a timeout 3s scen
about once or twice a day in the program the view will timed out (error "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.), even I meant, when I ran the query on the VB.NET program I got the timeout error, even though the same query will run fine most of the times. g. That it works fine. Thanks, Erland. I will look it up. Can blocking also cause a timeout expired issue when trying to connect to the SQL Server database ? (Connection.open statement) Last a blocking issue by an INSERT or SELECT statement in another program can cause a timeout expired error when trying to connect to the SQL Server database ? e echnol / sql / 2005 ture SET . . . I have tested what happens, but it is possible that ture would get timeout error when attempting to log in. If you have a login trigger, that is another do not have a login trigger, can an INSERT or SELECT query cause a Login timeout ? fniles (fiefie.niles@gmail.com) writes: To get a timeout due to blocking at login, data that is accessed during the login phase must be
Zeitraum keine Daten reinkommen ?ber den DataReceived Event. Irgendwann muss meine Software dann auf einen Timeout laufen. Anschlie?end soll aber wieder eine ordentliche Kommunikation auf dem Comport stattfinden k?nnen posten, besser gleich auch die relevanten Code-Ausschnitte. Ich tippe tendendziell auch auf ein Handshake / Timeout Problem (zB wegen dem internen Thread der SerialPort-Instanz) vorausgesetzt es ist nicht dein Code Daten bekomme, ich aber noch welche erwarte, dann l?uft meine Anwendung irgendwann auf einen Timeout. Das funktioniert auch pr?chtig. Das ist ja der Fall, wenn die Leitung weg ist Schluss. Laut Testszenario soll ich in nun in dem Fall, wo meine Kasse auf den Timeout l?uft, den Kassierer fragen, ob die Zahlung erfolgreich war und wenn er das mit nicht durch. Dieses Szenario besagt, dass die Verbindung unterbrochen werden muss und sp?testens beim Timeout wieder hergestellt sein muss. Es gibt auch andere Szenarien, bei denen die Verbindung wegbleiben kann nicht von der Schnittstelle. Es ist n?mlich relativ egal ob die Verbindung innerhalb des Timeout wieder hergestellt wird oder nicht. Das Problem m?sste in beiden F?llen sich gleich weiter bedeuten, dass das SW-Übertragungs- protokoll nach einer mir bisher unbekannten Zeit auf einen TimeOut läuft. Da Du Dich bisher weder konkret zum Hardware- noch zum Softwareprotokoll geäussert hast, kann hin und wieder das Problem. Da ist aber meine Anwendung l?ngst auf einen kontrollierten Timeout gelaufen (90sec), weil ja vom Terminal nix kam bzw. das Terminal in einem Wartemodus, weil
CreateWaitableTimer - WaitableTimer .NET Framework Hallo, ich habe folgende Anforderung. do { if ( Eingang = = 1 ) break } while (timeout < 5000) Ich muss eine Variable abpr?fen. Ist diese 1, kann ich sofort abbrechen, andernfalls schl?gt der Timeout zu. Unklar ist nun, wo ich das in den unteren Code implementiern muss, kann? Unklar while(true); Und im Thread einfach ein SetEvent(hIOChanged) setzen. . . - - Greetings Jochen My blog about Win32 and .NET http: / / blog.kalmbachnet.de / Hallo Joachim, Danke. K?nntest Du das konkretiesieren? SetEvent Variable = CreateEvent(. . .); / / 2. SetEvent(Variable); Natuerlich mit entsprechendem Error-Handling und Cleanup. Um dann mit Timeout zu warten nimmst Du diesen Code: switch(WaitForSingleObject(Variable, 5000)) { case WAIT_OBJECT_0: / / 'Variable' gesetzt default: / / timeout } Ich glaube Jochen ging davon aus dass Du die Variable in einem extra Thread ueberpruefst StartCount = GetTickCount(); do { if ( Eingang = = 1 ) GotEvent = true; else Sleep(PossibleLatencyDelay); / / ??? } while (!GotEvent && GetTickCount() - StartCount < timeout); PostMessage(hwndUI, MY_APPMESSAGE, whatever, GotEvent); return 0; } 3. Handler f??r MY_APPMESSAGE (WM_APPMESSAGE+x) erstellen, im wParam erkennst du, ob es ein Ergebnis oder Timeout gab. Das nur als Beispiel, du musst nat??rlich f??r dich passende Parameter definieren mich Dein 'CAboutDlg'? Also: Wenn ich das hier richtig verstehe, dann willst Du mit einem Button etwas starten und mit einem zweiten Button diesen Vorgang unterbrechen koennen. Folgende Grundlage vorneweg: Du