Technology Learning

导航

2010年4月1日

JPG转换成BMP不成功???

摘要: procedure TForm14.Button2Click(Sender: TObject);var i:TBitmap; j:TjpegImage;begin form14.SavePictureDialog1.DefaultExt:='jpg';//'.jpg'; //set the default file ext i:=TBitmap.Create; j:=TjpegImage.Crea... 阅读全文

posted @ 2010-04-01 00:05 浔阳渔夫 阅读(1179) 评论(2) 推荐(0) 编辑

2010年3月29日

窗体显示在最上层

摘要: 1.设置FormStyle 为fsStayOnTop2.调用Api函数前者本质上也是调用SetWindowPosBOOLHWND hWnd,//窗体的句柄HWND hWndInsertAfter,//显示在最上面还是其他,本例为HWND_TOPMOSTint X,int Y,//point..int cx,int cy,//sizeUINT uFlags);//..SetWindowPos(han... 阅读全文

posted @ 2010-03-29 23:20 浔阳渔夫 阅读(520) 评论(0) 推荐(0) 编辑

移动无标题栏窗口

摘要: procedure WMNChitTest(var Msg:TWMNChitTest);message WM_NCHITTEST;procedure TForm13.WMNChitTest(var Msg:TWMNChitTest);begininherited;if Msg.Result=htClient then//将客户区消息转换成拖动标题时产生的消息 Msg.Result:=htCapti... 阅读全文

posted @ 2010-03-29 23:01 浔阳渔夫 阅读(151) 评论(0) 推荐(0) 编辑

不可移动的窗体

摘要: procedure windowsposchange(var Msg:TWMWINDOWPOSCHANGING);message WM_WINDOWPOSCHANGING;var Form13: TForm13; // oleft:integer; otop:integer; owidth:integer; oHeight:integer;implementation{$R *.dfm}proce... 阅读全文

posted @ 2010-03-29 22:51 浔阳渔夫 阅读(258) 评论(0) 推荐(0) 编辑

2010年3月28日

(转)界面闪烁解决办法

摘要: 1.防止刷新时闪烁的终极解决办法 [代码]2 Self.DoubleBuffered:=True; --------------------------------------------------------------- Self.DoubleBuffered:=True;/ScrollBox.DoubleBuffered:=True; //SelforparentisImage'spare... 阅读全文

posted @ 2010-03-28 23:54 浔阳渔夫 阅读(640) 评论(0) 推荐(0) 编辑

2010年3月26日

异常处理

摘要: bmp:=TBitmap.Create;// bmp.Handle:=LoadImage(HINSTANCE,'bmp1',IMAGE_BITMAP,0,0,0);//HINSTANCEtry bmp.LoadFromFile('testfas.bmp');except on EFOpenError do begin //ShowMessage('here'); bmp.LoadFromFile(... 阅读全文

posted @ 2010-03-26 17:21 浔阳渔夫 阅读(175) 评论(0) 推荐(0) 编辑

loadImage用法

摘要: pBitmap=LoadBitmap(hInstance,lpBitmapName) 这是加载资源中的Bitmap,而不是加载Bitmap文件。加载Bitmap文件,可以 用TBitmap: Graphics::TBitmap* Bmp = new Graphics::TBitmap; Bmp->LoadFromFile("d:\\a1.bmp"); Bmp->Handle 就是 HB... 阅读全文

posted @ 2010-03-26 12:41 浔阳渔夫 阅读(875) 评论(0) 推荐(0) 编辑

2010年3月25日

桌面滚动文字

摘要: procedure TForm10.FormCreate(Sender: TObject);beginBrush.Style:=bsclear;Fx:=0;end;procedure TForm10.Timer1Timer(Sender: TObject);var i1,i2:integer;begin //**** Form10.Visible:=false; //i1:=Random(800)... 阅读全文

posted @ 2010-03-25 22:09 浔阳渔夫 阅读(478) 评论(0) 推荐(0) 编辑

指针 问题

摘要: var i,j:integer; pi,pj:^integer;//Pointer;begin i:=12; j:=23; New(pi); New(pj); pi^:=10; pj^:=23; { if pi<>nil then FreeMemory(pi); } DisPose(pi); pi:=nil; if pi=nil then ShowMessage('nil') else... 阅读全文

posted @ 2010-03-25 13:53 浔阳渔夫 阅读(214) 评论(1) 推荐(0) 编辑

动态创建 listbox释放问题

摘要: procedure TForm5.FormCreate(Sender: TObject);begin//********** ListBox1:=TListBox.Create(self); ListBox1.Parent:=self; ListBox1.Left:=100; ListBox1.Top:=100; ListBox1.Width:=400; ListBox1.Height:=400;... 阅读全文

posted @ 2010-03-25 10:28 浔阳渔夫 阅读(672) 评论(0) 推荐(0) 编辑