New projects, click "Project" -> "Part", found and check "Microsoft PictureClip Control 6.0" Add it to the Toolbox.
Add a PictureClip control in the form, set its Picture property to load a pair image, set the COL attribute of the PictureClip control to 3 (3 columns), the ROW property is 3 (3 lines).
Then add a CommandButton control command1, set its style to 1 (graphic button), then copy 8 Command1, prompting if you create an array of controls, click "Yes", add a CommandButton Control Command2, set the CAPTION property to "Conversion" as follows Figure: Add the following code to the form: Option Explicit
Private sub fascist2_click () DIM I as INTEGER, J AS Integer for i = 0 to 8 Command1 (i) .caption = "" "Remove text Command1 (i) .PICTURE = PictureClip1.graphiccell (i) Command1 (i) .width = PictureClip1.cellwidth * 15 Command1 (i) .height = PictureClip1.cellHeight * 15 if i mod 3 = 0 THEN J = J 1 End if I mod 3 <> 0 THEN COMMAND1 (i) .MOVE Command1 (i - 1) .left command1 (i - 1) .width, command1 (0) .top (J - 1) * Command1 (0) .height else if i <> 0 THEN COMMAND1 (i) .MOVE Command1 (0) , Command1 (i - 1) .top Command1 (i - 1) .height end if End if Nextend Sub
Run: Click on "Conversion" in the actual application may not necessarily, so buttons can only create one (INDEX set to 0) and then create other buttons dynamically.