분류 전체보기590 문자열에서 특정 문자 갯수 알아오기 uses strutils; function countword(const source, wordstr : string; index : integer = 1):integer; var i, lensource : integer; begin result := 0; lensource := length(source); i := index; // 일정 인덱스 이후의 문자를 검색. while i0 then inc(result) else break; inc(i); end; end; 2008. 8. 13. 로컬 폰트 정보 가져오기 var DC: HDC; begin DC := GetDC(0); EnumFonts(DC, nil, @EnumFontsProc, Pointer(FontName.Items)); ReleaseDC(0, DC); FontName.Sorted := True; FontName.ItemIndex:=FontName.Items.IndexOf('Arial'); FontSize.ItemIndex:=1; 2008. 8. 13. AcitveX에서 ClassID 만 바꾸기 AcitveX에서 ClassID 만 바꾸는 방법입니다. 몰라서 첨부터 다 복사를 했었는데;; View 메뉴에서 Type Library를 선택합니다. 그중에 처음 프로젝트 생성시 정한 이름으로 되어있는게 있습니다. 그걸 클릭한다음 GUID에서 마우스 오른쪽키를 클릭한다음 New GUID를 하시면 됩니다. 2008. 8. 13. 중복 실행 방지 uses Forms, windows, ... var hMutex : LongInt; begin hMutex := OpenMutex( MUTEX_ALL_ACCESS, False, 'aaa1' ); If hMutex 0 Then Begin CloseHandle( hMutex ); Exit; End; hMutex := CreateMutex( Nil, False, 'aaa1'); Application.Initialize; 2008. 8. 13. 이전 1 ··· 118 119 120 121 122 123 124 ··· 148 다음