Solved

delphi trackbar with mouse events

Posted on 2009-04-03
2
2,838 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

705 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