你能不能把问题说的清楚一点,
这是我开发的一个软件中的"关于..."窗口中的代码(我是用C++Builder的)
当Mouse移到http://lingxun.yeah.net和shijianbcb@sina.com时,颜色变红,
Mouse为手形;移开,颜色恢复为蓝色,Mouse恢复为箭头;单击,就访问主页或发
E_Mail.
void __fastcall TAboutBox::Label6Click(TObject *Sender)
{
char *sj;
if(Sender==Label6)
sj = "http://lingxun.yeah.net";
if(Sender==Label8)
sj = "mailto:shijianbcb@sina.com";
ShellExecute(Application->Handle,NULL,
sj,NULL,NULL,SW_SHOW);
}
//---------------------------------------------------------------------------
void __fastcall TAboutBox::Label6MouseMove(TObject *Sender,
TShiftState Shift, int X, int Y)
{
Label6->Font->Color = clRed;
Label8->Font->Color = clBlue;
Label6->Font->Style = Label6->Font->Style<<TFontStyle(2);
Label8->Font->Style = Label8->Font->Style>>TFontStyle(2);
}
//---------------------------------------------------------------------------
void __fastcall TAboutBox::FormMouseMove(TObject *Sender,
TShiftState Shift, int X, int Y)
{
Label6->Font->Color = clBlue;
Label8->Font->Color = clBlue;
Label6->Font->Style = Label6->Font->Style>>TFontStyle(2);
Label8->Font->Style = Label8->Font->Style>>TFontStyle(2);
}
//---------------------------------------------------------------------------