Solved

Visibility of a Form from within another code module

Posted on 2003-12-09
6
178 Views
Last Modified: 2010-04-05
Here's my question:

I have a Form (frmMain), and I have a TMenuItem(mnuNew) on frmMain.

In the USES area of my Form, I have a reference to my code Module (ExtCode).

How do I enable / disable mnuNew on frmMain from my code(ExtCode) module???


Thanks,

D.
0
Comment
Question by:inethog
  • 3
6 Comments
 
LVL 2

Expert Comment

by:odissey1
ID: 9909735
Hi,

this way:

unit Unit1;

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

type
  TForm1 = class(TForm)
    MainMenu1: TMainMenu;
    mnuNew: TMenuItem;
    ....

implementation

uses Unit2; //<<-yuo already have this


//--------------
unit Unit2;

implementation

uses Unit1; //<<<-add this

procedure .....
begin
     ...
     Form1.mnuNew.Enabled:=False;
     ...
end;

end.

regards,
odissey1
0
 
LVL 1

Author Comment

by:inethog
ID: 9909793
I've found the solution to the problem myself...

Thanks to Odissey1 for answering, but it's not the solution that works for me.

D.
0
 
LVL 2

Expert Comment

by:odissey1
ID: 9910094
Hi inethog,

could you share it? interesting..

odissey1
0
 
LVL 2

Expert Comment

by:odissey1
ID: 9914001
listening...
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 13056300
PAQed with points refunded (200)

modulo
Community Support Moderator
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now