FIX: Form Move Event Can Generate Error MessageID: 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 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 kbWinCE kbWinCE100 kbGrpVB
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: February 25, 1999