Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image Control

Status
Not open for further replies.

thirty4d

MIS
Feb 1, 2001
61
US
Hello,

I started a standard exe in VB6 called Butterfly.frm where there are 3 images called OpenWings, CloseWings and Main.

My problem is: during run-time, noticed that the frame is visible and I could not find in the properties of the Image control to make that invisible.

Thanks!
 
The Image Control has a Visibleproperty. Set it to False to hide it.

Image1.Visible=False _________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
 

rvBasic:

Thanks for your suggestion but I already tried that.

These are the visible property for the 3 images:

OpenWings Image visible property = false
CloseWings image visible property = false
Main Image visible property = True

Of course, when I set the visible property of Main Image to false during run-time then I could not see any image at all.

Note: This is what I have for code:

Option Explicit

Private Sub Image1_Click()

End Sub

Private Sub Command1_Click()
Beep
End
End Sub

Private Sub Form_Load()
Command1.Move 10, 10
End Sub

Private Sub Timer1_Timer()
Static PickBmp As Integer
'Main.Move Main.Left + 20, Main.Top - 5
'For a variantion, use the following line instead of the preceding one.
Main.Move (Main.Left + 20) Mod ScaleWidth, (Main.Top - 5 + ScaleHeight) Mod ScaleHeight
If PickBmp Then
Main.Picture = OpenWings.Picture 'Displays open butterfly picture.
Else
Main.Picture = CloseWings.Picture 'Displays closed butterfly picture.
End If
PickBmp = Not PickBmp

End Sub
 
As I reread your original post, I noticed that you wrote the frame is visible. If that's the problem. check the [BorderStyle property and set it to 0.

Image1.BorderStyle = 0 _________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
 
rvBasic:

All the BorderStyle for the 3 images are set to "0"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top