-
October 7th, 2012, 08:03 AM
#1
[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.
But where put my program button, picture and other things? I need this picture as my programs look.
Last edited by Halosar7; October 7th, 2012 at 08:15 AM.
-
October 7th, 2012, 12:10 PM
#2
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)
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
-
October 7th, 2012, 12:23 PM
#3
Re: How to create a Vb6 program without forms with picture?
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.
-
October 7th, 2012, 12:28 PM
#4
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
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
-
October 7th, 2012, 12:45 PM
#5
Re: How to create a Vb6 program without forms with picture?
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.
-
October 7th, 2012, 01:07 PM
#6
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
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
-
October 7th, 2012, 01:26 PM
#7
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.
Last edited by Halosar7; October 10th, 2012 at 05:44 PM.
-
October 7th, 2012, 01:00 PM
#8
Re: How to create a Vb6 program without forms with picture?
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|