?
Solved

compiled source code in the project

Posted on 2004-04-25
2
Medium Priority
?
167 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 240 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month10 days, 12 hours left to enroll

765 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