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
Solved

Visibility of a Form from within another code module

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Syntax Check Delphi Seattle IOS app without MAC ? 1 104
Using idhttp to login to instagram 2 106
Delphi - replicating a form 8 81
update joined tables 2 55
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…

790 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