一个小问题??: 生成"InternetExplorer.Application"对象 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ShellExecute(Handle, 'open', 'http://URL.com', nil, nil, SW_SHOWNORMAL); ShellExecute(Handle, 'open', 'http://URL.com', nil, nil, SW_SHOWNORMAL); 我用啊,可是还是不行,是不是还要添加那一个单元??? 同意kevin_gao(困了!累了!睡觉了!) AND gzmhero(hihihi) //pasunit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls;type TForm1 = class(TForm) Label1: TLabel; Label2: TLabel; procedure Label2MouseEnter(Sender: TObject); procedure Label2MouseLeave(Sender: TObject); procedure Label1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}uses ShellApi;procedure TForm1.Label2MouseEnter(Sender: TObject);begin TLabel(Sender).Font.Color := clBlue; TLabel(Sender).Font.Style := [fsUnderline];end;procedure TForm1.Label2MouseLeave(Sender: TObject);begin TLabel(Sender).Font.Color := clWindowText; TLabel(Sender).Font.Style := [];end;procedure TForm1.Label1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);begin ShellExecute(Handle, 'OPEN', PChar(TLabel(Sender).Caption), nil, nil, SW_NORMAL);end;end.//dfmobject Form1: TForm1 Left = 192 Top = 107 Width = 544 Height = 375 Caption = 'Form1' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = False PixelsPerInch = 96 TextHeight = 13 object Label1: TLabel Left = 8 Top = 48 Width = 99 Height = 13 Caption = 'http://www.sohu.com' Cursor = crHandPoint OnMouseDown = Label1MouseDown OnMouseEnter = Label2MouseEnter OnMouseLeave = Label2MouseLeave end object Label2: TLabel Left = 8 Top = 104 Width = 104 Height = 13 Caption = 'http://www.sohu.com' Cursor = crHandPoint OnMouseDown = Label1MouseDown OnMouseEnter = Label2MouseEnter OnMouseLeave = Label2MouseLeave endend to vine(vine): 好体贴、好舒服 这下每个月都放心了^V^ delphi下如何实现如下功能? 关于COM与ASP的一个问题 数据库负数问题 在线等待-30分 怎么获取某个目录下的所有文件夹(不包含子目录) 请问应如何引用word的注册,谁有调用word书签的例子。 我的菜单要实现如此效果该怎么做??? 怪问题 这是什么问题??帮帮我呀!! OleContainer word 打印预览 问题 急!急! 请教你们用的是那种数据库呀 ※〓〓〓〓 如何实现QQ那样的窗体?〓〓〓〓※ 这样生成一个透明,不规则的按纽的呢
我用啊,可是还是不行,是不是还要添加那一个单元???
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
procedure Label2MouseEnter(Sender: TObject);
procedure Label2MouseLeave(Sender: TObject);
procedure Label1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}uses
ShellApi;procedure TForm1.Label2MouseEnter(Sender: TObject);
begin
TLabel(Sender).Font.Color := clBlue;
TLabel(Sender).Font.Style := [fsUnderline];
end;procedure TForm1.Label2MouseLeave(Sender: TObject);
begin
TLabel(Sender).Font.Color := clWindowText;
TLabel(Sender).Font.Style := [];
end;procedure TForm1.Label1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
ShellExecute(Handle, 'OPEN', PChar(TLabel(Sender).Caption), nil, nil, SW_NORMAL);
end;end.//dfm
object Form1: TForm1
Left = 192
Top = 107
Width = 544
Height = 375
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 8
Top = 48
Width = 99
Height = 13
Caption = 'http://www.sohu.com'
Cursor = crHandPoint
OnMouseDown = Label1MouseDown
OnMouseEnter = Label2MouseEnter
OnMouseLeave = Label2MouseLeave
end
object Label2: TLabel
Left = 8
Top = 104
Width = 104
Height = 13
Caption = 'http://www.sohu.com'
Cursor = crHandPoint
OnMouseDown = Label1MouseDown
OnMouseEnter = Label2MouseEnter
OnMouseLeave = Label2MouseLeave
end
end
好体贴、好舒服
这下每个月都放心了^V^