使用Delphi XE4開發手電筒程式原始碼
[delphi]
// 檢查是否有閃光燈
Camera.HasFlash;
// 開啟閃光燈
Camera.TorchMode := TTorchMode.tmModeOn;
// 關閉閃光燈
Camera.TorchMode := TTorchMode.tmModeOff;
[/delphi]
【Delphi XE4】sqlite3.dll not found解決方式
Delphi XE4開發iOS資料庫時,Data Explorer建立SQLite連線時,Test Connection時出現 Failed: “sqlite3.dll not found”的訊息。
解決方式:
1.到 SQLite 網站 http://www.sqlite.org/
2.下載 sqlite-dll-win32-x86-3071700.zip
3.解壓縮後將 sqlite3.dll 複製到 C:\WINDOWS\system (64 bit則複製 c:\windows\sysWOW64 、 C:\Windows\System32 )
【Delphi XE】清空歡迎畫面中的開啟過檔案(Clear Recently Opened Projects)
在Delphi的IDE中,會記住曾開啟的專案及文件,不過日子久了之後,可能專案不見了,或是種種問題,會想要清空它。今天再來教大家如何清空囉!
一、開啟 File → Reopen →Properties
二、會出現圖中的 Reopen Menu Properties視窗,在這邊可以設定要記住幾個專案(Number of Projects)或是文件(Number of Files),在下面的Reopen items就是列表了,它還設計了幾個選項
Delete Nonexistent Files 刪除不存在的
Delete 刪除單一
Clear 全部清空
三、依照您想刪除的,清空後看起來就清爽多了。
RAD PAServer XE4 設定預設密碼
在前一篇XE3設置PAServer的文章中,有教各位如何設定預設的密碼!不過XE4的PAServer成了App後,位置也稍微不同了!分享給朋友們知道一下~
一、在RAD PAServer XE4按右鍵 顯示套件內容
二、資料夾依序進入 Contents→MacOS
四、用 文字編輯程式打開
可以看到內容
port=64211
scratchdir=~/RADPAServer/scratch-dir
在最後一行加入
password= xxxx
存檔後就可以囉!
UPUP 舉牌加油小人產生器
Delphi XE4 for iOS 台中場 Delphi K.Top站長分享App上架流程
強者前東家老闆,同時也是 Delphi K.Top討論區站長 領航天使(李信宏),透過自己實作的方式分享如何使用Delphi XE4開發iOS以及上架。簡報中也看到實際有上架了二個app,CChess(中國象棋暗棋)以及DiuDiu。這意味著以前利用Delphi 寫的遊戲,可以不用很痛苦的透過Delphi XE4移植到 iOS上囉!
【Delphi XE4】iOS開發教學文件
Embarcadero官方的文件 iOS Tutorials: Delphi iOS Application Development ,對於使用Delphi XE4開發iOS有興趣的朋友,一定得下載下來看看的好文件。
下載網址: http://docs.embarcadero.com/products/rad_studio/radstudioXE4/iOS%20Tutorial%20en.pdf
【Delphi XE4】定位功能
示範如果快速使用Delphi XE4開發iOS定位功能的程式
1.建立一個新的FireMonkey Mobile Application
2.選擇 Blank Application 空白類型。
3.新增元件ListBox,將 Align 改為 alTop; GroupingKind 改為 GsGrouped;StyleLookup 改為 transparentlistboxstyle。
4. ListBox按右鍵,Add Item 新增 TListBoxHeader,在裡面新增Label ,屬性 Align 設為 alClient ; StyleLookup 設為 toollabel ; TextAlign 設為 taCenter。
5. 接著新增三個 TListBoxItem,分別是開啟定位、經度、緯度。在開啟定位的右側新增TSwitch開關來開啟定位功能。經度、緯度使用TLabel。
6.接著在畫面上佈置TWebBrowser跟TLocationSensor,TWebBrowser的 Align 設為 alClient。
7.佈置好的畫面如下圖
8. 在Switch1 的 OnSwitch 事件中新增程式如下
[delphi]
procedure TForm1.Switch1Switch(Sender: TObject);
begin
LocationSensor1.Active := Switch1.IsChecked ;
end;
[/delphi]
9.接著在 LocationSensor1 的 OnLocationChange事件中新增程式如下
[delphi]
procedure TForm1.LocationSensor1LocationChanged(Sender: TObject;
const OldLocation, NewLocation: TLocationCoord2D);
const
sGoogleMapURL : String = ‘https://maps.google.com/maps?q=%s,%s&output=embed’;
begin
label3.Text := ‘經度: ‘ + NewLocation.Latitude.ToString;
label2.Text := ‘緯度: ‘ + NewLocation.Longitude.ToString;
WebBrowser1.Navigate(Format(sGoogleMapURL,
[NewLocation.Latitude.ToString,
NewLocation.Longitude.ToString]));
end;
[/delphi]
10.大功告成!我們來看執行結果
Delphi XE4 仿iOS美化
Eclipse出現adt錯誤訊息
打開Eclipse出現以下訊息~
The Android SDK requires Android Developer Toolkit version 21.1.0 or above.
Current version is 21.0.1.2012-12-6-2-58.
Please update ADT to the latest version.
接著還出現 ”installing software has encountered a problem”
解決方式:
Window → Preferences → Install/Update → Available Software Sites
點選 adt 按 edit
將http://dl-ssl.google.com/android/eclipse/
改成 https://dl-ssl.google.com/android/eclipse/