FIX: Form Move Event Can Generate Error Message |
Q180767
When the Move method of a form or control is used without all of the parameters, one of the following error messages is generated:
-or-An error was encountered while running this program.
Wrong number of arguments or invalid property assignment.
The workaround is to use all of the parameters of the Move method.
Microsoft has confirmed this to be a problem in the Microsoft products that are listed
at the beginning of this article.
This problem was corrected in Windows CE Toolkit for Visual Basic 6.0.
Private Sub Form_Load()
On Error Resume Next
Form1.Width = 200 * Screen.TwipsPerPixelX
Form1.Height = 100 * Screen.TwipsPerPixelY
'Center Form on screen
Form1.Move (Screen.Width - Form1.Width) \ 2, _
(Screen.Height - Form1.Height) \ 2
'Display error information
If Err.Number <> 0 Then
MsgBox "Error: " & Err.Number & " - " & _
Err.Description, vbInformation, "Error Message"
End If
End Sub Additional query words: vbce5 vbce6 vbce
Keywords : kbToolkit kbVBp kbVBp500bug kbVBp600fix kbOSWinCEsearch kbOSWinCE100 kbGrpDSVB
Issue type : kbbug
Technology : kbVBSearch kbAudDeveloper kbWinCETKVBSearch kbWinCESearch kbWinCETK100VB500
|
Last Reviewed: February 28, 1999 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |