掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
ユニット分割について (ID:150049)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
フォームはIDEで作る場合は出来るんですが下記のような感じの場合に指定の仕方がわからない感じになります。 メインフォーム ----------------------------------------------- unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); end; var Form1: TForm1; implementation uses sample_module; {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin go(sender,self); end; end. ----------------------------------------------- sample_module.pas ----------------------------------------------- unit sample_module; interface uses windows,Dialogs,forms,ExtCtrls,Graphics,Controls,Classes,SysUtils,messages, StdCtrls; procedure go(sender:tobject;form:tform); procedure MouseMove(Sender: TObject; Shift: TShiftState; X,Y: Integer); implementation procedure MouseMove(Sender: TObject; Shift: TShiftState; X,Y: Integer); begin showmessage('xxx'); end; procedure go(sender:tobject;form:tform); var ti:timage; tf: TForm; ta:TApplicationEvents; begin tf:= TForm.Create(nil); tf.Caption := 'overlay1'; tf.FormStyle:=fsStayOnTop; tf.width:=200; tf.Height:=200; tf.OnMouseMove:= MouseMove; //tf.OnMouseMove:= MouseMove(form,[ssleft],10,10); tf.Show; end; end. -----------------------------------------------
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.