Solved

put stuff to a new component

Posted on 1997-03-18
4
169 Views
Last Modified: 2010-04-04
There are some buttons and a shape in a form with the code:

procudure Tform1.comehere(AControl: TControl);
begin
form1.shape1.left := AControl.left + AControl.width;
form1.shape1.top  := AControl.top;
end;

All buttons got OnClick event:
procedure Tform1.Button1Click(sender: TObject);
begin
comehere(Button1);
end;

In runtime, when I click and button, the shape will go to the button...works fine.

My question is: How to put procedure Tform1.comehere and the shape into a new component
Tmoveshape = class(TCustomControl)
so that in designtime, I just need to put Tmoveshape to the form the shape will be automatically created and the work will be done (put method moveshape.comehere(Button1) in the event OnClick in each button).

PS. I have tried to make my question clear, but slill not very good :-(
0
Comment
Question by:zhuhail
  • 2
  • 2
4 Comments
 
LVL 3

Expert Comment

by:mheacock
ID: 1334913
Probably not worth 15 points.  I realize that you might be
running out of points, but Experts Exchange has a method
for getting more points, even if it involves cash.  Everything
does not come for free.  Someone might be willing to answer
anyhow, so you can take your chances.

Here's what I'd be looking for...
   100 = some pseudo code and info on how to complete yourself.
   200 = source code that completes the problem.
   15  = nothing.
0
 

Author Comment

by:zhuhail
ID: 1334914
Yes, 15 = nothing .... I will keep increasing it until either the problem being solved or answered.
0
 

Author Comment

by:zhuhail
ID: 1334915
Hi experts,

The question have been solved! Thank you very much for your helps.
I didn't increase the points because my Total Points didn't increase at all for quite a long time. Sorry.

I will set more points for my next question.
0
 
LVL 3

Accepted Solution

by:
mheacock earned 10 total points
ID: 1334916
I don't think you can get these fifteen points back...
So perhaps you like to just accept an answer (any answer)
and get it off the "Questions Being Asked" list.  You
might also want to put your solution in as a comment in
case anyone decides to view this Previously Asked Question in
the future.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

828 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