3 Attachment(s)
[RESOLVED] How to create a Vb6 program without forms with picture?
Hi everyone, i need your help. I want create program look without form but main program key is picture.
First i remove Form and add module.
Attachment 30443
But where put my program button, picture and other things? I need this picture as my programs look.
Attachment 30445
Attachment 30447
Re: How to create a Vb6 program without forms with picture?
To put pictures & buttons you need a form but if you don't want to see the form then you could 'remove' the form's border using the properties windows and setting BorderStyle = 0 (None)
1 Attachment(s)
Re: How to create a Vb6 program without forms with picture?
Quote:
Originally Posted by
jggtz
To put pictures & buttons you need a form but if you don't want to see the form then you could 'remove' the form's border using the properties windows and setting BorderStyle = 0 (None)
Thanks you :-) in future i use this function and remember everything you say. I do what you say but see this. Border no more, but i can see other thing, i need only picture to see, not backround around picture area.
Attachment 30449
Re: How to create a Vb6 program without forms with picture?
You could resize the form to the same size of the picture using the Paint event of the form, as:
Code:
Private Sub Form_Paint()
Me.Width = Picture1.Width
Me.Height = Picture1.Height
End Sub
Picture1 is the name of the control, you can change to your real control's name
Or you could set the size at design time
1 Attachment(s)
Re: How to create a Vb6 program without forms with picture?
Quote:
Originally Posted by
jggtz
You could resize the form to the same size of the picture using the Paint event of the form, as:
Code:
Private Sub Form_Paint()
Me.Width = Picture1.Width
Me.Height = Picture1.Height
End Sub
Picture1 is the name of the control, you can change to your real control's name
Or you could set the size at design time
When i try to enter width and height numbers in design time, nothing hapend. Then i try paste that code and see what have we got.
Maybe i do a mistake somwhere.
Attachment 30451
Re: How to create a Vb6 program without forms with picture?
Re: How to create a Vb6 program without forms with picture?
Sorry!
You need to remove the .Picture propert of the form to none
and add this code to Paint event of the form
Code:
Picture1.Top = 0
Picture1.Left = 0
Then it will be
Code:
Private Sub Form_Paint()
Me.Width = Picture1.Width
Me.Height = Picture1.Height
Picture1.Top = 0
Picture1.Left = 0
End Sub
Again, Picture1 is the name of the control, you can change to your real control's name
3 Attachment(s)
Re: How to create a Vb6 program without forms with picture?
Now it works :-)
How make program look without white line around picture? When i start program i need to see blue siluet only and not white around.
Attachment 30489