全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:4384
推到 Plurk!
推到 Facebook!

關於delphi2007開發pda程式

答題得分者是:G01
hungjeff
一般會員


發表:10
回覆:9
積分:3
註冊:2007-02-22

發送簡訊給我
#1 引用回覆 回覆 發表時間:2007-07-19 00:40:56 IP:218.162.xxx.xxx 訂閱
請問各位大大,我想要用2007試著寫一個簡單的pda程式,但是我不知道要選擇哪一個介面下開發,
還是需要像2006一樣需要安裝PocketGo跟PDA模擬器嗎?請各位大大指導我如何下手去開發pda程式,
不用教我寫很難的程式,我只要知道要在什麼環境下跟需要增加什麼元件就可以開發了,謝謝。

william
版主


發表:66
回覆:2535
積分:3048
註冊:2002-07-11

發送簡訊給我
#2 引用回覆 回覆 發表時間:2007-07-19 09:56:09 IP:147.8.xxx.xxx 訂閱

===================引 用 hungjeff 文 章===================
請問各位大大,我想要用2007試著寫一個簡單的pda程式,但是我不知道要選擇哪一個介面下開發,
還是需要像2006一樣需要安裝PocketGo跟PDA模擬器嗎?請各位大大指導我如何下手去開發pda程式,
不用教我寫很難的程式,我只要知道要在什麼環境下跟需要增加什麼元件就可以開發了,謝謝。

Delphi 2007 只能编寫 WIN32 的程式, 所以答案是「不能」。
G01
高階會員


發表:249
回覆:379
積分:215
註冊:2002-05-21

發送簡訊給我
#3 引用回覆 回覆 發表時間:2007-07-25 10:14:57 IP:220.130.xxx.xxx 訂閱
Delphi 2007只有Win32的模組 , 並不包含開發.NET 的編譯器....
G01
高階會員


發表:249
回覆:379
積分:215
註冊:2002-05-21

發送簡訊給我
#4 引用回覆 回覆 發表時間:2007-07-25 11:24:05 IP:220.130.xxx.xxx 訂閱
BDS2006(Delphi2006 for .NET)的.NET 開發環境算是比較穩定的(和Delphi2005比較起來)....
所以目前小弟也都是用PocketGo Delphi2006 來寫PDA程式

目前
PocketGo支援到的環境為 CF1.X與CF2.X

關於Delphi 原有類別的支援(例如: Classes,SysUtils...等等單元)是支援到 CF1.X
至於在CF2.X的部分,目前仍透過管道詢問CG之中...

不過大致上來說都還好.....開發出來的程式可以在以下的CE版本執行

CF1.X 部分:
PocketPC 2003 /
PocketPC 2003PE with CF (機種不限,只要是內建這些環境,基本上沒太大的問題)


CF2.X 部分:
Windos Mobile 5.0 with CF
(一樣機種不限,只要是內建這些環境,基本上沒太大的問題)

經過實機測試的有底下幾個機種

1.SP230
2.(多普達)PDA系列(818......)
3.Mio A201 ......
G01
高階會員


發表:249
回覆:379
積分:215
註冊:2002-05-21

發送簡訊給我
#5 引用回覆 回覆 發表時間:2007-07-25 11:26:49 IP:220.130.xxx.xxx 訂閱
另外給大家看一個例子(CF 1.X 程式碼):

unit WinForm1;

interface
{$define CF}

uses
System.Drawing, System.Collections, System.ComponentModel,
{$ifdef CF}
//===== Fix Libraries for MS Compact Framework (Above Windows Mobile 2003 V2)=====
System.Drawing.Font,System.Drawing.GraphicsUnit,System.ComponentModel.WindowsCE,
{$endif}
System.Windows.Forms, System.Data,
Borland.Vcl.Classes;

type
TWinForm1 = class(System.Windows.Forms.Form)
{$REGION 'Designer Managed Code'}
strict private
///
/// Required designer variable.
///

Components: System.ComponentModel.Container;
Button1: System.Windows.Forms.Button;
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

procedure InitializeComponent;
procedure Button1_Click(sender: System.Object; e: System.EventArgs);
{$ENDREGION}
strict protected
///
/// Clean up any resources being used.
///

procedure Dispose(Disposing: Boolean); override;
private
{ Private Declarations }
public
constructor Create;
end;

[assembly: RuntimeRequiredAttribute(TypeOf(TWinForm1))]

implementation

{$AUTOBOX ON}

{$REGION 'Windows Form Designer generated code'}
///
/// Required method for Designer support -- do not modify
/// the contents of this method with the code editor.
///

procedure TWinForm1.InitializeComponent;
begin
Self.Button1 := System.Windows.Forms.Button.Create;
Self.SuspendLayout;
//
// Button1
//
Self.Button1.Location := System.Drawing.Point.Create(36, 33);
Self.Button1.Name := 'Button1';
Self.Button1.TabIndex := 0;
Self.Button1.Text := 'Button1';
Include(Self.Button1.Click, Self.Button1_Click);
//
// TWinForm1
//
Self.AutoScaleBaseSize := System.Drawing.Size.Create(6, 16);
Self.ClientSize := System.Drawing.Size.Create(244, 302);
Self.Controls.Add(Self.Button1);
Self.Font := System.Drawing.Font.Create('新細明體', 9.75, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, (Byte(136)));
Self.Name := 'TWinForm1';
Self.Text := 'WinForm1';
Self.ResumeLayout(False);
end;
{$ENDREGION}

procedure TWinForm1.Dispose(Disposing: Boolean);
begin
if Disposing then
begin
if Components <> nil then
Components.Dispose();
end;
inherited Dispose(Disposing);
end;

constructor TWinForm1.Create;
begin
inherited Create;
//
// Required for Windows Form Designer support
//
InitializeComponent;
//
// TODO: Add any constructor code after InitializeComponent call
//
end;

procedure TWinForm1.Button1_Click(sender: System.Object; e: System.EventArgs);
var SS:TStringList;
begin
SS := TStringList.Create;
ss.Add('測試!! 我的VCL Class for CF!!');
ss.SaveToFile('\My Documents\AAA.txt');
ss.Clear;
ss.Free;
end;

end.

以上為在CF1.X環境使用 Classes內建TStringList類別的例子!!
系統時間:2024-05-04 9:32:47
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!