Solved

delphi trackbar with mouse events

Posted on 2009-04-03
2
2,695 Views
Last Modified: 2012-05-06
Hi experts,

  I am using delphi-7(pascal), I want trackbar with mouse up event. Please tell me how to get mouse up event for delphi normal trackbar. or please suggest me any free components for trackbar with mouse events.

0
Comment
Question by:inampudi1
  • 2
2 Comments
 
LVL 26

Accepted Solution

by:
EddieShipman earned 500 total points
ID: 24059812
Try this on for size:

unit Unit1;
 

interface
 

uses

  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

  Dialogs, ComCtrls;
 

type

  TTrackBar = class(ComCtrls.TTrackbar)

  protected

    property OnMouseUp;

  end;
 

  TForm1 = class(TForm)

    TrackBar1: TTrackBar;

    procedure TBMouseUp(Sender: TObject; Button: TMouseButton;

      Shift: TShiftState; X, Y: Integer);

    procedure FormCreate(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

  end;
 

var

  Form1: TForm1;
 

implementation
 

{$R *.dfm}
 

procedure TForm1.TBMouseUp(Sender: TObject; Button: TMouseButton;

  Shift: TShiftState; X, Y: Integer);

begin

  ShowMessage(IntToStr(x) + ':' + IntToStr(y));

end;
 

procedure TForm1.FormCreate(Sender: TObject);

begin

  TrackBar1.OnMouseUp := TBMouseUp;

end;
 

end.

Open in new window

0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 24081272
inampudi1, Have you had time to try the code?

It simply publishes the OnMouseUp for the trackbar control.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sending Gmail through Delphi 3 91
error 1.1 400 Bad request idhttp delphi 18 55
Working with hours 3 46
Dev express lookupcombo 3 11
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now