Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Forms detect function ??
Message
De
11/01/1999 14:16:16
 
 
À
11/01/1999 11:29:41
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00174553
Message ID:
00174746
Vues:
26
>>I think that your problem comes from the fact you pass the form's name to the sub instead of a reference to the object. Simply write :
>>
>>Sub FormCentr(Frm as Form) 'Frm is an object variable, passed by refernce
>> With Frm
>>   .Top = X
>>   .Left = Y
>> End With
>>End Sub
>>
>>
>>And call FormCentr Me 'Or any other form instance
>>
>>Hope it helps
>
>Okk thanks for your help with this issue, now I have tried this code in my forms
>and in the Load.event in one of them I code the call
>
>FormCentr (Form1)
>
>but then it comes back with a Type mismatch error. What Am I doing wrong??
>
>mark oliva
>
>@-- Of course the sub routine has been already define in the Module General
>@-- section


Hi,
try to declare the procedure like this:
Sub FormCentr(Frm as object)
I hope it works.
Vlad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform