Hi,
This is my first post here so I hope Im in the right forum.
Im pretty new to VB6 and have got a little stuck with my app(Just a pet project I have).
I have a MDI form
On the left of the MDI I have a picture box control im using as a container for my search records controls, when a search is made there is a list box that shows up the results and when the result is clicked on, a form opens in the MDI form with the data required.
The problem is the form that opens is too big for the screen and to view it all you need to use the forms scroll bars.
So in the left picture box control I added 2 buttons, One to Zoom the form In and the other to zoom out the form.
The code I have came up with is just not doing the job correctly it seems to move the form Up& Down at angles???
As I say guys Im very new to VB and I would be very appreciative if someone could assist me with this.
The code I have on my Zoom buttons are below:
Many thanks in advance
LM
Private Sub imgZoomIn_click()
On Error GoTo Error
If imgZoomOut.Enabled = False Then
imgZoomOut.Enabled = True
End If
Form34.Height = Form34.Height + 600
Form34.Width = Form34.Width + 600
Form34.Top = Form34.Top - 300
Form34.Left = Form34.Left - 300
Exit Sub
Error:
imgZoomIn.Enabled = False
End Sub
Private Sub imgZoomOut_click()
On Error GoTo Error
Form34.Height = Form34.Height - 600
Form34.Width = Form34.Width - 600
Form34.Top = Form34.Top + 300
Form34.Left = Form34.Left + 300
Exit Sub
Error:
imgZoomOut.Enabled = False
End Sub
This is my first post here so I hope Im in the right forum.
Im pretty new to VB6 and have got a little stuck with my app(Just a pet project I have).
I have a MDI form
On the left of the MDI I have a picture box control im using as a container for my search records controls, when a search is made there is a list box that shows up the results and when the result is clicked on, a form opens in the MDI form with the data required.
The problem is the form that opens is too big for the screen and to view it all you need to use the forms scroll bars.
So in the left picture box control I added 2 buttons, One to Zoom the form In and the other to zoom out the form.
The code I have came up with is just not doing the job correctly it seems to move the form Up& Down at angles???
As I say guys Im very new to VB and I would be very appreciative if someone could assist me with this.
The code I have on my Zoom buttons are below:
Many thanks in advance
LM
Private Sub imgZoomIn_click()
On Error GoTo Error
If imgZoomOut.Enabled = False Then
imgZoomOut.Enabled = True
End If
Form34.Height = Form34.Height + 600
Form34.Width = Form34.Width + 600
Form34.Top = Form34.Top - 300
Form34.Left = Form34.Left - 300
Exit Sub
Error:
imgZoomIn.Enabled = False
End Sub
Private Sub imgZoomOut_click()
On Error GoTo Error
Form34.Height = Form34.Height - 600
Form34.Width = Form34.Width - 600
Form34.Top = Form34.Top + 300
Form34.Left = Form34.Left + 300
Exit Sub
Error:
imgZoomOut.Enabled = False
End Sub