如何将开始按钮的'开始'两个字更换掉,我试了没有办法呀.
谁能告诉我一下呀!

解决方案 »

  1.   

    开始按钮?那个是一个位图吧?这样看行不行?
    --------------------------
    var 
      StartButton: hWnd; 
      NewImage: TPicture; procedure TForm1.FormCreate(Sender: TObject); 
    begin 
      NewImage := TPicture.create; 
      NewImage.LoadFromFile('C:\1.BMP'); 
      StartButton := FindWindowEx(FindWindow('Shell_TrayWnd', nil), 0,'Button', nil); 
      SendMessage(StartButton,BM_SetImage,0,NewImage.Bitmap.Handle); 
    end;
      

  2.   

    更改开始按钮的位图 varForm1: TForm1;StartButton: hWnd;OldBitmap: THandle;NewImage: TPicture;/ 将代码放入FormCreate事件procedure TForm1.FormCreate(Sender: TObject);beginNewImage := TPicture.create;NewImage.LoadFromFile('C:.BMP');StartButton := FindWindowEx(FindWindow('Shell_TrayWnd', nil),0,'Button', nil);OldBitmap := SendMessage(StartButton,BM_SetImage, 0,NewImage.Bitmap.Handle);end;/还原procedure TForm1.FormDestroy(Sender: TObject);beginSendMessage(StartButton,BM_SetImage,0,OldBitmap);NewImage.Free;end;罗义书procedure TForm1.DisableStartMenu;varHandle,ChildHandle,SecLayerH,H:HWND;clsName:pchar;beginh:=findwindow('progman',nil);if h<>0 thenshowwindow(h,sw_hide);//getmem(clsName,255);Handle:=FindWindow('Shell_TrayWnd',nil);if Handle<>0 thenbeginChildHandle:=GetWindow(Handle,GW_Child);while ChildHandle<>0 dobeginGetClassName(ChildHandle,clsName,255);if string(clsName)='Button' thenbeginPostMessage(ChildHandle,WM_SYSCOMMAND,SC_CLOSE,0);end;if string(clsName)='TrayNotifyWnd' thenbeginSecLayerH:=GetWindow(ChildHandle,GW_CHILD);while SecLayerH<>0 dobeginGetClassName(SecLayerH,clsName,255);if string(clsName)='TrayClockWClass' thenbeginPostMessage(SecLayerH,WM_SYSCOMMAND,SC_CLOSE,0);end;SecLayerH:=GetWindow(SecLayerH,GW_HWNDNEXT);end;end;ChildHandle:=GetWindow(ChildHandle,GW_HWNDNEXT);end;end;freemem(clsName,255);end;
      

  3.   

    只是要更换那两个字是很简单的//更换开始按钮的Caption
    //S:更改成的字符
    procedure ChangeBeginBtnCaption(const S:string);
    var
      WHand: THandle;
    begin
      WHand := FindWindowEx(FindWindow('Shell_TrayWnd', nil),0,'Button',nil);
      SendMessage(WHand, WM_SETTEXT, 0, Longint(S));
    end;
      

  4.   

    WHand := FindWindowEx(FindWindow('Shell_TrayWnd', nil),0,'Button',nil);
      SendMessage(WHand, WM_SETTEXT, 0, Longint('停止'));