请问不用Form,如何建一个程序? 请问不用Form,如何建一个程序?这个程序运行时也没有form,应该如何建立? 能否给个具体的例子?谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 program project;useswindows,Messages;{$R *.RES}constappname='abc';varaMessage:tmsg;hwindow,button1,button2:hwnd;function WindowProc(window:hwnd;amessage,wparam,lparam:longint):longint;stdcall;export;beginwindowproc:=0;case amessage ofWM_DESTROY:begindestroywindow(button1);destroywindow(button2);PostQuitMessage(0);exit;end;wm_command:if lparam=button1 thenbeginMessageBox(hwindow,'fksd','kfdsl',MB_OK+MB_ICONINFORMATION);end;end;windowproc:=defwindowproc(window,aMessage,wParam,lParam);end;function WinRegister:boolean;varWindowClass:TWndClass;beginWindowClass.style:=cs_hredraw or cs_vredraw ;windowclass.lpfnWndProc:=@windowProc;windowClass.cbClsExtra:=0;windowClass.cbWndExtra:=0;windowclass.hInstance:=hinstance;windowclass.hIcon:=LoadIcon(0,IDI_APPLICATION);windowclass.hCursor:=LoadCursor(0,IDC_ARROW);windowclass.hbrBackground:=COLOR_BTNSHADOW;windowclass.lpszMenuName:=nil;windowclass.lpszClassName:=appname;result:=Registerclass(windowClass)<>0;end;function WinCreate:hwnd;varhWindow:hwnd;pchartemp:pchar;param:tagCREATESTRUCT;beginhwindow:=CreateWindowEx(WS_EX_RTLREADING or WS_EX_APPWINDOW,appname,'文件分解与合并演示程序',WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,0,0,hinstance,nil);if hwindow<>0 thenbeginparam.cx:=20;param.cy:=20;param.dwExStyle:=WS_CHILD+BS_PUSHBUTTON;param.hInstance:=hinstance;param.hMenu:=0;param.hwndParent:=hwindow;param.lpszClass:='button';param.x:=20;param.y:=20;pchartemp:='Kingron TEMP';button1:=createwindow('button','合并文件',param.dwExStyle,param.y,param.y,60,30,hwindow,0,hinstance,@param);param.x:=40;param.y:=60;button2:=createwindow('button','分解文件',param.dwExStyle,param.y,param.y,60,30,hwindow,0,hinstance,@param);showwindow(hwindow,cmdshow);showwindow(button2,cmdshow);showwindow(button1,cmdshow);updatewindow(hwindow);end;result:=hwindow;end;beginif not winregister thenbeginMessageBox(0,'窗口注册失败','错误',MB_OK+MB_ICONINFORMATION);exit;end;hwindow:=wincreate;while GetMessage(aMessage,0,0,0) dobeginTranslateMessage(amessage);DispatchMessage(aMessage);end;halt(amessage.wParam);end. 典型的控制台程序,就是没有窗体的程序!给你简单的:方法新建工程后,在工程中把Form1去掉;Project ->view source按下面的改就行了!program Project1;uses Forms;{$R *.res}begin// Application.Initialize;// Application.Run; Application.MessageBox('323','353');end. Delphi动态调用DLL问题,很诡异,求帮忙,快哭 了…… 【求助】有点难的数据库问题 关于获取字段值的问题? 帮帮忙!!! 在学delphi,但发现需要更系统的学习windows,请推荐几本好书,最好有下载网址 谁知道:.rm/.ram文件头的详细说明? 改注册表的难题:没有权限??100分相送 在线等候,第三方控件! 哪儿有d6的企业版下载 编程之路,我将如何走过 最后10分,跟大家开个玩笑... 谁能给我详细讲讲modalresult,please!
给你简单的:
方法新建工程后,在工程中把Form1去掉;
Project ->view source
按下面的改就行了!program Project1;uses
Forms;{$R *.res}begin
// Application.Initialize;
// Application.Run;
Application.MessageBox('323','353');
end.