Solved

put stuff to a new component

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

Technology Partners: 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

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

696 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