Solved

put stuff to a new component

Posted on 1997-03-18
4
164 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
Comment Utility
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
Comment Utility
Yes, 15 = nothing .... I will keep increasing it until either the problem being solved or answered.
0
 

Author Comment

by:zhuhail
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 85
Delphi XE7 Rest Client 2 172
Activex loadlibrary and show parented form issue 6 263
Printing problem 2 72
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 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

16 Experts available now in Live!

Get 1:1 Help Now