Solved

Visibility of a Form from within another code module

Posted on 2003-12-09
6
183 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
QRReport  TQrmemo vertical stretching 1 55
drawing animated level bar based on numbers 3 111
creating threads in delphi 1 157
Browsing a TTreeView in Delphi 5 31
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 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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

679 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