본문 바로가기

분류 전체보기1063

델파이 스트링그리드(StringGrid) 셀 정렬하기 델파이 스트링그리드(StringGrid) 셀 정렬하기 스트링그리드의 셀을 원하시는 데로 정렬하실 수 있습니다. 스트링그리드의 OnDrawCell 이벤트를 원하시는 정렬방식으로 코딩해 주세요. // *********************************************************************** // 왼쪽 정렬 ************************************************************* // *********************************************************************** procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Inte.. 2021. 9. 16.
배민쇼핑라이브 몽베스트 캐시워크 돈버는퀴즈 정답은? 배민쇼핑라이브 몽베스트 캐시워크 돈버는퀴즈 정답은? [퀴즈] 생수 마신다면? 오늘 쟁여두기 좋은 날 몽베스트 생수 탄산수가 최대 ㅇㅇ% 할인하고 있어요. ㅇㅇ에 들어갈 숫자는 무엇일까요? 정답 '46' 2021. 9. 15.
델파이 advStringGrid 가운데 정렬 델파이 advStringGrid 가운데 정렬 StringGrid1.DefaultAlignment := taCenter 2021. 9. 15.
StringGrid 초기화 StringGrid 초기화 procedure TF_Item_Save.StringGridClear; var I: Integer; begin for I := 0 to StringGrid.ColCount - 1 do StringGrid.Cols[I].Clear; StringGrid.RowCount := 2; StringGrid.Cells[0,0] := '대분류'; StringGrid.Cells[1,0] := '중분류'; StringGrid.Cells[2,0] := '시약및재료명'; StringGrid.Cells[3,0] := '규격'; StringGrid.Cells[4,0] := '단위'; StringGrid.Cells[5,0] := '저장여부'; end; 2021. 9. 14.
델파이 퀀텀그리드 Multi select 된 Row값 가져오기 델파이 퀀텀그리드 Multi select 된 Row값 가져오기 for I := 0 to grdItemDBTableView1.Controller.SelectedRowCount -1 do begin qryTemp.Close; qryTemp.SQL.Clear; qryTemp.SQL.Add('Delete from mst_item where rowid = '+grdItemDBTableView1.Controller.SelectedRows[i].Values[0]+' '); qryTemp.ExecSQL; end; 2021. 9. 13.
델파이 스트링그리드 삭제/삽입 델파이 스트링그리드 삭제/삽입 // 줄 삭제 procedure StringGridDeleteRow(StringGrid: TStringGrid; Position: integer); var i: integer; begin for i := Position to StringGrid.RowCount - 1 do StringGrid.Rows[i] := StringGrid.Rows[i + 1]; StringGrid.RowCount := StringGrid.RowCount - 1; end; // 줄 삽입 procedure StringGridInsertRow(StringGrid: TStringGrid; Position: integer); var i: integer; begin StringGrid.RowCount := S.. 2021. 9. 9.
델파이 퀀텀그리드 마지막데이터 선택 델파이 퀀텀그리드 마지막데이터 선택 cxGridDBTableView6.DataController.FocusedRecordIndex := cxGridDBTableView6.DataController.RecordCount-1; 2021. 9. 7.
델파이 AdvStringGrid에서 MultiSelect 델파이 AdvStringGrid에서 MultiSelect 1. option -> RangceSelct = > True 2. MouseAction = > DisjuntCellSelect =>True 2021. 9. 6.
Delphi 스트링그리드(StringGrid) 정렬 Delphi 스트링그리드(StringGrid) 정렬 스트링그리드 컬럼을 선택하면 해당 컬럼으로 정렬됩니다. { ************** SortGrid ************* } procedure TForm1.SortGrid(Grid: TStringGrid; SortCol: Integer); { A simple exchange sort of grid rows } var I, J: Integer; temp: TStringList; begin temp := TStringList.create; with Grid do for I := FixedRows to RowCount - 2 do { because last row has no next row } for J := I + 1 to RowCount - 1 d.. 2021. 9. 3.
델파이 폼 모달 TForm modal, modaless show 델파이 폼 모달 TForm modal, modaless show 1. 모달 폼 띄우기 (팝업창, 모달, modal) ex) 설정폼. TfrmSetup frmSetup := TfrmSetup.Create(Self); // 폼 생성 ..... // 폼 생성 후 보이기 전에 하는 작업 .... try if frmSetup.ShowModal = mrOK then begin // modalresult = OK .... end; finally frmSetup.Free; // 폼 해제 frmSetup := nil; // 그냥 습관임. 폼 변수가 폼 생성 여부를 가르키게.. end; 2. 그냥 폼 띄우기 (모달리스, modaless) ex) 로그창. TfrmLogView 로그창이 떠 있으면 앞으로 보내고, 없으면 띄운.. 2021. 9. 2.
델파이 Tcxgrid 선택한 값 가져오기 델파이 Tcxgrid 선택한 값 가져오기 var i : Integer; vVal : Variant; begin //with cxGridDBTableView16 do //begin // ShowMessage(Columns[Controller.FocusedColumnIndex].Caption); // ShowMessage(Columns[Controller.SelectedColumns[4]].Caption); //end; //cxGridDBTableView16.DataController.SelectRows(4); vVal := Null; for I := 0 to cxGridDBTableView16.DataController.GetSelectedCount-1 do begin vVal := cxGridDBTabl.. 2021. 9. 1.
델파이 퀀텀그리드 Excel출력하기 델파이 퀀텀그리드 Excel출력하기 1. uses 절에 다음을 추가 한다 cxGridExportLink , shellApi 2. 엑셀버튼 클릭시 SaveDialog1.FileName := '상품코드.xls'; if SaveDialog1.Execute then begin ExportGridToExcel(SaveDialog1.FileName, Grid_Master, true, true, false, 'xls'); Application.ProcessMessages; if MessageDlg(SaveDialog1.FileName + ' 파일을 실행하시겠습니까?', mtWarning, [mbYes, mbNo], 0) = mrYes then ShellExecute(self.Handle, PChar('OPEN'), .. 2021. 8. 31.
델파이 TcxDBTreeList 북마크 Bookmarks 사용하기 델파이 TcxDBTreeList 북마크 사용하기 억지스럽지만.....모...; procedure DBTreeListSelectBookmark_Go(DBTreeLiat:TcxDBTreeList; iFocus, iFocus0,iFocus1,iFocus2,iFocus3: integer ); begin case iFocus of 0 : DBTreeLiat.Items[iFocus0].Focused := True; 1 : DBTreeLiat.Items[iFocus0].Items[iFocus1].Focused := True; 2 : DBTreeLiat.Items[iFocus0].Items[iFocus1].Items[iFocus2].Focused := True; 3 : DBTreeLiat.Items[iFocus0].I.. 2021. 8. 27.
델파이 퀀텀트리리스트 TcxDbTreeList 멀티셀렉트 데이터 키값가져오기 델파이 퀀텀트리리스트 TcxDbTreeList 멀티셀렉트 데이터 키값가져오기 procedure TForm1.Button1Click(Sender: TObject); Var i: integer; begin for I := 0 to cxDBTreeList1.SelectionCount - 1 do Memo1.lines.add(TcxDBTreeListNode(cxDBTreeList1.Selections[i]).KeyValue); end; procedure TForm1.Button1Click(Sender: TObject); Var i: integer; begin cxDBTreeList1.DataController.BeginUpdate; try for I := 0 to cxDBTreeList1.SelectionCou.. 2021. 8. 26.
delphi tadvcolumngrid fixedcolor delphi tadvcolumngrid fixedcolor grid.Look을 glStandard로 설정하고 grid.FixedColor를 사용할 수도 있습니다. 2021. 8. 25.
VCL 애플리케이션에서 TControl.StyleElements 사용/미사용 VCL 애플리케이션에서 TControl.StyleElements 사용/미사용 델파이 스타일 제외 시키기 VCL 애플리케이션 생성 Vcl.Controls.TControl.StyleElements 를 사용하려면 VCL Forms Application 을 만들어야 합니다 . 그렇게 하려면 다음 단계를 따르세요. 선택 파일> 새로 만들기> VCL Forms 응용 프로그램 - 델파이 VCL 양식 디자이너 를 열려면 프로젝트 관리자 에서 .pas 단위를 두 번 클릭 한 다음 코드 편집기의 아래쪽 가장자리에 있는 디자인 탭 을 클릭합니다 . 구성 요소 추가 및 설정 조정 애플리케이션을 실행하기 전에 다음을 수행해야 합니다. 드롭 이 TButton 로부터 도구 팔레트를 폼에. 양식의 아무 곳이나 클릭 하고 이벤트 탭 .. 2021. 8. 24.
델파이 동작 없을 시 자동 로그아웃 델파이 동작 없을 시 자동 로그아웃 var Form1: TForm1; tm: integer; Crs: TPoint; implementation {$R *.dfm} procedure TForm1.AppMessage(var Msg: TMsg; var Handled: Boolean); var message: TWMKey; begin if Msg.message = WM_MOUSEMOVE then begin if (Abs(LOWORD(Msg.lParam) - crs.x) > 20) or (Abs(HIWORD(Msg.lParam) - crs.y) > 20) then // 마우스 움직임 감시 tm := 0; end else if (Msg.message = WM_KEYDOWN) or (Msg.message = WM_K.. 2021. 8. 23.
델파이 ReleaseCapture SetCapture GetCapture 컴포넌트 이동 델파이 ReleaseCapture SetCapture GetCapture 컴포넌트 이동 ReleaseCapture, SetCapture, GetCapture 메소드들은 마우스 이벤트를 헨들링하기 위해 사용하는데요., 설명하자면, 평상시에는 마우스포인트가 움직일때, 그 포인트 밑에 있는 컨트롤들이 메시지를 받아서 처리하게 되는데, SetCapture 로 특정컨트롤을 지정하면, 마우스의 메시지가(클릭,이동등등..) 그 컨트롤에 보내지게 됩니다. 즉, 마우스 포인터가 컨트롤의 Front에 존재하지 않아도 컨트롤은 메시지를 받아 특정한 임무를 할 수 있죠.., 많이 쓰이는 곳은 드래그 하여 영역을 지정하고 싶을때, 또는 마우스 드래그등을 할 때 등.. 런타임 컨트롤 마우스 이동등의...기능들... GetCapt.. 2021. 8. 22.
델파이 USB 및 하드디스크 모든정보 읽어보기 델파이 USB 및 하드디스크 모든정보 읽어보기 {$APPTYPE CONSOLE} uses Windows, Messages, SysUtils, Variants; type PHIDDAttributes = ^THIDDAttributes; HIDD_ATTRIBUTES = record Size: ULONG; // size of structure (set before call) VendorID: Word; ProductID: Word; VersionNumber: Word; // // Additional fields will be added to the end of this structure. // end; THIDDAttributes = HIDD_ATTRIBUTES; THIDUSBDeviceInfo = Record.. 2021. 8. 21.
하드디스크 시리얼번호 변경 샘풀 하드디스크 시리얼번호 변경 샘풀 Re:How can I change serial number of Hard Disk ? Getting and setting a disks serial number - by Borland Developer Support Staff Technical Information Database TI475D.txt Getting and setting a disks serial number Category :General Programming Platform :All Product :Pascal All Description: The following program shows how to read and write the serial number on a disk drive. It use.. 2021. 8. 19.