我用form1.send_mess()好像是不行的
我已use form1_unit了

解决方案 »

  1.   

    将 Procedure SendMessage() 定义在Public区
      

  2.   

    但你不能将函数send_mess()写到TForm1的Private里
      

  3.   

    Function send_mess(mess_content:string):string;//广播消息放在public编译通不过呀
      

  4.   

    public
        { Public declarations }
    //    function is_regsoft():string;
        Function send_mess(mess_content:string):string;//广播消息
        myini2:Tinifile;
        myinifile2,path_str:string;
      end;提示:
    [Error] main_mdi.pas(151): Field definition not allowed after methods or properties
    [Fatal Error] main_mdi.pas(163): Could not compile used unit 'user_online.pas'
      

  5.   

    搞定
    Function send_mess(mess_content:string):string;//广播消息
    begin
    asdadsf
    end;
    改成
    Function Tw_main.send_mess(mess_content:string):string;//广播消息
    就可以了
    begin
    asdadsf
    end;