Picture/Image Wipe - VB to Delphi??
Posted on 1998-07-20
Hello...I'm a VB Programmer in the process (early stages) of learning Delphi. Right now I am converting some old programs from VB to Delphi to get a better handle on Delphi's syntax. Please examine the following Visual basic Sub:
Sub Fade(Pic As PictureBox, Style As Integer, Blocks As Integer)
Dim width_section_size As Integer
Dim height_section_size As Integer
Dim i As Integer, j As Integer
'Corrects Blocks if needed
If Blocks < 5 Then Blocks = 5
If Blocks > 100 Then Blocks = 100
'Sets the size of each width section
width_section_size = Pic.ScaleWidth / Blocks
'Sets the size of each height section
height_section_size = Pic.ScaleHeight / Blocks
For i = 0 To Blocks
For j = 0 To Blocks
Pic.Line ((i * width_section_size), (j * height_section_size))-((i + 1) * width_section_size, (j + 1) * height_section_size), , BF
I have been using this in some of my programs to do a simple wipe from left to right with a pictureBox. I am now trying to do the same thing in Delphi using Image1, but quite frankly I'm having a tough time. Could someone give me a hand in converting this code? I would appreciate any help or assistance.
Thanks in advance.