Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Forms detect function ??
Message
De
11/01/1999 16:09:00
 
 
À
11/01/1999 14:50:56
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00174553
Message ID:
00174828
Vues:
34
>>>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform