|
|
|
|
![]() ![]() |
| sanook |
Feb 19 2005, 09:29 AM
Post
#1
|
|
Guests |
How to change your start button caption using Delphi!
(By the way, the start button will be renamed back to "start" after you restart your computer) Here we go! 1. Create a new project in Delphi 2. Add a Button and an Edit box to your form, place them where you want. 3. Double click the button to enter the code editor so we can type code for our OnClick event. 4. The code for the OnClick event of our button should look like this: CODE procedure TForm1.Button1Click(Sender: TObject); var Handle1,Handle2:hwnd; begin Handle1:=FindWindow('Shell_TrayWnd',nil); //get the handle of the taskbar Handle2:=FindWindowEx(Handle1,0,'Button',nil); //get the handle of the start button from the taskbar SetWindowText(Handle2,PAnsiChar(Edit1.Text)); //set the text SendMessage(Handle2,Messages.WM_MOUSEMOVE,0,0); //used to refresh the caption of the start button end; 5. Alright, run the program (F9) and enjoy! The finished program should look something like this: Just type a new caption in the text box and click on the button. Piece of cake! |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 25th July 2008 - 08:19 PM |