函数实现的功能很简单,就是判断MDIChild窗口是否已经打开,函数声明在窗口类中
-------------------------------------------------------------------------------
type
TF_MainMenu = class(TForm)
Menu_main: TMainMenu;
……
public
function ShowMenu(MenuName:String):boolean;
end;
------------------------------------------------------------------------------
但是,程序报错,提示说:
Unsatisfied forward or external declaration: 'TF_MainMenu.ShowMenu'
若是把函数放在private中,照样报错。
我百思不得其解,请问如何解决这个问题,谢谢。
附上函数
-------------------------------------------------------------------------------
function ShowMenu(MenuName:String):boolean;
var i:integer;
begin
Result:=false;
for i:=0 to screen.FormCount-1 do
if screen.Forms[i].Name=MenuName then
begin
Result:=true; // 找到
screen.Forms[i].Show;
break;
end;
end;
-----------------------------------------------------------------------------
-------------------------------------------------------------------------------
type
TF_MainMenu = class(TForm)
Menu_main: TMainMenu;
……
public
function ShowMenu(MenuName:String):boolean;
end;
------------------------------------------------------------------------------
但是,程序报错,提示说:
Unsatisfied forward or external declaration: 'TF_MainMenu.ShowMenu'
若是把函数放在private中,照样报错。
我百思不得其解,请问如何解决这个问题,谢谢。
附上函数
-------------------------------------------------------------------------------
function ShowMenu(MenuName:String):boolean;
var i:integer;
begin
Result:=false;
for i:=0 to screen.FormCount-1 do
if screen.Forms[i].Name=MenuName then
begin
Result:=true; // 找到
screen.Forms[i].Show;
break;
end;
end;
-----------------------------------------------------------------------------
解决方案 »
- delphi RM报表双击会出错,是控件问题吗?
- 浮动窗口
- 为什么 DBGridEh1.Columns['amount'].Footer.ValueType := vtSum; 这句话在编译的时候报错:Incompatible type: 'Integer' and 'String'
- 求怎样实现按用户输入的编号来对当前的DbGrid中的内容查找后定位显示在DbGrid中。
- delphi中如何使项目文件与其他*.PAS关联?
- 控件显示顺序的问题。
- 求jpg图片的过渡效果!!(不要bmp的!!谢谢)
- ADOTABLE
- 我在使用COMBOBOX和DBLOOKUPCOMBOBOX时,经常遇到版面空间有限而COMBOBOX和DBLOOKUPCOMBOBOX的下拉列表项过长而影响显示的问题,为了解决
- 关于readln的问题!
- 遍历控件的问题.
- 如何在xp下获得硬盘序列号?急*************************
var i:integer;
begin
Result:=false;
for i:=0 to screen.FormCount-1 do
if screen.Forms[i].Name=MenuName then
begin
Result:=true; // 找到
screen.Forms[i].Show;
break;
end;
end;