当前位置:主页>销售管理软件> 列表

哪里有这样效果的hint控件

企业管理软件版1楼: 哪里有这样效果的hint控件 ?

http://bbs.2ccc.com/attachments/qingyun_200510113303.jpg

感觉这样的效果很漂亮,不知该控件叫什么名字,再哪里可以下载?

大家也可以推荐自己用的感觉比较好的hint控件


http://www.daizhicun.com/bbs/dispbbs.asp?boardid=3&id=1356

2楼: 感觉没什么特别的啊 如用友erp软件下载

3楼: 系统自带的,在SHELLAPI单元有一个叫SHELLNOTIFY的函数就可以!

4楼: 我也感觉没有什么特别的,提供第三方hint控件的很多,而且类型多样,你可以自己搜索一下看看!

5楼: unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, commctrl, StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

const
TTS_BALLOON = $40;
TTM_SETTITLE = (WM_USER + 32);
var
Form1: TForm1;
hTooltip: Cardinal;
ti: TToolInfo;
buffer: array[0..255] of char;
implementation

{$R *.dfm}
procedure SetToolTip(hwnd: dword; lpti: PToolInfo; IconType: Integer; Text, Title: PChar; BackColor, TextColor: TColor);
//BackColor,TextColor分别是背景颜色和文本颜色,如果是0则取默认值.
var
Rect: TRect;
begin
hTooltip := CreateWindowEx(0, ''Tooltips_Class32'', nil, TTS_ALWAYSTIP or TTS_BALLOON,
Integer(CW_USEDEFAULT), Integer(CW_USEDEFAULT), Integer(CW_USEDEFAULT),
Integer(CW_USEDEFAULT), hwnd, 0, hInstance, nil);
if hTooltip <> 0 then
begin
SetWindowPos(hTooltip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE or
SWP_NOSIZE or SWP_NOACTIVATE);
ti.cbSize := SizeOf(TToolInfo);
ti.uFlags := TTF_SUBCLASS or TTF_TRANSPARENT;
ti.hInst := hInstance;
end;
if (hwnd <> 0) and (GetClientRect(hwnd, Rect)) then
begin
lpti.hwnd := hwnd;
lpti.Rect := Rect;
lpti.lpszText := Text;
SendMessage(hTooltip, TTM_ADDTOOL, 0, Integer(lpti));
FillChar(buffer, SizeOf(buffer), #0);
lstrcpy(buffer, Title);

if (IconType > 3) or (IconType < 0) then IconType := 0;

if BackColor <> 0 then
SendMessage(hTooltip, TTM_SETTIPBKCOLOR, BackColor, 0);

if TextColor <> 0 then
SendMessage(hTooltip, TTM_SETTIPTEXTCOLOR, TextColor, 0);
SendMessage(hTooltip, TTM_SETTITLE, IconType, Integer(@buffer));
end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
SetToolTip(Button1.Handle, @ti, 0, ''无图标'', ''提示标题'', $F0A07D, $FFFFFF);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
SetToolTip(Button2.Handle, @ti, 1, ''信息图标'', ''提示标题'', 0, 70);
end;

procedure TForm1.Button3Click(Sender: TObject);


begin
SetToolTip(Button3.Handle, @ti, 2, ''叹号图标'', ''提示标题'', $F0A07D, $FFFFFF);
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
SetToolTip(Button4.Handle, @ti, 3, ''错误图标'', ''提示标题'', 0, 0);
end;

end.

6楼: 楼上的做法,很典型,这样的源码,我自己也有不少.嘿嘿.

企业管理软件版7楼: 可能是raize的RzBalloonHints控件实现的吧,盒子上应该有下载



上一篇:求WinInet的详细教程   下一篇:ListView