Delphi±àдϵͳ·þÎñÈý£º±àдÁ½ÆÜϵͳ·þÎñ
Delphi±àдϵͳ·þÎñÈý£º±àдÁ½ÆÜϵͳ·þÎñ ÊÕ²Ø
²ÉÓÃÏÂÃæµÄ·½·¨£¬¿ÉÒÔʵÏÖÒ»¸öÁ½ÆÜϵͳ·þÎñ£¨¼Èϵͳ·þÎñºÍ×ÀÃæ³ÌÐòµÄÁ½ÖÖģʽ£©
¹¤³Ì´úÂ룺
program FleetReportSvr;
uses
SvcMgr,
Forms,
SysUtils,
Windows,
SvrMain in 'SvrMain.pas' {FleetReportService: TService},
AppMain in 'AppMain.pas' {FmFleetReport}£»
{$R *.RES}
const
CSMutexName = 'Global\Services_Application_Mutex';
var
OneInstanceMutex: THandle;
SecMem: SECURITY_ATTRIBUTES;
aSD: SECURITY_DESCRIPTOR;
begin
InitializeSecurityDescriptor(@aSD, SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl(@aSD, True, nil, False);
SecMem.nLength := SizeOf(SECURITY_ATTRIBUTES);
SecMem.lpSecurityDescriptor := @aSD;
SecMem.bInheritHandle := False;
OneInstanceMutex := CreateMutex(@SecMem, False, CSMutexName);
if (GetLastError = ERROR_ALREADY_EXISTS)then
begin
DlgError('Error, Program or service already running!');
Exit;
end;
if FindCmdLineSwitch('svc', True) or
FindCmdLineSwitch('install', True) or
FindCmdLineSwitch('uninstall', True) then
begin
SvcMgr.Application.Initialize;
SvcMgr.Application.CreateForm(TSvSvrMain, SvSvrMain);
SvcMgr.Application.Run;
end
else
begin
Forms.Application.Initialize;
Forms.Application.CreateForm(TFmFmMain, FmMain);
Forms.Application.Run;
end;
end.
È»ºóÔÚSvrMain×¢²á·þÎñ£º
unit SvrMain;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, SvcMgr, Dialogs, MsgCenter;
type
TSvSvrMain = class(TService)
procedure ServiceStart(Sender: TService; var Started: Boolean);
procedure ServiceStop(Sender: TService; var Stopped: Boolean)
Ïà¹ØÎĵµ£º
1.SHIFT+Êó±ê×ó¼ü ÏÈÑ¡ÖÐÈÎÒ»¿Ø¼þ,°´¼üºó¿ÉÑ¡Öд°Ìå(Ñ¡Öпؼþºó°´EscЧ¹ûÒ»Ñù)
2.Shift+F8 µ÷ÊÔʱµ¯³öCPU´°¿Ú¡£
3.Shift+F10 µÈÓÚÊó±êÓÒ¼ü£¨Windows¿ì½Ý¼ü£©¡£
&n ......
C#µÄToolTip£¨delphi½ÐHint£©»úÖÆ·Ç³£¹Ö£¬²»ÊÇÏñdelphiµÄÔª¼þÒ»Ñù£¬Ã¿¸öTControlÓÐÒ»¸öHintÊôÐÔ£¬C#ÓÐÒ»¸öToolTipÔª¼þ£¬µ±°ÑÕâ¸öÔª¼þ´Ó¹¤¾ßÏäÀµ½formÉϺó£¬Ñ¡ÖÐformÉϵÄÈκÎcontrolÔª¼þ£¬ÔÚÊôÐÔ´°Ì壨Object Inspector£©ÉϾͻá¶à³öÒ»¸öÊôÐÔ“toolTip1ÉϵÄToolTip”£¬Èç¹û¶àÀ¼¸¸ ......
1¡¢¿ØÖÆPOS»úµÄ¿Í»§ÏÔʾÆÁ
procedure TFrmMain.ShowMoney(Money_Port: String;Money_String:String);
//Moneey_Port ¹ËÏÔ½Ó¿ÚCom1 or Com2 Money_String ¹ËÏÔÏÔʾµÄÄÚÈÝ
var
PrnFile ......
Ò»Ö±ÏëÈÃDelphi×öΪRIA£¬¶øÒµÎñ²ãʹÓÃJava£¡½ñÌìûÊÂ×ö£¬¼òµ¥ÊµÏÖÁËһϣ¡
ĿǰÓÐ2ÖÖ·½°¸£º
WebService
IndyHttpµ÷ÓÃServlet
ÒÔÏÂÊÇÓÃIndyHttpÀ´µ÷ÓÃServlet
Ò»¡¢ÏÈдһ¸öhelloworldµÄServlet
1.±àдuiÒÔ¼°service
//¹¤¾ß°ü
package com.cdrs.jutils;
import java.io.IOException;
import java.util.Date;
impor ......