Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Is there any control component available for internet link in builder XE ?


This question is answered.


Permlink Replies: 21 - Last Post: Feb 20, 2015 10:31 AM Last Post By: Remy Lebeau (Te...
velrajan muthuvel

Posts: 28
Registered: 9/22/14
Is there any control component available for internet link in builder XE ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 17, 2015 7:12 AM
Hi,

Is there any control component available for internet link in embarcadero C++?

Kindly suggest any of the component available. If it is not available, how can i create the component in embarcadero c++ builder.

Edited by: velrajan muthuvel on Feb 17, 2015 7:12 AM
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Is there any control component available for internet link in builderXE ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 17, 2015 10:37 AM   in response to: velrajan muthuvel in response to: velrajan muthuvel
velrajan wrote:

Is there any control component available for internet link in
embarcadero C++?

What do you mean? Are you looking for a control that looks like an HTML
hyperlink and opens a URL when clicked? You can use a standard TLabel for
that, where its Color is set to the desired value, its Cursor is set to crHandPoint,
and its OnClick event calls the Win32 API ShellExecute() function with the
desired URL as input.

--
Remy Lebeau (TeamB)
velrajan muthuvel

Posts: 28
Registered: 9/22/14
Re: Is there any control component available for internet link in builderXE ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 17, 2015 10:55 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Yes I am looking for opening the HTML Hyperlink.

In Embarcadero, I seen one of the control. It's name as TLinkLabel. Could you know about what it is? Is there anything helpful to use to open the HTML hyperlink.

Regards
Velrajan Muthuvel

Remy Lebeau (TeamB) wrote:
velrajan wrote:

Is there any control component available for internet link in
embarcadero C++?

What do you mean? Are you looking for a control that looks like an HTML
hyperlink and opens a URL when clicked? You can use a standard TLabel for
that, where its Color is set to the desired value, its Cursor is set to crHandPoint,
and its OnClick event calls the Win32 API ShellExecute() function with the
desired URL as input.

--
Remy Lebeau (TeamB)
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Is there any control component available for internet link inbuilderXE ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 17, 2015 11:08 AM   in response to: velrajan muthuvel in response to: velrajan muthuvel
velrajan wrote:

In Embarcadero, I seen one of the control. It's name as TLinkLabel.
Could you know about what it is?

http://docwiki.embarcadero.com/Libraries/XE7/en/Vcl.ExtCtrls.TLinkLabel

Is there anything helpful to use to open the HTML hyperlink.

I already told you what you need to do - call ShellExecute() to open the
URL. For example, when using the TLinkLabel::OnLinkLabel event:

void __fastcall TForm1::LinkLabel1LinkClick(TObject *Sender, const String 
Link, TSysLinkType LinkType)
{
    if (LinkType == sltURL)
        ::ShellExecute(Handle, NULL, Link.c_str(), NULL, NULL, SW_SHOWNORMAL);
}


--
Remy Lebeau (TeamB)
velrajan muthuvel

Posts: 28
Registered: 9/22/14
Re: Is there any control component available for internet link inbuilderXE ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 18, 2015 6:14 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Hi Remy,

I tried to create the link using TLinkLabel caption property.

It does not shows like link, when I provide the input as html tag for TLinkLabel control.

For ex: In design time, I set TLinkLabel caption property as "Google". While executing the application, it does not appear as link. It print whatever caption set by me.

Is there any free third party control is available? Please let me know how can I set the caption as link?

Kindly help me.

Regards
Velrajan M

Remy Lebeau (TeamB) wrote:
velrajan wrote:

In Embarcadero, I seen one of the control. It's name as TLinkLabel.
Could you know about what it is?

http://docwiki.embarcadero.com/Libraries/XE7/en/Vcl.ExtCtrls.TLinkLabel

Is there anything helpful to use to open the HTML hyperlink.

I already told you what you need to do - call ShellExecute() to open the
URL. For example, when using the TLinkLabel::OnLinkLabel event:

void __fastcall TForm1::LinkLabel1LinkClick(TObject *Sender, const String 
Link, TSysLinkType LinkType)
{
    if (LinkType == sltURL)
        ::ShellExecute(Handle, NULL, Link.c_str(), NULL, NULL, SW_SHOWNORMAL);
}


--
Remy Lebeau (TeamB)
Robert Triest

Posts: 687
Registered: 3/24/05
Re: Is there any control component available for internet link inbuilderXE ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 18, 2015 6:55 AM   in response to: velrajan muthuvel in response to: velrajan muthuvel
You should add in the caption property something like:

<a href="http://www.somelink.com">SomeLink</a>


Just the whole "a href" like you declare it in HTML. Use the OnlinkClick event to read the "link" constant of
the event (const link will be : http://www.somelink.com).

procedure MyForm.LinkLabel1LinkClick(Sender: TObject; const Link: string; LinkType: TSysLinkType);
begin
  Showmessage(link);
end;


Then use the ShellExecute to execture the "link"
velrajan muthuvel

Posts: 28
Registered: 9/22/14
Re: Is there any control component available for internet link inbuilderXE ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 18, 2015 7:08 AM   in response to: Robert Triest in response to: Robert Triest
Yes I add it in TLinkLabel caption property what you said like that.

But still it is not working in execution time. When I execute the application, it shows the LinkLabel text as "SomeLink" instead of link.

Could you help me why it is display like it? Whether I need to configure any project settings.

Regards
Velrajan M

Robert Triest wrote:
You should add in the caption property something like:

<a href="http://www.somelink.com">SomeLink</a>


Just the whole "a href" like you declare it in HTML. Use the OnlinkClick event to read the "link" constant of
the event (const link will be : http://www.somelink.com).

procedure MyForm.LinkLabel1LinkClick(Sender: TObject; const Link: string; LinkType: TSysLinkType);
begin
  Showmessage(link);
end;


Then use the ShellExecute to execture the "link"
Robert Triest

Posts: 687
Registered: 3/24/05
Re: Is there any control component available for internet link inbuilderXE ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 18, 2015 7:15 AM   in response to: velrajan muthuvel in response to: velrajan muthuvel
if you use

<a href="http://www.somelink.com">SomeLink</a>


then "SomeLink" will be displayed on the form. If you use the onLinkClick then
the actual url is passed as the "Link" constant.

If you want to display the url also you need to do

<a href="http://www.somelink.com">http://www.somelink.com</a>
velrajan muthuvel

Posts: 28
Registered: 9/22/14
Re: Is there any control component available for internet link inbuilderXE ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 18, 2015 7:47 AM   in response to: Robert Triest in response to: Robert Triest
My problem is,

I am configuring the URL Link text as "google / Yahoo!" in TLinkLabel caption property.

When I execute the application, it shows the entire URL text "google / Yahoo!" in TLinkLabel control instead of showing the Link.

Could you help me why it display URL Link as Text like it? Whether I need to configure any project settings in embarcadero.

Regards
Velrajan M


Robert Triest wrote:
if you use

<a href="http://www.somelink.com">SomeLink</a>


then "SomeLink" will be displayed on the form. If you use the onLinkClick then
the actual url is passed as the "Link" constant.

If you want to display the url also you need to do

<a href="http://www.somelink.com">http://www.somelink.com</a>
Robert Triest

Posts: 687
Registered: 3/24/05
Re: Is there any control component available for internet link inbuilderXE ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 18, 2015 7:20 AM   in response to: velrajan muthuvel in response to: velrajan muthuvel
if you use

<a href="http://www.somelink.com">SomeLink</a>


then "SomeLink" will be displayed on the form. If you use the onLinkClick then
the actual url is passed as the "Link" constant.

If you want to display the url also you need to do

<a href="http://www.somelink.com">http://www.somelink.com</a>
velrajan muthuvel

Posts: 28
Registered: 9/22/14
Re: Is there any control component available for internet link inbuilderXE ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 18, 2015 10:16 AM   in response to: Robert Triest in response to: Robert Triest
Yes I configured the URL link Text as what you said.

My problem is

I am configuring the URL Link text as

 "<a href="http://www.google.com">google</a> / <a href="http://www.yahoo.co.jp">Yahoo!</a>" 
in TLinkLabel caption property.
When I execute the application, it shows the entire URL text
 "<a href="http://www.google.com">google</a> / <a href="http://www.yahoo.co.jp">Yahoo!</a>" 
in TLinkLabel control instead of showing the Link.

Could you help me why it display URL Link as Text like it? Whether I need to configure any project settings in embarcadero.
Regards
Velrajan M

Robert Triest wrote:
if you use

<a href="http://www.somelink.com">SomeLink</a>


then "SomeLink" will be displayed on the form. If you use the onLinkClick then
the actual url is passed as the "Link" constant.

If you want to display the url also you need to do

<a href="http://www.somelink.com">http://www.somelink.com</a>
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Is there any control component available for internet linkinbuilderXE ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 18, 2015 11:48 AM   in response to: velrajan muthuvel in response to: velrajan muthuvel
velrajan wrote:

I am configuring the URL Link text as

 "<a href="http://www.google.com">google</a> / <a href="http://www.yahoo.co.jp">Yahoo!</a>" 


in TLinkLabel caption property.

When I execute the application, it shows the entire URL text

"<a href="http://www.google.com">google</a> / <a href="http://www.yahoo.co.jp">Yahoo!</a>" 


in TLinkLabel control instead of showing the Link.

Works fine for me in XE2, in both Delphi and C++. I see "google / Yahoo" appear
as expected, at both and runtime, and clicking on either one triggers the OnLinkClick
event with the correct URL in the Link parameter.

So whatever you are doing to set the Caption, you are not setting it correctly.

--
Remy Lebeau (TeamB)
velrajan muthuvel

Posts: 28
Registered: 9/22/14
Re: Is there any control component available for internet linkinbuilderXE ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 18, 2015 11:55 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Hi Remy,

For me, it is not working correctly..

I suspect static library (or some settings) is not linked correctly linked to my project.

Whether any kind of settings needs to be configured in project?

Because Initially my project was in borland 6. Now I convert from BCB6 into Borland XE. Whether this conversion creates the problem?

Please do the needful.

Regards
Velrajan M
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Is there any control component available for internetlinkinbuilderXE ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 18, 2015 12:18 PM   in response to: velrajan muthuvel in response to: velrajan muthuvel
velrajan wrote:

For me, it is not working correctly..

TLinkLabel only works on Windows XP and later with Visual Styles enabled,
as it is based on the Win32 SysLink control (https://msdn.microsoft.com/en-us/library/windows/desktop/bb760706.aspx)
that is implemented in ComCtl32.dll v6.

Does your app have a manifest that enables ComCtl32 v6? If TLinkLabel cannot
access the SysLink class, it falls back to acting like a standard TLabel,
displaying the Caption as-is, and ignoring the OnLinkClick event. That sounds
like exactly what you are experiencing.

--
Remy Lebeau (TeamB)
velrajan muthuvel

Posts: 28
Registered: 9/22/14
Re: Is there any control component available for internetlinkinbuilderXE ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 18, 2015 1:19 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Hi Remy,

Where can I need to check "ComCtl32 v6" whether it is activated or not activated in project?

Could you help me how to configure in Embarcadero project settings?

And then Where can you find this information?

Regards
Velrajan M

Remy Lebeau (TeamB) wrote:
velrajan wrote:

For me, it is not working correctly..

TLinkLabel only works on Windows XP and later with Visual Styles enabled,
as it is based on the Win32 SysLink control (https://msdn.microsoft.com/en-us/library/windows/desktop/bb760706.aspx)
that is implemented in ComCtl32.dll v6.

Does your app have a manifest that enables ComCtl32 v6? If TLinkLabel cannot
access the SysLink class, it falls back to acting like a standard TLabel,
displaying the Caption as-is, and ignoring the OnLinkClick event. That sounds
like exactly what you are experiencing.

--
Remy Lebeau (TeamB)
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Is there any control component available forinternetlinkinbuilderXE ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 18, 2015 1:47 PM   in response to: velrajan muthuvel in response to: velrajan muthuvel
velrajan wrote:

Where can I need to check "ComCtl32 v6" whether it is activated
or not activated in project?

In the project options, look at the "Application > Runtime Themes" setting.
Is it set to "Enable runtime themes"? If so, then a default ComCtl32v6
manifest is provided by Delphi. Otherwise, if it is set to "Use custom manifest",
you have to provide a manifest file that includes a ComCtl32v6 dependancy
(see MSDN for details: https://msdn.microsoft.com/en-us/library/windows/desktop/bb773175.aspx).

Either way, at runtime, if the Available property of the global Vcl.Themes.StyleServices
singleton is False, TLinkLabel will not work (most of the VCL checks for
StyleServices.Enabled property, I don't know why TLinkLabel checks for StyleServices.Available
instead). You can check that condition in your own code, eg:

uses
  ..., System.SysUtils, Vcl.Themes;
 
procedure TForm1.FormCreate(Sender: TObject);
begin
  if not (CheckWin32Version(5, 1) and StyleServices.Available) then
    raise Exception.Create('ComCtl32 v6 is not available. TLinkLabel will 
not work!');
end;


--
Remy Lebeau (TeamB)
velrajan muthuvel

Posts: 28
Registered: 9/22/14
Re: Is there any control component available forinternetlinkinbuilderXE ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 19, 2015 2:46 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Hi Remy,

I try to enable the visual style manifest through code. I write the code like below

Below code is put it with other headers
#include <commctrl.h >
#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")


Below code is call it in _tWinMain()
InitCommonControls(); 


Still now it is not working. Could you help me out?

Regards
Velrajan M

Remy Lebeau (TeamB) wrote:
velrajan wrote:

Where can I need to check "ComCtl32 v6" whether it is activated
or not activated in project?

In the project options, look at the "Application > Runtime Themes" setting.
Is it set to "Enable runtime themes"? If so, then a default ComCtl32v6
manifest is provided by Delphi. Otherwise, if it is set to "Use custom manifest",
you have to provide a manifest file that includes a ComCtl32v6 dependancy
(see MSDN for details: https://msdn.microsoft.com/en-us/library/windows/desktop/bb773175.aspx).

Either way, at runtime, if the Available property of the global Vcl.Themes.StyleServices
singleton is False, TLinkLabel will not work (most of the VCL checks for
StyleServices.Enabled property, I don't know why TLinkLabel checks for StyleServices.Available
instead). You can check that condition in your own code, eg:

uses
  ..., System.SysUtils, Vcl.Themes;
 
procedure TForm1.FormCreate(Sender: TObject);
begin
  if not (CheckWin32Version(5, 1) and StyleServices.Available) then
    raise Exception.Create('ComCtl32 v6 is not available. TLinkLabel will 
not work!');
end;


--
Remy Lebeau (TeamB)
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Is there any control component available forinternetlinkinbuilderXE? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 19, 2015 10:13 AM   in response to: velrajan muthuvel in response to: velrajan muthuvel
velrajan wrote:

I try to enable the visual style manifest through code.

The #pragma you are trying to use only works in Visual Studio C++. C++Builder
does not support it.

To embed a manifest into your executable, use the Project Options dialog
instead, like I mentioned earlier. Set the "Application > Runtime Themes"
option to "Enable runtime themes", then the IDE will provide a default manifest
that enables ComCtl32 v6 for you. If you need to customize the manifest
(such as specifying UAC settings, OS compatibility settings, etc), you will
have to set the option to "Use custom manifest" instead, and then provide
your own manifest file (it is just an XML formatted text file).

--
Remy Lebeau (TeamB)
velrajan muthuvel

Posts: 28
Registered: 9/22/14
Re: Is there any control component available forinternetlinkinbuilderXE ? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 19, 2015 3:03 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Hi Remy,

I try to enable the visual style manifest through code. I write the code like below

Below code is put it with other headers
#include <commctrl.h >
#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")

Below code is call it in _tWinMain()

InitCommonControls(); 

Still now it is not working. Could you help me out?

Note: I am using Builder XE. In Builder XE, I could not able to find the "Use custom manifest" option.

Regards
Velrajan

Remy Lebeau (TeamB) wrote:
velrajan wrote:

Where can I need to check "ComCtl32 v6" whether it is activated
or not activated in project?

In the project options, look at the "Application > Runtime Themes" setting.
Is it set to "Enable runtime themes"? If so, then a default ComCtl32v6
manifest is provided by Delphi. Otherwise, if it is set to "Use custom manifest",
you have to provide a manifest file that includes a ComCtl32v6 dependancy
(see MSDN for details: https://msdn.microsoft.com/en-us/library/windows/desktop/bb773175.aspx).

Either way, at runtime, if the Available property of the global Vcl.Themes.StyleServices
singleton is False, TLinkLabel will not work (most of the VCL checks for
StyleServices.Enabled property, I don't know why TLinkLabel checks for StyleServices.Available
instead). You can check that condition in your own code, eg:

uses
  ..., System.SysUtils, Vcl.Themes;
 
procedure TForm1.FormCreate(Sender: TObject);
begin
  if not (CheckWin32Version(5, 1) and StyleServices.Available) then
    raise Exception.Create('ComCtl32 v6 is not available. TLinkLabel will 
not work!');
end;


--
Remy Lebeau (TeamB)
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Is there any control component available forinternetlinkinbuilderXE? [Edit]
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 19, 2015 10:54 AM   in response to: velrajan muthuvel in response to: velrajan muthuvel
velrajan wrote:

Note: I am using Builder XE. In Builder XE, I could not able
to find the "Use custom manifest" option.

You will have to disable the "Applicatioon > Enable runtime themes" checkbox,
then add an .RC file to your project that links to your custom manifest, eg:

MyApp.manifest:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="MyApp" 
type="win32"/>
  <description>MyApp Description</description>
  <dependency>
   <dependentAssembly>
     <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" 
version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="*"/>
   </dependentAssembly>
  </dependency>
</assembly>


MyAppManifest.rc:

1 24 "MyApp.manifest"


--
Remy Lebeau (TeamB)
velrajan muthuvel

Posts: 28
Registered: 9/22/14
Re: Is there any control component available forinternetlinkinbuilderXE? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 20, 2015 12:20 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Hi Remy,

In the below code, what 1 and 24 represent? Why we need to pass this argument in .rc file?.
      1 24 "MyApp.manifest"
 


And also, I need to configure the theme for only TLinkLabel control. I do not want to apply the theme for entire application

Regards
Velrajan M

Remy Lebeau (TeamB) wrote:
velrajan wrote:

Note: I am using Builder XE. In Builder XE, I could not able
to find the "Use custom manifest" option.

You will have to disable the "Applicatioon > Enable runtime themes" checkbox,
then add an .RC file to your project that links to your custom manifest, eg:

MyApp.manifest:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="MyApp" 
type="win32"/>
  <description>MyApp Description</description>
  <dependency>
   <dependentAssembly>
     <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" 
version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="*"/>
   </dependentAssembly>
  </dependency>
</assembly>


MyAppManifest.rc:

1 24 "MyApp.manifest"


--
Remy Lebeau (TeamB)

Edited by: velrajan muthuvel on Feb 20, 2015 12:20 AM
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Is there any control component availableforinternetlinkinbuilderXE? [Edit] [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 20, 2015 10:31 AM   in response to: velrajan muthuvel in response to: velrajan muthuvel
velrajan wrote:

In the below code, what 1 and 24 represent?

1 is the Resource ID, 24 is the Resource Type (RT_MANIFEST). You can use
defines to make that clearer:

#define RESID_MANIFEST 1
#define RT_MANIFEST 24
RESID_MANIFEST RT_MANIFEST "MyApp.manifest"


Why we need to pass this argument in .rc file?.

Because that is how C/C++ lets you link the content of external files (amongst
other things) into an executable. An .rc file compiles into a .res file,
which the linker can then link into the final executable's resources.

And also, I need to configure the theme for only TLinkLabel control.

You must enable ComCtl32.dll v6 for the entire process as a whole. You cannot
have multiple versions of ComCtl32.dll loaded into your app at the same time.
The only way to enable ComCtrl32.dll v6 is to include a Visual Styles manifest
in your app. There is no other option. And since you are using an older
IDE that does not natively support custom manifests, you must resort to managing
the executable's resources manually, and that means using a custom .rc/.res
file.

But ONLY if you need to customize the manifest. The IDE's default manifest
when the "Enable runtime themes" option is enabled is enough to enable ComCtrl32.dll
v6. But that is the ONLY thing the default manifest does. You only need
to customize the manifest if you need to specify other settings, such as
UAC privileges, OS compatibility settings, DPI awareness settings, etc.

I do not want to apply the theme for entire application

You don't have a choice if you want to use TLinkLabel. Visual Styles is
an all-or-nothing deal, and is required for SysLink controls (which TLinkLabel
uses) to operate correctly. Besides, why wouldn't you want to enable Visual
Styles? It has been around since XP, and is the experience that most users
expect from modern UIs. Having Visual Styles enable is Delphi's default
setting, or why are you disabling it?

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02