网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > Delphi
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
网络编程:ASP教程,ASP.NET教程,PHP教程,JSP教程,C#教程,数据库,XML教程,Ajax,Java,Perl,Shell,VB教程,Delphi,C/C++教程,软件工程,J2EE/J2ME,移动开发
本月文章推荐
.设计模式、用Delphi实现---->Bui.
.致Delphi和C++Builder社群的一封.
.怎样用delphi制作一个IPhunter(独.
.对PE资源的研究.
.修正XPMenu的两个Bug.
.Delphi实现Singleton模式.
.DELPHI中的静态虚拟及动态方法函.
.netmessagebuffersend示例.
.开发一个基于DCOM的局域网聊天室.
.讲述如何开发一个控件,很有价值(.
.我常去的几个站点,希望对同志们.
.DELPHI的原子世界.
.StatusBar有多个子栏时,如何确定.
.在Delphi中处理数据库日期型字段.
.在Delphi中开发使用多显示器的应.
.拷贝DBGrid当前行.
.Delphi中MIDAS程序的实例化模型种.
.Delphi&BCB一线程序员开.
.COM/DCOM中如何传递数组:.
.支持自绘画的属性编辑器.

关于exe文件传递参数方法

发表日期:2006-2-4


 

unit uMain;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, shellapi,
  Menus, Buttons, ExtCtrls;
const
  mousemsg = wm_user + 1;
  iid = 100;
type
  TForm1 = class(TForm)
    MainMenu1: TMainMenu;
    Panel1: TPanel;
    SpeedButton1: TSpeedButton;
    SpeedButton6: TSpeedButton;
    SpeedButton7: TSpeedButton;
    SpeedButton8: TSpeedButton;
    SpeedButton9: TSpeedButton;
    SpeedButton10: TSpeedButton;
    PopupMenu1: TPopupMenu;
    exit1: TMenuItem;
    SpeedButton2: TSpeedButton;
    procedure SQLLMClick(Sender: TObject);
    procedure N2Click(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormCreate(Sender: TObject);
    procedure exit1Click(Sender: TObject);
  private
    { Private declarations }
      procedure mousemessage(var message: tmessage); message
      mousemsg;
  public
    { Public declarations }
    procedure exec(sender: tobject);
  end;

var
  Form1: TForm1;
  ntida: TNotifyIcondataA;
implementation

{$R *.DFM}
procedure TForm1.mousemessage(var message: tmessage);
var
  mousept: TPoint;
begin
  inherited;
  if message.LParam = wm_rbuttonup then begin
      getcursorpos(mousept);
      popupmenu1.popup(mousept.x, mousept.y);
    end;
  if message.LParam = wm_lbuttonup then begin
      ShowWindow(Handle, SW_SHOW);
      ShowWindow(Application.handle, SW_SHOW);
      SetWindowLong(Application.Handle, GWL_EXSTYLE,
        not (GetWindowLong(Application.handle, GWL_EXSTYLE)
        or WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW));
    end;
  message.Result := 0;
end;

Procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action := caNone;
  ShowWindow(Handle, SW_HIDE);
  ShowWindow(Application.Handle, SW_HIDE);
  SetWindowLong(Application.Handle, GWL_EXSTYLE,
    not (GetWindowLong(Application.handle, GWL_EXSTYLE)
    or WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW));
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  ntida.cbSize := sizeof(tnotifyicondataa);
  ntida.Wnd := handle;
  ntida.uID := iid;  ntida.uFlags := nif_icon + nif_tip +
    nif_message;  ntida.uCallbackMessage := mousemsg;
  ntida.hIcon := Application.Icon.handle;
  ntida.szTip := 'Icon';
  shell_notifyicona(NIM_ADD, @ntida);
end;

procedure TForm1.exit1Click(Sender: TObject);
begin
  ntida.cbSize := sizeof(tnotifyicondataa);
  ntida.wnd := handle;
  ntida.uID := iid;
  ntida.uFlags := nif_icon + nif_tip + nif_message;
  ntida.uCallbackMessage := mousemsg;
  ntida.hIcon := Application.Icon.handle;
  ntida.szTip := 'Icon';
  shell_notifyicona(NIM_DELETE, @ntida);
  Application.Terminate;
end;

end.

上一篇:delphi制作的托盘程序 人气:7800
下一篇:DELPHI实现摄像头拍照 人气:5497
浏览全部Delphi的内容 Dreamweaver插件下载 网页广告代码 祝你圣诞节快乐 2009年新年快乐