I searched Delphi 3000 and I found a lot of ways for doing this work!
But before explain I must say sorry for my bad english grammer.
All of them was long and somtimes have errors; and because they use Windows API were hard to understand them.
Some of these articles are listed below:
1- http://www.delphi3000.com/articles/article_780.asp
A really good way but long and have bug
2- http://www.delphi3000.com/articles/article_1144.asp
A easy way but long
But now I want detail a very easy way just with two line of code.
Understand of this souce is very easy and I think it dont have bugs; please Report any bugs if you found
so let's see the code:
MyForm.Canvas.Brush.Bitmap := imgBack.Picture.Bitmap;
MyForm.Canvas.FillRect(Rect(0, 0, MyForm.Width, MyForm.Height));
|
Note: This code dont work with JPG image like most of other way that others articles suggested.
Mohammad Baqer Mamouri