2013-02-21 4 views
2

캐럿 기호 (텍스트 커서)를 창에서 동적으로 변경하고 응용 프로그램과 독립적으로 (시스템 전체) 변경하고 싶습니다.Windows 시스템 전체에서 캐럿 기호 (텍스트 커서)를 동적으로 변경할 수 있습니까?

enter image description here

하지만 같은 유틸리티 툴을 할 수 있을지 모르겠어요 :

내가이 일을 의미한다.

Google에서 발견 한 것은 캐럿 심볼을 변경하기 위해 레지스트리를 조정하는 것이 었습니다.

레지스트리에서 변경된 후에는 컴퓨터를 다시 시작해야합니다.

캐럿 심볼을 변경하기 위해 내 컴퓨터를 다시 시작하고 싶지 않습니다.

다시 시작하지 않고도 Windows에서 캐럿 sybol을 변경할 수 있습니까?

+0

tag이 질문에 'delphi'또는 'C#'과 같은 언어를 사용하십시오. 보다 구체적인 답변을 얻는 데 도움이 될 것입니다. – jimsweb

답변

0

델파이를 사용하는 경우 가능합니다.

function GetCaretPosition(var APoint: TPoint): Boolean; 
var w: HWND; 
    aID, mID: DWORD; 
begin 
    Result:= False; 
    w:= GetForegroundWindow; 
    if w <> 0 then 
    begin 
    aID:= GetWindowThreadProcessId(w, nil); 
    mID:= GetCurrentThreadid; 
    if aID <> mID then 
    begin 
     if AttachThreadInput(mID, aID, True) then 
     begin 
     w:= GetFocus; 
     if w <> 0 then 
     begin 
      Result:= GetCaretPos(APoint); 
      ClientToScreen(w, APoint); 
     end; 
     AttachThreadInput(mID, aID, False); 
     end; 
    end; 
    end; 
end; 


//Small demo: set cursor to active caret position 
procedure TForm1.Button1Click(Sender: TObject); 
begin 
ListBox1.Items.Clear(); 
end; 

procedure TForm1.Timer1Timer(Sender: TObject); 
var 
    Pt: TPoint; 
begin 
    if GetCaretPosition(Pt) then 
    begin 
    ListBox1.Items.Add(Format('Caret position %d %d', [Pt.x, Pt.y])); 
// SetCursorPos(Pt.X, Pt.Y); 
    end; 
end; 

end. 
+0

이 데모는 위치를 변경하는 중입니다. 권리? – jung