-=-
.
.....
  
 
RSS
Direkomendasikan menggunakan brower Opera/Chrome/Firefox. Resolusi minimal 1024x768 | Powered by ____ |
 
  
 
Nikmati Delphi-ID dalam berbagai versi tampilan :
Basic View (LOW Bandwidth)
Default View (Full)
Mobile Edition
Main Menu
..:: onWebTools ::..
..:: onLastPosts ::..
goto Postjumlah komponen maksimal dalam sebuah project(6)
 by d4mnf1y32
 on 21.May at 12:16
goto Posttanya grayscale to biner dengan scanline(1)
 by luckynvic
 on 20.May at 20:44
goto Posttanya looping biner to matriks(1)
 by luckynvic
 on 20.May at 20:10
goto Postsql error:acces denied for user....(2)
 by nasbms
 on 19.May at 16:54
goto Postpemanggilan frame(4)
 by nasbms
 on 19.May at 16:14
goto Posttanya AvLock(0)
 by azuriza
 on 19.May at 11:24
goto PostGet TDBEdit Value Menggunakan LookUp Grid(10)
 by henry_sys
 on 18.May at 11:27
goto Postmenghitung record dalam perulangan(4)
 by idhiel
 on 16.May at 13:53
goto Posttanya ascii(4)
 by mas_kofa
 on 16.May at 12:11
goto PostRawPrint Untuk Delphi XE2(0)
 by adewijaya
 on 15.May at 22:34
goto Postdatabase error..(4)
 by idhiel
 on 15.May at 15:57
goto Postbekasi, pt arila putra mahkota(3)
 by mas_kofa
 on 15.May at 15:37
goto Postbagaimana cara membaca file *.doc dg delphi?(0)
 by ficky
 on 15.May at 06:14
goto Posttanya biner to matriks(13)
 by diandewi
 on 14.May at 20:30

..:: onLast Articles ::..
..:: New Download ::..
Pascal-id.Org
Feeds -  Popular -  Latest
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: Perkenalan dan Absen
8 months, 3 weeks ago
RE: Alhamdulillah Buka Puasa Bersama
8 months, 3 weeks ago
RE: تَقَبَّلَ اللهُ مِنَّا وَمِنْكَ - Selamat Hari Raya Idul Fitri
8 months, 3 weeks ago
Lintas Situs
«
free web site stats and visitor tracking

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
marvelOffline
Location: Tangga Menuju He..
3 Post subject: menempatkan icon dalam sistem tray  PostPosted: 05/Dec/2005 23:48
onIntermediate


Joined: 29-Aug-2005
Posts: 46
Location: Tangga Menuju He..
Status: Offline
ini buat yg belum tao and yg uda tao Wink

      Code:

uses
..., ShellAPI;

const
WM_ICONTRAY = WM_USER + 1; //User-defined message

type

...

var
...
NotifyIconData   : TNotifyIconData;

implementation

procedure Tform1.formcreate(sender:Tobject);
begin
 with NotifyIconData do
 begin
 hIcon := Icon.Handle;
 StrPCopy(szTip, Application.Title);
 Wnd := Handle;
 uCallbackMassage := WM_ICONTRAY;
 uID := 1;
 uFlags := NIF_MESSAGE + NIF_ICON + NIF_TIP;
 cbSize := sizeof(TNotifyIconData);
end;

shell_NotifyIconData(NIM_ADD,@NotifyIconData);
{ini bisa ditaruh di onMinimize ato yg lainnya yg diatas juga heheh...}
SetWindowLong(
 Application.Handle,
 GWL_EXSTYLE,
 WS_EX_TOOLWINDOW);
end;


-code diatas digunakan untuk memunculkan icon pada objectinspector Form1
-tambahkan popupmenu untuk listing code dibawah ini
-jangan lupa icon nya dikasih gambar yah... kalo nga nti binggung...
      Code:

type
TForm1 = class(TForm)
....
private
 { Private declarations }
....
 procedure Icontray(
 var Msg: Tmessage); message WM_ICONTRAY;
public
 { Public declarations }
...
end;

procedure Tform1.Icontray(var Msg : Tmessage);

var
 CursorPos : Tpoint;
begin
 if Msg.LParam = WM_RBUTTONDOWN then
   begin
   GetCursorPos(CursorPos);
   PopupMenu1.Popup(CursorPos.X, CursorPos.Y);
   end else

   inherited;
end;


-menampilkan dan menyembunyikan form
-tambahkan Exit dan Show pada item di popupmenu

      Code:

procedure TForm1.Show1Click(Sender: TObject);
begin
 Application.Restore;
 // Shell_NotifyIcon(NIM_DELETE,@NotifyIconData);
end;

procedure Tform1.FormClose(
      Sender : TObject;
      var Action : TCloseAction);

begin
Action := caNone;
Hide;

//Shell_NotifyIcon(NIM_ADD,@NotifyIcaonData);
end;

Procedure TForm1.Exit1Click(sender: TObject);
begin
 Shell_NotifyIcon(NIM_DELETE,@NotifyIconData);
 Application.ProcessManager;
 Application.Terminate;
end;


pertanyaannya...
-pada even show1click aku menggunakana Application.Restore karena
pada saat aku menggunakan Form1.Show; tidak terjadi apa2...
-kira2 kenapa yah?
- ada code yg lain buat nampilin form nya nga ?
- Thanks
- Selamat Mencoba

_________________
-=-No-=Body's=-
=-=PerFecT=-=
░LOve Errors░
 
 View user's profile Send private message  
Reply with quote Back to top
cyber_heckerOffline
Location: Ponti Hot City
Post subject:   PostPosted: 06/Dec/2005 02:34
onProfessional


Joined: 19-May-2005
Posts: 981
Location: Ponti Hot City
Status: Offline
OOT: good.. good.. nice job... kept working.. @[gak tau artinya, yang penting keliatan keren] kekekeke....

_________________
 
 View user's profile Send private message Yahoo Messenger MSN Messenger  
Reply with quote Back to top
LuriDarmawan
Location: here
Post subject:   PostPosted: 06/Dec/2005 06:04
onApaAdanya


Joined: 15-Mar-2005
Posts: 1617
Location: here
buat marvel,
sebaiknya dimasukkan ke artikel saja.

kirim artikel bisa ke:
http://delphi-id.org/dpr/Submit_News.pas

_________________
KIOSS Project, http://kioss.com

http://Delphi-Id.Org | http://Fox-Id.Org | http://PHP-Id.org | http://InfoBencana.web.id
http://opensource-indonesia.com | http://VideoSilat.com | http://SilatIndonesia.com
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
marvelOffline
Location: Tangga Menuju He..
Post subject:   PostPosted: 06/Dec/2005 16:53
onIntermediate


Joined: 29-Aug-2005
Posts: 46
Location: Tangga Menuju He..
Status: Offline
      Quote:
cyber hacker
@[gak tau artinya


kalo nga salah @ artinya Return(kembali) ke procedure/variable/function dll.
mis: F adalah var
maka
@F adalah kembali ke var

oh ya..
buat popupmenu item Show coding nya sebaiknya diganti dengan
      Code:

ShowWindow(Application.handle,SW_SHOWNORMAL);


menjawab pertanyaan sendiri...
wakakakak....
dengan coding diatas.. maka jika show diclik .. window akan kembali ke ukuran awal

_________________
-=-No-=Body's=-
=-=PerFecT=-=
░LOve Errors░
 
 View user's profile Send private message  
Reply with quote Back to top
EkoIndriOffline
Location: Jakarta - Solo - Surabaya - Bali
Post subject:   PostPosted: 06/Dec/2005 19:54
onElite


Joined: 23-Nov-2005
Posts: 1185

Status: Offline
@marvel

sip2, namun lebih baik masuk di artikel.
usul kalau ada editor yang bertugas memuskkan artikel.

_________________
Blog Delphi favourite:

www.ekoindri.wordpress.com
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic





Powered by PNphpBB2 © 2003-2009 The Zafenio Team
Credits


| Register | Lost Password ? |