Solved

Visibility of a Form from within another code module

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

912 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

18 Experts available now in Live!

Get 1:1 Help Now