"Example description" bubble hint because he is beautiful and well received by most users, the user is interested in what the programmer wants to achieve. This example implements the taskbar bubble tip and runs this instance as follows: Click the prompt, the bubble tip will appear, and click the close bubble will disappear. "Key Technology" This example implements the Showballontip method of the NotifyIcon control. The NotifyIcon control represents a control that creates an icon in the notification area, and its Showballoontip method is used to consistently display the time specified by a balloon tip with the specified title, problem, and icon in the taskbar, with the syntax of the method as follows:1 /** * * The Showballontip method syntax for the Nontifyicon control is as follows: "3 * void Nontifyicon.showballontip (int timeout,string tiptitle, String ti Ptext, Tolltipicon Tipicon); 4 * Parameters and Description: 5 * Timeout: Indicates the length of time the balloon tip is displayed 6 * Tiptitlt: Indicates the caption 7 * TipText displayed on balloon tip: Indicates the Text 8 * Tipicon: Icon representing balloon tip 9 **/"Design Process" (1) Open visual Studio and create a new WinForm application named Bubbleshowform, (2the form layout is shown above. (3The key code is as follows:1 //click "Prompt" 2 Private voidBtn_show_click (Objectsender, EventArgs e)3 { 4 This. notifyicon.visible =true;//set hint control visible 5 //Show Bubble Tip, time is 1 seconds, content is current time, icon is message icon 6 This. Notifyicon.showballoontip ( +,"Current Time:", DateTime.Now.ToLocalTime (). ToString (), tooltipicon.info); 7 } 8 9 //Click "Close"Ten Private voidBtn_close_click (Objectsender, EventArgs e) One { A This. notifyicon.visible =false;//set hint control hide -} Oh, a small function just, the key code above has been affixed, if you need attachments can message mailbox.
WinForms Implement bubble Prompt window (reprint)