| View previous topic :: View next topic |
| Author |
Message |
Jill Wyrtham Guest
|
Posted: Wed Nov 19, 2003 5:47 am Post subject: Difficult VCL Modification problem in Delphi 4 |
|
|
Hello all!
I need to do something truly weird, I need to override how a form is painted
in the IDE at design time. The code I need to change is in the Forms.pas
unit, in the PaintWindow procedure. It checks for a valid FDesigner and does
a grid only display. I need it to draw a bitmap as well as do the grid (just
drawing a simple already loaded bitmap on the form background). My problem
is while I can override the method for runtime just fine, the IDE ignores me
at design time. I've tried rebuilding Forms.pas in the "patched" folder like
the FAQ suggests, but still nothing.
I would deeply appreciate any help here, this is driving me crazy.
Laura (using a friend's account)
|
|
| Back to top |
|
 |
Ryan Mills Guest
|
Posted: Wed Nov 19, 2003 2:18 pm Post subject: Re: Difficult VCL Modification problem in Delphi 4 |
|
|
You will need to look up information on the csDesigning value of the ComponentState
property. Basically if you pay attention to that csDesigning and do something specifically for
that state you will be be able to interact with the form/component at designtime.
Be aware that what your trying to do is somewhat advanced. If you've never done anything
like this before (or even if you have) your going to be restarting Delphi alot.
HTH,
Ryan.
On Tue, 18 Nov 2003 22:47:07 -0700, "Jill Wyrtham" <kappainfometrics5 (AT) comcast (DOT) net> wrote:
| Quote: | Hello all!
I need to do something truly weird, I need to override how a form is painted
in the IDE at design time. The code I need to change is in the Forms.pas
unit, in the PaintWindow procedure. It checks for a valid FDesigner and does
a grid only display. I need it to draw a bitmap as well as do the grid (just
drawing a simple already loaded bitmap on the form background). My problem
is while I can override the method for runtime just fine, the IDE ignores me
at design time. I've tried rebuilding Forms.pas in the "patched" folder like
the FAQ suggests, but still nothing.
I would deeply appreciate any help here, this is driving me crazy.
Laura (using a friend's account)
|
|
|
| Back to top |
|
 |
Jill Wyrtham Guest
|
Posted: Wed Nov 19, 2003 4:44 pm Post subject: Re: Difficult VCL Modification problem in Delphi 4 |
|
|
"Ryan Mills" <rmcontrols (AT) mills-enterprise (DOT) ca> wrote
| Quote: | You will need to look up information on the csDesigning value of the
ComponentState
property. Basically if you pay attention to that csDesigning and do
something specifically for
that state you will be be able to interact with the form/component at
designtime. |
The problem isn't that (I already knew about it, but thanks! ) but rather
how to update the VCL runtime. I can't seem to get the changed forms.dcu
into the VCL40 package.
Laura
|
|
| Back to top |
|
 |
William Wong Guest
|
Posted: Thu Nov 20, 2003 2:18 am Post subject: Re: Difficult VCL Modification problem in Delphi 4 |
|
|
I am afraid you can't rebuild the VCL package because Borland do not supply
the .dpk file...
|
|
| Back to top |
|
 |
Roberto Scardovi Guest
|
Posted: Thu Nov 20, 2003 8:10 am Post subject: Re: Difficult VCL Modification problem in Delphi 4 |
|
|
If I understand correctly you do need your modified forms.dcu
available at runtime.
To achieve this you need simply to compile the modified forms.pas
and overwrite the original $DELPHI32libforms.dcu with the
modified one.
To get the modified forms.dcu
- open a new project
- save it in a given directory
- copy there the modified forms.pas
- compile the project
you should get forms.dcu.
Things get more complicated if you need applications be compiled
with dynamic link to runtime packages
"project->options->packages->build with runtime packages".
In this case you need to distribute a modified version of vcl40.bpl
containing
the modified forms.dcu.
In this case you may need a tool to manage DLL modules ...
Roberto
"Jill Wyrtham" <kappainfometrics5 (AT) comcast (DOT) net> wrote
| Quote: | "Ryan Mills" <rmcontrols (AT) mills-enterprise (DOT) ca> wrote in message
news:rpumrvkdgaksou356b3gnjnrm18vcg6fv5 (AT) 4ax (DOT) com...
You will need to look up information on the csDesigning value of the
ComponentState
property. Basically if you pay attention to that csDesigning and do
something specifically for
that state you will be be able to interact with the form/component at
designtime.
The problem isn't that (I already knew about it, but thanks! ) but rather
how to update the VCL runtime. I can't seem to get the changed forms.dcu
into the VCL40 package.
Laura
|
|
|
| Back to top |
|
 |
Roberto Scardovi Guest
|
Posted: Thu Nov 20, 2003 8:10 am Post subject: Re: Difficult VCL Modification problem in Delphi 4 |
|
|
If I understand correctly you do need your modified forms.dcu
available at runtime.
To achieve this you need simply to compile the modified forms.pas
and overwrite the original $DELPHI32libforms.dcu with the
modified one.
To get the modified forms.dcu
- open a new project
- save it in a given directory
- copy there the modified forms.pas
- compile the project
you should get forms.dcu.
Things get more complicated if you need applications be compiled
with dynamic link to runtime packages
"project->options->packages->build with runtime packages".
In this case you need to distribute a modified version of vcl40.bpl
containing
the modified forms.dcu.
In this case you may need a tool to manage DLL modules ...
Roberto
www.erzensoft.com
"Jill Wyrtham" <kappainfometrics5 (AT) comcast (DOT) net> wrote
| Quote: | "Ryan Mills" <rmcontrols (AT) mills-enterprise (DOT) ca> wrote in message
news:rpumrvkdgaksou356b3gnjnrm18vcg6fv5 (AT) 4ax (DOT) com...
You will need to look up information on the csDesigning value of the
ComponentState
property. Basically if you pay attention to that csDesigning and do
something specifically for
that state you will be be able to interact with the form/component at
designtime.
The problem isn't that (I already knew about it, but thanks! ) but rather
how to update the VCL runtime. I can't seem to get the changed forms.dcu
into the VCL40 package.
Laura
|
|
|
| Back to top |
|
 |
|