WinXP pop up balloons

Just starting out? Need help? Post your questions and find answers here.
MrCoder
New User
New User
Posts: 8
Joined: Wed Dec 03, 2003 11:21 pm
Location: UK
Contact:

WinXP pop up balloons

Post by MrCoder »

Does anyone know how to use the pop up balloons in Windows like the one that is shown when you connect to the internet and it shows your connection speed. Any help appreciated.

PB Rocks!! :D
Fred
Administrator
Administrator
Posts: 18350
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Look in the VisualDesigner, it generate such ballon tips
MrCoder
New User
New User
Posts: 8
Joined: Wed Dec 03, 2003 11:21 pm
Location: UK
Contact:

Post by MrCoder »

Thanks Fred that was helpful. Here is the code just incase anyone else needs it.

Code: Select all

Procedure BalloonTip(WindowID, Gadget, Text$ , Title$, Icon)
  
  ToolTip=CreateWindowEx_(0,"ToolTips_Class32","",#WS_POPUP | #TTS_NOPREFIX | #TTS_BALLOON,0,0,0,0,WindowID(WindowID),0,GetModuleHandle_(0),0)
  SendMessage_(ToolTip,#TTM_SETTIPTEXTCOLOR,GetSysColor_(#COLOR_INFOTEXT),0)
  SendMessage_(ToolTip,#TTM_SETTIPBKCOLOR,GetSysColor_(#COLOR_INFOBK),0)
  SendMessage_(ToolTip,#TTM_SETMAXTIPWIDTH,0,180)
  Balloon.TOOLINFO\cbSize=SizeOf(TOOLINFO)
  Balloon\uFlags=#TTF_IDISHWND | #TTF_SUBCLASS
  Balloon\hWnd=GadgetID(Gadget)
  Balloon\uId=GadgetID(Gadget)
  Balloon\lpszText=@Text$
  SendMessage_(ToolTip, #TTM_ADDTOOL, 0, Balloon)
  If Title$ > ""
    SendMessage_(ToolTip, #TTM_SETTITLE, Icon, @Title$)
  EndIf
  
EndProcedure
MrCoder
New User
New User
Posts: 8
Joined: Wed Dec 03, 2003 11:21 pm
Location: UK
Contact:

Post by MrCoder »

Sorry to post about this again but does anybody know how to get them to go with an icon in the SYS TRAY like the automatic updates etc use.
There is this MSDN Page about tool tips with a bit about balloon tool tips for tray icons but I have no idea how to get them to work in PB.
IF anyone knows a way it would be great.

Thanks. :)
MrCoder
New User
New User
Posts: 8
Joined: Wed Dec 03, 2003 11:21 pm
Location: UK
Contact:

Post by MrCoder »

Bit of a bump here. hehe :)
I've been trying to get this to work but have had no luck so if anyone does know it would be quite helpful.

Thanks :roll:
Post Reply