Delphi va Windows
Download 14.52 Kb.
|
Delphi va Windows
Delphi va Windows akmx 23.10.2015 Delphi va Windows 2015-10-23T08:04:08+00:00 Delphi 6 ta fikr Windows operastion tizimi foydalanuvchilariga noqulaylik tug’dirish yo’llaridan biri bu operastion tizimni noodatiy yo’l bilan ishlashga majburlashdir. Bu ishni delphi yordamida amalga oshirish mumkin. Quyida keltirilgan kodlardan foydalanib, delphi da bajariluvchi(exe) fayl yarating va uni ishga tushirib yuboring vassalom. 1. «ПУСК» tugmasini qotirib qo’yish. EnableWindow(FindWindowEx(FindWindow(‘Shell_TrayWnd’, nill), 0, ‘button’, nill), false); 1.2 «ПУСК»ni o’z holiga qaytarish EnableWindow(FindWindowEx(FindWindow(‘Shell_TrayWnd’, nill), 0, ‘button’, nill), true); 2. Ishchi stol(Рабочий стол) ni tozalash ShowWindow(FindWindow(nill, ‘ProgramManager’), sw_Hide); 2.1 Ishchi stol(Рабочий стол) ni o’z holiga keltirish ShowWindow(FindWindow(nill, ‘ProgramManager’), sw_Show); 3. Sichqoncha(мыш) knopkasini almashtirish SwapMouseButton(true); 3.1 Sichqoncha (мыш) knopkasini o’z joyiga qaytarish SwapMouseButton(false); ExitWindows(EW_RestartWindows,0); yoki ExitWindows(EW_ReBootSystem,0); 5. Yaratilgan dasturni «автозагрузка» ga o’rnatish Uses registry; —/—/—/
—/—/—/ var reg:Tregistry; begin reg:=TRegIniFile.Create; reg.RootKey:=HKey_Local_Machine; reg.OpenKey(‘Software’, true); reg.OpenKey(‘Microsoft’, true); reg.OpenKey(‘Windows’, true); reg.OpenKey(‘CurrentVersion’, true); reg.OpenKey(‘Run’, true); reg.WriteString(‘Dastur-nomi’, Application.ExeName) reg.closeKey; reg.Free; 6. Caps-Lock ni yoqish va o’chirish if getKeyState(VK_Capital) and 1=0 then Form1.Caption:=’caps no’ else Form1.Caption:=’caps ok’; 7. «ПУСК» ni ishga tushirish SendMessage(Self.Handle, WM_SysCommand, sc_TaskList, 0); ShowWindow(FindWindow(‘Shell_TrayWnd’, nill), sw_hide); 9.Panel zadach ni ko’rsatish ShowWindow(FindWindow(‘Shell_TrayWnd’, nill), sw_show); 10. Ovoz chiqaradigan funkstiya Beep;
11. Silka yaratish uses shellapi; —/—/—/ ShellExecute(Application.Handle, nil, ‘http:\\www.localhost/wordpress’, nil, nil, sw_shownormal); 12. Kursorni yo’q qilish showCursor(false); 13. CD-ROM ni ochish uses MMSYSTEM; —/—/—/ mciSendString(‘Set cdaudio door open wait’, nil, 0, Form1.Handle); 13.1. CD-ROM ni yopish uses MMSYSTEM; —/—/—/ mciSendString(‘Set cdaudio door closed wait’, nil, 0, Form1.Handle); 14. MSDOS komandalarini ishlatish. sw_restore-komanda bajarilishini ko’rish uchun WinExec(‘dir d:’, sw_Restore); 15. Faylni istalgan redaktorda ochish uses shellapi; —/—/—/ shellexecute(handle ,’open’, pchar(‘notepad’), pchar(‘fayl adresi’), nil, sw_show); Download 14.52 Kb. Do'stlaringiz bilan baham: |
ma'muriyatiga murojaat qiling