一般认为:foreach (object obj in checkedListBox1.SelectedItems)即可遍历选中的值.其实这里遍历的只是高亮的值并不是打勾的值.遍历打勾的值要用下面的代码: ; i < checkedListBox1.Items.Count; i++) { if (checkedListBox1.GetItemChecked(i)) { MessageBox.Show(checkedListBox1.GetItemText(checkedListBox1.Item
procedure TDR_QM_ZP_Form.Image_EZH( Bmp: TBitmap ); var p: PByteArray; Gray, x, y: Integer; begin //设置为24位真彩色 Bmp.PixelFormat := pf24Bit; randomize; for y := 0 to Bmp.Height - 1 do begin p := Bmp.scanline[y]; for x := 0 to Bmp.Width - 1 do begin //一个
Delphi的StringReplace 字符串替换函数 function StringReplace (const S, OldPattern, NewPattern: string; Flags: TReplaceFlags): string; rfReplaceAll:全部替换 rfIgnoreCase:忽略大小写 For Example: var aStr: String; begin aStr := 'This is a book, not a pen!'; ShowMessage(S
procedure TForm7.FormShortCut(var Msg: TWMKey; var Handled: Boolean); var aKey: TShortCut; aShift : TShiftState; i:integer; begin aShift:=KeyDataToShiftState(Msg.KeyData); i:=msg.CharCode; if (ssAlt in ashift)and (i=115) then halt; end; ht