본문 바로가기
반응형

Delphi, RadStudio82

[delphi] Registering DLL and ActiveX controls from code [delphi] Registering DLL and ActiveX controls from code How to register (and unregister) OLE controls such as dynamic-link library (DLL) or ActiveX Controls (OCX) files from a Delphi application. RegSvr32.exe The regsvr32.exe command-line tool registers dll and ActiveX controls on a system. You can manually use the Regsvr32.exe (Windows.Start - Run) to register and unregister OLE controls such a.. 2011. 11. 28.
[delphi] COM Server or ActiveX OCX 등록 및 해제 Overriding the Registration exports from a COM In-Process Automation Server or ActiveX OCX Control How to perform additional work during the Registration routines of the COM In-Process Automation Server or OCX Control Many of us may need, at some point in time, to perform set operations on the registration or un-registration of either an In-Process Automation Server or an ActiveX OCX control tha.. 2011. 11. 28.
[delphi] OCX 등록 및 해제 [delphi] OCX 등록 및 해제 // (COM Server) OCX 등록 및 해제 // usage: // RegOCX('C:\Test.ocx'); unit ocxUtils; interface uses Windows, SysUtils, ComObj; procedure RegOCX(const DLLName: string); procedure UnRegOCX(const DLLName: string); implementation procedure RegOCX(const DLLName: string); begin if FileExists(DLLName) then RegisterComServer(DLLName); end; procedure UnRegOCX(const DLLName: string); type T.. 2011. 11. 28.
[개발/delphi] TMemo 에서 라인 선택하기 [개발/delphi] TMemo 에서 라인 선택하기 TMemo 에서 라인별로 마우스 드래그를 통해 선택한 것처럼 하는 함수. procedure MemoLineSelect(Memo: TMemo; LineNum: Integer); begin if Memo.Lines.Count 2011. 10. 29.
[개발/delphi] 중복 실행 방지 델파이로 중복 실행 방지 구현 소스 골라서 쓰자. =============================================================== #1 program Project; uses Forms, Windows, Dialogs, uMain in 'uMain.pas' {frmMain}; var hMutex : THandle; {$R *.res} begin hMutex := CreateMutex(nil, true, 'MajorProj'); // your mutex If (hMutex 0) and (GetLastError = 0) Then Begin Application.Initialize; Application.MainFormOnTaskbar := true; Application.C.. 2011. 9. 1.
[개발/delphi] 절대 죽지 않는 프로그램 만들기 dpr 프로젝트 파일을 아래와 같은 형태로 만들면 된다. programProject1; uses Forms, Windows, Messages, Unit1 in 'Unit1.pas'{Form1}; {$R *.res} var Msg: tagMSG; 종료금지: Boolean; const WM_MYQUIT = WM_USER+2533; begin 종료금지:=True; Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; while종료금지 do begin whilePeekMessage(Msg, 0, 0, 0, PM_REMOVE) do begin ifMSG.message = WM_MYQUIT then begin 종료금지:=Fal.. 2011. 8. 1.
[개발/delphi] Vista에서 프로그램 권한상승하기 여기 없어서 문서와 소스 올립니다. Windows Vista에서 레지스트리나 RegisterWindowMessage...뭐 좀 건드는거 하면 조용히 실행 안해서 프로그램 오류인가 비스타와 궁합 등등 속썩이는 경우. 관리자 권한으로 실행하여 User Account Control (UAC)을 띄워하라고 하여 했더니 되고요. 설치시하거나 델2007이상하면 되다는데 그럴 여건은 안되고... 첨부 문서대로 res파일을 만든후, 빌드하면 실행파일의 권한이 상승되어 비스타에서 잘 됩니다. 여기저기 찾아봐도 어려운 말이 많아서요, 일단 간단하게 되긴되는데 맞는 방법인지는.... (첨부파일의 WindowsVista.rc, WindowsVista.manifest 그대로 사용하시려면 1,2 생략 해도 됩니다) 1. 일단 메.. 2011. 8. 1.
[개발/Delphi] IE 띄우기, IE 실행하기 단 아래와 같이 하면 IE가 뜬다. usesComObj; procedureTForm1.Button1Click(Sender: TObject); var IE: OleVariant; begin try IE:=CreateOleObject('Internetexplorer.Application'); // 위치, 크기 IE.Left:=0; IE.Top :=0; IE.Width :=500; IE.Height:=400; // IE 윈도우 상태 IE.Toolbar :=False; IE.Statusbar:=False; IE.Menubar :=False; // 띄우기 IE.Visible:=True; SetForegroundWindow(IE.HWND); IE.Navigate('http://www.naver.com'); fina.. 2011. 8. 1.
[delphi] 델파이에서 XML DOM사용 (간단한 팁) XML강좌를 올려달라는 요청이 있어서... 강좌는 아니고 간단한 팁형식으로.. 써보고자 합니다.. XML을 다루는 방법도 여러개가 있지만... 주로 사용하는 DOM(Document Object Model)에 대해서만 간단하게 이야기 할까 합니다. (사실 다른건 잘 알지 못합니다. ^^;) 우선 XML DOM을 사용하시려면 XML, XPATH에 대해서 약간의 지식이 필요합니다. 먼저 델파이에서 XML DOM을 을 사용하시려면 MSXML_TLB나 MSXML2_TLB를 uses에 추가하셔야 합니다. (MSXML_TLB는 Import TypeLibrary를 통해 생성할 수 있습니다.) 주로 사용하는 Interface는 IXMLDomDocument? IXMLDomNodeList IXMLDomNode 등입니다. (.. 2010. 9. 16.
반응형