Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Forms detect function ??
Message
From
11/01/1999 16:09:00
 
 
To
11/01/1999 14:50:56
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00174553
Message ID:
00174828
Views:
33
>>>>Sub FormCentr(Frm as Form) 'Frm is an object variable, passed by refernce
>>>> With Frm
>>>> .Top = X
>>>> .Left = Y
>>>> End With
>>>>End Sub
>>>>
>>Hi,
>>try to declare the procedure like this:
>>Sub FormCentr(Frm as object)
>>I hope it works.
>>Vlad
>
>thank for your time and patients with me,, I change the declaration in the
>sub to object now It reads the following:
>
>Sub FormCentr(Frm As Object) 'Frm is an object variable, passed by refernce
> Dim x As Integer, y As Integer
> With Frm
> .Top = (Screen.Height - .Height) / 2
> .Left = (Screen.Width - .Width) / 2
> End With
> End Sub
>
>
>Now It does not give me the Data type error but when It gets to the .TOP
>operation to calculate the top distance to start doing the centering process
>then It comes back with the following error
>Object does not support Prop or event..
>
>what do you thing I am doing wrong here??
>
>mark oliva

Sub FormCentr(Frm As Object) 'Frm is an object variable, passed by refernce
Dim x As Integer, y As Integer
With Frm
.Top = (Screen.Height - .Height) / 2
.Left = (Screen.Width - .Width) / 2
End With
End Sub

and in the form's load event call formCentr Me.
it worked.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform