在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, StdCtrls; type TForm1 = class(TForm) Button1: TButton; PopupMenu1: TPopupMenu; fgh1: TMenuItem; drg1: TMenuItem; dg1: TMenuItem; procedure Button1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var pt:TPoint; begin GetCursorPos(pt); PopupMenu1.Popup((pt.x-x),(pt.y+(Button1.Height-y))); end; end. 简单的一种下拉列表 |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论