Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Forms detect function ??
Message
From
11/01/1999 17:18:15
 
 
To
11/01/1999 16:09:00
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00174553
Message ID:
00174865
Views:
30
>>>>>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.


Thanks so much for your patient and teaching.. finaly I figure it out
in the FormLoad event.. the correct sintax..just one more question
Why the call Formcentr Me ,, why the me?? can it just be call like
FormCentr and that's it..

Mark Oliva
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform