SpeakComputers.com online store
Electronics Software Computers Handhelds Laptops and Tablets Mobile Phones Digital Cameras Camcorders Games Music Books Sport Mens and Womens Watches Power Tools Household appliances

PRODUCTS

Software Downloads 2012 Software Mac Software Security Student Editions Windows 7 Office 2010

C++ LinkLabel Control.

The C++ LinkLabel control is similiar to the label control, with the exception of hyperlinks. The LinkLabel control can display single or multiple hyperlinks. When the user clicks a hyperlink, the process can be started in th event.

Namespace: System::Windows::Forms
System.Windows.Forms (in system.windows.forms.dll)

Creating an new C++ Windows forms LinkLabel.
LinkLabel^ linklabel = gcnew LinkLabel;

Assigning a AutoSize Value to the LinkLabel Control.
linklabel->AutoSize = false;

Docking the C++ LinkLabel Control.
linklabel->Dock = System::Windows::Forms::DockStyle::Top;

Assigning a text value to the C++ LinkLabel control.
linklabel->Text = "Link to Web Site";

Adding a C++ LinkLabel control to the form.
Controls->Add(linklabel);

Creating a LinkClicked Event for the C++ LinkLabel control.
this->linklabel->LinkClicked += gcnew System::Windows::Forms::LinkLabelLinkClickedEventHandler(this, &Form1::linklabel_LinkClicked);

Responding to the C++ LinkLabel LinkClicked event.
private: System::Void linkLabel1_LinkClicked(System::Object^ sender, System::Windows::Forms::LinkLabelLinkClickedEventArgs^ e)
{
MessageBox::Show("Link Clicked");
}


C++ LinkLabel control Tutorial.
Home About Privacy Policy Resouces Search

Copy Right 2006 SpeakComputers.com - All Rights Reserved.