🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #666

Re: link to url

#666
From: Michel Leunen
Date: Sat, 19 Aug 2006 09:05
36 lines
2065 bytes
Michel Leunen wrote:

> ShellExecute(NULL,"open",Label1->Caption,NULL,NULL,SW_SHOW);

Should be 
ShellExecute(NULL,"open",Label1->Caption.c_str(),NULL,NULL,SW_SHOW);

You can also put the font color of your label to blue and change the 
cursor to a hand cursor when the mouse is over the label. Like this:

void __fastcall TForm1::Label1MouseEnter(TObject *Sender)
{
   Screen->Cursor = crHandPoint;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Label1MouseLeave(TObject *Sender)
{
   Screen->Cursor = crDefault;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Label1MouseUp(TObject *Sender, TMouseButton Button,
       TShiftState Shift, int X, int Y)
{
   ShellExecute(NULL,"open",Label3->Caption.c_str(),NULL,NULL,SW_SHOW);
}

Michel
-- 
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
http://www.leunen.com/
----------------------------------------
Technical Details
Message-ID: <44e6d444@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44e628d9@newsgroups.borland.com> <44e6d217@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,7e6e0b0f9a475a4e
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Sat, 19 Aug 2006 11:05:27 +0200
From: Michel Leunen <nospam@noreply.please>
Organization: www.leunen.com
User-Agent: Thunderbird 1.5.0.5 (Windows/20060719)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.web
Subject: Re: link to url
References: <44e628d9@newsgroups.borland.com> <44e6d217@newsgroups.borland.com>
In-Reply-To: <44e6d217@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.247.73.152
Message-ID: <44e6d444@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1155978308 81.247.73.152 (19 Aug 2006 02:05:08 -0700)
Lines: 36
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail