S.A
Arkadaşlar forumda arattırdım bulamadım statusbarda capslock numlock ..saat tarih göstermek istiyorum ama nasıl olacağını bilmiyorum biraz tırmaladım beceremedim bilen varsa sevinirim.....Kolay gelsin....
Statusbar Kullanımı?
Forum kuralları
Forum kurallarını okuyup, uyunuz!
Forum kurallarını okuyup, uyunuz!
- ömer faruk
- Üye
- Mesajlar: 97
- Kayıt: 29 Eki 2003 09:34
- Konum: Bursa
- İletişim:
Statusbar Kullanımı?
Hakimiyet ALLAH' ındır...
bu hafta sonu nöbetçi benim 
eğer LMDToolboxını yüklersen orda hazır nir LMDStatusBar bileşeni var.
ücretsiz. onda saat tarih caps numfalan filan var.
http://www.lmd.de
http://www.lmd.de/downloads/lmd70se/lmd70se_d7.zip

eğer LMDToolboxını yüklersen orda hazır nir LMDStatusBar bileşeni var.
ücretsiz. onda saat tarih caps numfalan filan var.
Kod: Tümünü seç
tUser Current logged in computer user.
itWinDir Windows directory.
itCurrentDir32 Currently active directory (for your program)
itCurrentDiskFree32 Free disk space on drive of currently active directory.
itCurrentDiskSize32 Size of drive of currently active directory.
itSystemDir System directory (\WinNT\System)
itReg_Owner32 Registered owner of the installed OS.
itReg_Company32 Registered owner company of installed OS.
itVersion OS version
itColorDepth Current color depth (in bits)
itScreenSaverDelay Time until screen saver starts
itMemSize Available memory
itFreeSysRes 16 bit windows ...
itFreeGDIRes 16 bit windows ...
itFreeUserRes 16 bit windows ...
itComputerName32 Name of computer
itMajorVerNr32 Major version number of OS
itBuildNr32 Build number of OS
itMemLoaded32 memory loaded
itMemFree32 Free memory
itMemPageFree32 Memory pages free
itMemPageTotal32 Total memory pages
itMemVirtFree32 Free virtual memory
itMemVirtTotal32 Total virtual memory
itPlatformID32 platform id
itPlatform32 OS identifier (for example Windows NT)
itProcessorCont32 Number of processors
itProcessor32 Processor type / producer
itTempPath32 Path of temp folder
itDOSVersion DOS version (for example Win32)
itNumLock Num lock state
itCapsLock Caps lock state
itScroll Scroll lock state
itCurrentDateTime Current date and time
itProgCompany program version info - company
itProgName program version info - program name
itProgVersion program version info - version of program
itProgCopyright program version info - copyright
itProgTrademark program version info - trademark
itProgDescription program version info - description
itProgComments program version info - prog comments
itCPUSpeed Will CALCULATE speed of CPU - needs a short time period before ready.
http://www.lmd.de/downloads/lmd70se/lmd70se_d7.zip
- ömer faruk
- Üye
- Mesajlar: 97
- Kayıt: 29 Eki 2003 09:34
- Konum: Bursa
- İletişim:
tabii
ya haklısın böyle bir iş için component kullanmak doğru değil
şunu buldum buda işini görür umöarım

şunu buldum buda işini görür umöarım
Kod: Tümünü seç
uses
ShellApi;
procedure TForm1.Button1Click(Sender: TObject);
begin
if GetKeyState( VK_NUMLOCK ) = 1 then
StatusBar1.Panels[0].Text := 'NUMLOCK ON'
else
StatusBar1.Panels[0].Text := 'NUMLOCK OFF';
if GetKeyState( VK_CAPITAL) = 1 then
StatusBar1.Panels[1].Text := 'CAPSLOCK ON'
else
StatusBar1.Panels[1].Text := 'CAPSLOCK OFF';
end;
timerin intervalini artık kafana göre ayarlarsın 1000 yapınca caps veya numlocuk geç görüyor ama olcak okadar 200-300 ms falan yapınca ise boşuna bilgisayarı yorucan karar senin

Kod: Tümünü seç
procedure TForm1.Timer1Timer(Sender: TObject);
begin
if GetKeyState( VK_NUMLOCK ) = 1 then
StatusBar1.Panels[0].Text := 'NUMLOCK ON'
else
StatusBar1.Panels[0].Text := 'NUMLOCK OFF';
if GetKeyState( VK_CAPITAL) = 1 then
StatusBar1.Panels[1].Text := 'CAPSLOCK ON'
else
StatusBar1.Panels[1].Text := 'CAPSLOCK OFF';
StatusBar1.Panels[2].Text := datetostr(now);
StatusBar1.Panels[3].Text := timetostr(time);
end;
Eğer status panelde saat'in görünmesi istenmiyor ise timer olmadan aşağıdaki kodda kullanılabilir. Office paketinde bu yöntem kullanılıyor. "MouseMove" event'i yerine "wm_SetFocus" mesajıda kullanılabilir (bence bu daha iyi olur).
Kod: Tümünü seç
procedure TForm1.Refresh_Key_State;
begin
if (GetKeyState(VK_CAPITAL) and $01) <> 0 then
StatusBar1.Panels[0].Text:= 'Caps' else StatusBar1.Panels[0].Text:='';
if (GetKeyState(VK_INSERT) and $01) <> 0 then
StatusBar1.Panels[1].Text:= 'Ins' else StatusBar1.Panels[1].Text:='';
if (GetKeyState(VK_NUMLOCK) and $01) <> 0 then
StatusBar1.Panels[2].Text:= 'Num' else StatusBar1.Panels[2].Text:='';
end;
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
Refresh_Key_State;
end;
procedure TForm1.FormActivate(Sender: TObject);
begin
Refresh_Key_State;
end;
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
Refresh_Key_State;
end;