Solved

compiled source code in the project

Posted on 2004-04-25
2
163 Views
Last Modified: 2010-07-27
Hello!

i have a small project that i have done and now   i have couple forms to it. I would like to have a

part of the project compiled within the form

i want to complie a code that is under FormActivate and leave all the rest s it is.

what i mean by that :

well i just want to make the part of the code under FormActivate be invisible or coded

so a person that would open the project ,  could not see the code that is under

FormActivate.

acepcca
0
Comment
Question by:acepcca
[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 Comments
 
LVL 11

Accepted Solution

by:
shaneholmes earned 60 total points
ID: 10914515


You could wrape the functionality under the FormActivate into ints own routine, then add that routine to a separate unit
and then just provide them the DCU to that unit,  or compile that unit into a runtime package, and provide that instead of the code.....

SHane


Example

______________________________
Here is Main Form
______________________________

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
    procedure FormActivate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormActivate(Sender: TObject);
begin
 UpdateForm1Caption('Hello!');
end;

end.

__________________________________________________
Here Is Other Unit
__________________________________________________

unit Unit2;

interface

procedure UpdateForm1Caption(Cap: String);

implementation

uses Unit1;

procedure UpdateForm1Caption(Cap: String);
begin
 form1.Caption:= Cap;
end;
0
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 10916263

   Shane's idea is correct

   procedure ProcessForm (TargetForm : TForm);
   begin
      with TargetForm do
         begin
            Color := clGray;
            Caption := 'Form1 Caption'
            Label1.Caption := 'bla-blabla';
            // and so on ...
         end;
   End;
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

724 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