Solved

put stuff to a new component

Posted on 1997-03-18
4
171 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
[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
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 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