steff
asked on
Creating my own component in a application
Im creating my own component (non-visual) as a desant of TComponent.
In the application that uses the component I guess I have to call the Create-constructor of my component. I name the instance of my component 'MD1' in the application. So what I say is that I have to call MD1.Create(?).
I cant find out where to place the MD1.Create(?) and as use can see I dont know which parameter to send.
The form holding the component is called Form1 and I have tried to make an OnCreate-procedure for Form1 (called FormCreate).
In Form1.FormCreate I wrote a line like this:
...
MD1.Create(Self)
...
but when I run the application I get a run-time-error in the above line saing something like...
Acess-voilation....FFFFFFF F.... (you know it).
I figure that Self (From1) is not even Created itself by now (when FormCreate is called).
By the way. What I want to know is:
- Where should I put MD1.Create(?) and what parameter should I send with it.
- I would also like to know where Delphi Creates all the components of the form that is put on is visualy.
Thanx - Steff
In the application that uses the component I guess I have to call the Create-constructor of my component. I name the instance of my component 'MD1' in the application. So what I say is that I have to call MD1.Create(?).
I cant find out where to place the MD1.Create(?) and as use can see I dont know which parameter to send.
The form holding the component is called Form1 and I have tried to make an OnCreate-procedure for Form1 (called FormCreate).
In Form1.FormCreate I wrote a line like this:
...
MD1.Create(Self)
...
but when I run the application I get a run-time-error in the above line saing something like...
Acess-voilation....FFFFFFF
I figure that Self (From1) is not even Created itself by now (when FormCreate is called).
By the way. What I want to know is:
- Where should I put MD1.Create(?) and what parameter should I send with it.
- I would also like to know where Delphi Creates all the components of the form that is put on is visualy.
Thanx - Steff
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanx - Steff