Solved

Visibility of a Form from within another code module

Posted on 2003-12-09
6
185 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
[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
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses
Course of the Month11 days, left to enroll

631 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