Resolution

jkeene
11-13-2004, 09:10 PM
VB6
Is there a way to get the form to fit to screen.

webbone
11-13-2004, 09:32 PM
VB6
Is there a way to get the form to fit to screen.
Can you explain what you are wanting to do? You can automatically maximize a form with the following:

Private Sub Form_Activate()
Form1.WindowState = vbMaximized
End Sub

This will not, however, scale or reposition any controls.

If you can post back with more on what you are trying to accomplish we can better help you with your problem.

jkeene
11-13-2004, 09:38 PM
Can you explain what you are wanting to do? You can automatically maximize a form with the following:

Private Sub Form_Activate()
Form1.WindowState = vbMaximized
End Sub

This will not, however, scale or reposition any controls.

If you can post back with more on what you are trying to accomplish we can better help you with your problem.

Thanks for the reply I was not aware of that method.
Is there a way to get it to scale or reposition?
If there is can you point me in the right direction or give me a small example to mess around with?

Another thing I think you've answered me before on some questions do you know how to enable the right mouse click. The only methods I see available in VB6 are mousedown over and up.

Thanks for all your help.

webbone
11-13-2004, 09:46 PM
You probably want to check out this on MSDN: Resizing Controls Dynamically (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconresizingcontrolsdynamically.asp)

There are also many posts on this if you do a forum search.

For your other question, what do you mean by 'enable right mouse click'? You can determine which mouse button is being pressed with the MouseDown and MouseUp events - as you can see from the function header you get a Button value as well as Shift value from which you can determine various combinations (such as Ctrl-Shift-RightMouse):

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)


Check out the MouseDown event in the VB Help or online at MSDN for all the details.

You might also be asking about a pop-up menu. That is achieved using the PopUpMenu method. See MSDN: http://msdn.microsoft.com/library/en-us/vb98/html/vbmthPopUpMenu.asp

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum