본문 바로가기

전체 글

작업관리자에만 나타나는 프로세스 강제로 종료하기 [출처 : http://www.delphi3000.com/articles/article_4324.asp?SK] 참고 --> TProcessEntry32 클래스는 TlHelp32.pas 유닛에 선언되어 있음 If you want to kill a process under windows 98, 2000,xp home or professional - use this function: function KillTask(ExeFileName: string): Integer; const PROCESS_TERMINATE = $0001; var ContinueLoop: BOOL; FSnapshotHandle: THandle; FProcessEntry32: TProcessEntry32; begin Result := 0; .. 더보기
Acrobat DDE : DocSaveAs 사용예 - VB예제 원본 : http://acrobat-dde.nnn2.com/?p=36 PDF파일을 읽고 페이지 삽입 또는 삭제 작업 처리후 다른 파일로 재저장 하기 위한 용도 Acrobat/DDE:DocSaveAs November 24th, 2009 Specified PDF file is preserved by the alias naming the name. Preservation to PDF file on the same name comes. When preserving it, the optimization of PDF file (reduction of the size) is done. It doesn’t operate in Acrobat Reader. Syntax [DocSaveAs(char* fullPath, ch.. 더보기
xnView:GFL_SDK GFL_BITMAP을 TBitmap으로 복사 //GFL_BITMAP 정보를 TBitmap에 반영한다. procedure TGflBitmap.SaveGflImageToBitmap(AGflImage : PGFL_BITMAP; ABitmap : TBitmap); var finfo: TGFL_FILE_INFORMATION; lp: TGFL_LOAD_PARAMS; gfl_bmp : PGFL_BITMAP; e: GFL_ERROR; filename: string; bmp: TBitmap; x, y, k: Integer; LineSrc: Pointer; LineDest: Pointer; LineIn: PLine1; LineOut: PByteArray; Mask1: Byte; Mask: Byte; pal: PLogPalette; i, bpp: Integer; Ar.. 더보기
xnView:GFL_SDK Bitmap을 Gfl_Bitmap으로 변환(메모리 방식) //TBitmap 정보를 TMemoryStream을 이용하여 가공 가능한 GFL_BITMAP로 복사한다 procedure TGflBitmap.SaveBitmapToGflImage(ABitmap : TBitmap; var AGflImage : PGFL_BITMAP); var finfo: TGFL_FILE_INFORMATION; lp: TGFL_LOAD_PARAMS; e: GFL_ERROR; filename: string; mem : TMemoryStream; pMem : TPointer; begin mem := TMemoryStream.Create; ABitmap.SaveToStream(mem); mem.Position := 0; gflEnableLZW(GFL_TRUE); gflGetDefaultLoadP.. 더보기
xnView-GFL_SDK : 메모리를 이용한 데이터 복사(gflSaveBitmapIntoMemory) 참고자료 C를 이용한 방법 GFL_ERROR init = gflLibraryInit(); if (GFL_NO_ERROR != init) { printf("error: %d\n", init); return; } gflEnableLZW(GFL_TRUE); // load jpeg GFL_BITMAP *thebitmap = NULL; GFL_LOAD_PARAMS lp1; gflGetDefaultLoadParams(&lp1); lp1.FormatIndex = -1; GFL_ERROR e1 = gflLoadBitmap("dsc04034.jpg", &thebitmap, &lp1, NULL); if (GFL_NO_ERROR != e1) { printf("error: %d\n", e1); } else { int tiff = gf.. 더보기
데이터베이스별 결과 제한 쿼리(top, rownum, Limit, inst_num, groupby_num, orderby_num) 1. MSSQL - TOP키워드 너무 잘 알고 있듯이 다음과 같이 쓰면 된다. SELECT top 100 * FROM testTable 2. Oracle - rownum 키워드 ROWNUM 기본 SELECT id,password, rownum FROM test WHERE rownum 한도 10개까지만 가져온다. mysql> select * from userTable where sex='male' limit 0, 20; >> 이경우 0부터 시작한다. 첫번째부터 20개까지만 추출한다. mysql> select no from userTable where gender='male' limit 10, 20; >> 11 번째 부터 20개까지만 추출한다. (0부터 시작이니까 0~9, 10~19, 20~29,... ) .. 더보기
StretchBitBlt를 이용한 이미지 확대 축소 This will paint directly to the screen just as example of not having to use a TImage. You'll have to modify for your needs... procedure TForm1.Button2Click(Sender: TObject); var jpg: TJPegImage; bmpInfo: TBitmapInfo; bits: Pointer; bmp: TBitmap; imgHeaderSize, ImgSize: Cardinal; ScreenDC: HDC; begin jpg:= TJpegImage.Create; bmp:= TBitmap.Create; ScreenDC:= getdc(0); try jpg.LoadFromFile('c:\temp.. 더보기
URLEncoding 함수 사용하기 function URLEncode(const S: string): string; var Idx: Integer; // loops thru characters in string begin Result := ''; for Idx := 1 to Length(S) do begin if S[Idx] in ['A'..'Z', 'a'..'z', '0'..'9', '-', '=', '&', ':', '/', '?', ';', '_', '.'] then Result := Result + S[Idx] else Result := Result + '%' + IntToHex(Ord(S[Idx]), 2); end; end; 더보기