Delphi abc
1. 字符串连接直接用+,与Java和Python中的相同
2. 执行外部命令使用winexec,ShellExecute
eg. ShellExecute(0, 'open', 'jre/bin/java', '-lang zh-CN', 'E:\myfolder', SW_SHOW);
3. 判断文件、文件夹是否存在
FileExists('C:\Users\bill\somefile.txt')
DirectoryExits('C:\WINDOWS')
4. if else 结构
if FileExists(Edit1.Text) then
begin
....
end // 不可加分号
else if DirectoryExits('Edit1.Text') then
begin
....
end // 不可加分号
else
begin
....
end;
5. 获取屏幕宽度高度直接使用 Screen.Width Screen.Height
6. 设置窗口位置 SetBounds(left. top, width, height)
相关文档:
1、首先将delphi中Controls单元提取
2、修改Controls单元中如下部分:
procedure TWinControl.CreateParams(var Params: TCreateParams);
begin
FillChar(Params, SizeOf(Params), 0);
with Params do
begin
Caption := FText;
Style := WS_CHILD or WS_CLIPSIBLINGS;
&nbs ......
delphi + java 的分布式应用思考
用delphi做界面层 java业务逻辑层 这样看上去很美吧?
具体的实现
java 做业务逻辑层 应该有多种选择 企业级的有EJB3, 轻量级的有spring
目前在学习ejb3,感觉用来做业务逻辑层真的很不错。spring还没有了解
界面层用delphi,RAD应该是delphi的优势。
关键的问题的如果把 ......
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, TlHelp32;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Pub ......