Solved

put stuff to a new component

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

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…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 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