Archive
Menampilkan Informasi Package pada BDS About Box
Tahun lalu, saya pernah membahas trik bagaimana Menampilkan Informasi Package pada BDS SplashScreen. Pembahasan tersebut sebetulnya belum selesai, karena ada satu hal lagi yang lupa saya sampaikan, yaitu trik bagaimana Menampilkan Informasi Package pada BDS / GodeGear About Box.
Oke, tanpa ba-bi-bu, langsung aja, bagaimana menampilkan entri seperti yang disajikan pada gambar berikut?
Intinya masih tetap sama, menggunakan OTA (Open Tools API). Kali ini method yang digunakan adalah AddPluginInfo dan AddProductInfo.
ToolsAPI Documentation:
Call AddPluginInfo to provide information specific to a particular plugin.
The caller should save the returned index in order to later remove the
plug-in info using RemovePluginInfo. Title is displayed in a listbox in
which the user can select. Description is displayed in a memo which
should describe the plugin. And the Image is displayed next to the
Description when the title is selected. The Image should follow the same
size and rules as required for a plugin image in the splash screen. See
IOTASplashScreenServices. If IsUnRegistered is true, the title will be
painted red. LicenseStatus will be shown in a label when the title is
selected. SKUName will also be shown in a label when the title is selectedAddProductInfo follows the same rules as AddPluginInfo, except for
providing the About box Dialog title, copyright string and the extra
about box graphic. ACopyright should include both the product name,
version, and copyright info. This information is displayed at the top of
the about box. The Product image has the same rules as the image
passed to AddPluginInfo. If IsUnRegistered is true, the title will be
painted red. LicenseStatus will be shown in a label when the title is
selected. SKUName will also be shown in a label when the title is selected
function AddPluginInfo(const ATitle, ADescription: string; AImage: HBITMAP; AIsUnRegistered: Boolean = False; const ALicenseStatus: string = ''; const ASKUName: string = ''): Integer; function AddProductInfo(const ADialogTitle, ACopyright, ATitle, ADescription: string; AAboutImage, AProductImage: HBITMAP; AIsUnRegistered: Boolean = False; const ALicenseStatus: string = ''; const ASKUName: string = ''): Integer;
Yang perlu diingat adalah, ketika suatu package menambahkan entri informasi pada jendela About Box, maka entri tersebut juga harus dihapus ketika package tersebut di-unload. Untuk menghapus entri, menggunakan method berikut:
{ When a plugin is unloaded, it should actively remove itself from the AboutBoxServices but specifying the index returned from AddPluginInfo } procedure RemovePluginInfo(Index: Integer); { When a product personality is unloaded, it should actively remove itself from the AboutBoxServices but specifying the index returned from AddProductInfo } procedure RemoveProductInfo(Index: Integer);
Nah bentuk implementasinya seperti ini:
unit RegisterMyPackage; interface implementation uses ToolsAPI, Windows, Graphics, SysUtils; var AboutBoxServices : IOTAAboutBoxServices = nil; AboutBoxIndex : Integer = 0; resourcestring resPackageName = 'Bayu Prasetio''s Components Collection'; resLicense = 'Internal Usage'; resAboutCopyright = 'Copyright Bayu Prasetio'; resAboutTitle = 'Bayu Prasetio''s Components Collection'; resAboutDescription = 'This package contains some components' + #13#10 + 'created and developed by Bayu Prasetio'; procedure RegisterSplashScreen; var bmp: TBitmap; begin bmp := TBitmap.Create; bmp.LoadFromResourceName(HInstance, 'SPLASH'); SplashScreenServices.AddPluginBitmap(resPackageName, bmp.Handle, False, resLicense, ''); bmp.Free; end; procedure RegisterAboutBox; var ProductImage: HBITMAP; begin Supports(BorlandIDEServices,IOTAAboutBoxServices, AboutBoxServices); ProductImage := LoadBitmap(FindResourceHInstance(HInstance), 'SPLASH'); AboutBoxIndex := AboutBoxServices.AddPluginInfo(resPackageName, resAboutDescription, ProductImage, False, resLicense); end; procedure UnregisterAboutBox; begin if (AboutBoxIndex <> 0) and Assigned(AboutBoxServices) then begin AboutBoxServices.RemovePluginInfo(AboutBoxIndex); AboutBoxIndex := 0; AboutBoxServices := nil; end; end; initialization RegisterSplashScreen; RegisterAboutBox; finalization UnRegisterAboutBox; end.
Semoga bermanfaat.
Hari Ini Setahun Yang Lalu
Hari ini, setahun yang lalu..
Kami melaksanakan akad dan resepsi pernikahan kami..
Kemarin, sebulan yang lalu..
Rizki Bariputra, buah pernikahan kami telah lahir..
WideScreen (WXGA) Dengan Cita Rasa XGA
Saya ini kurang nyaman menggunakan resolusi layar WXGA, karena sudah terlanjur nyaman dengan XGA. Nah suatu ketika saya dapat laptop beresolusi WXGA. Maka inilah langkah yang saya lakukan untuk ‘menyamankan’ diri.
Seperti yang sudah saya informasikan sebelumnya bahwa saya mendapatkan mainan baru, pada post New Year, New Toys, dimana salah satu mainan tersebut adalah laptop Acer TravelMate 6291. Nah laptop ini, dan umumnya laptop baru, parti mengusung resolusi layar widescreen dengan resolusi WXGA. Memang masing – masing resolusi layar memiliki kelebihan dan kekurangan.
Nah permasalahannya, saya kurang nyaman dengan widescreen, mungkin karena bertahun – tahun saya menggunakan layar biasa. Tetap saja ketika saya mendapatkan laptop widescreen, akan saya konfigurasikan agar mendekati resolusi biasa.
Nah berikut ilustrasi perbandingan resolusi antara WXGA (1280×800) dengan XGA (1024×768). Catatan, teks pada gambar tidak sesuai, tertulis 1200, seharusnya 1280.
Nah saya ingin lebar dekstop saya berukuran 1024 atau mendekati, walaupun sesungguhnya resolusi layar laptop saya 1280.
Cara pertama tentu saja mengubah resolusi layar menjadi 1024×768 melalui Display Properties, tapi, tampilan menjadi pecah, gemuk dan tentu saja kurang nyaman.
Cara kedua adalah dengan memperbaiki tampilan pada cara pertama, yaitu dengan menggunakan Aspect Ratio, yang disediakan oleh Intel Graphic Media Accelerator Driver for Mobile. Langkah ini membuat tampilan lebih natural, namun akan terdapat blank area pada sisi kiri, kanan, atas dan bawah display karena display horizaontal yang ukurannya 1280 hanya diisi 1024 saja dan display vertikal yang ukurannya 800 diisi dengan 768.
Cara ketiga, nah yang ini sangat menarik, setidaknya menurut saya. Cara ini adalah memindahkan taskbar Windows dari bawah ke samping kanan layar.
Ilustrasi nya adalah sebagai berikut. Pada konfigurasi normal, Taskbar Windows terletak pada bawah display, seperti pada gambar berikut:
Nah untungnya Windows mengijinkan Taskbar dipindah posisinya, untuk itu saya pindah ke bagia sebelah kanan, dan saya sesuaikan lebarnya sehingga ukuran desktop yang saya gunakan mendekati 1024 pixel.
Dan selesai sudah.. Konfigurasi ini menurut saya sangat nyaman digunakan, karena ada beberapa keuntungan antara lain:
- QuickLaunch memuat lebih banyak icon
- Taskbar lebih luas dan lega, menampung lebih banyak informasi jendela dan menampulkan judul / title jendela dengan lebih jelas
- Trayicon memuat lebih banyak icon
Lebih jelasnya dapat dilihat pada gambar berikut:
Bagaimana.. hmm…
New Year, New Toys
Disela – sela kesibukan mengejar deadline di awal tahun baru, ternyata mainan baru yang ditunggu – tunggu telah tiba, saatnya meluangkan waktu sejenak untuk menyesuaikan diri dan bermain – main dengan mainan baru tersebut.
Dan ini mainan barunya:
- 2x (HP Proliant DL 380 G5 2x QuadCore Intel Xeon E5310 1.6GHz 2x4MB L2, 4GB RAM)
- 3x (HP Proliant DL 380 G5 1x QuadCore Intel Xeon E5310 1.6GHz 2x4MB L2, 3.2GB RAM)
- Acer TravelMate 6291
- CodeGear RAD Studio 2007 Delphi 2007 for Win32 R2
- DevExpress VCL Subscription
- CoreLabs MySQL Data Access Component v5.20
- EMS SQL Studio for MySQL
- Molebox Pro 2.2975