Form

drpsico Messages postés 208 Date d'inscription vendredi 7 mai 2004 Statut Membre Dernière intervention 15 août 2005 - 19 oct. 2004 à 21:38
econs Messages postés 4030 Date d'inscription mardi 13 mai 2003 Statut Membre Dernière intervention 23 décembre 2008 - 20 oct. 2004 à 09:21
salut
commen on fai a partir d'une form1 rendre visible ou pas un boutton sur une form2
merci


==psicofox6@hotmail.com==

6 réponses

cboulas Messages postés 2641 Date d'inscription mercredi 2 juin 2004 Statut Membre Dernière intervention 8 janvier 2014 16
19 oct. 2004 à 21:41
Sub form1_Click
   Load Form2
   Form2.CommandButton.enabled=True
End Sub


Chris...
Web : Firstruner - eMail : [mailto:support@firstruner.com Support]
0
Gobillot Messages postés 3140 Date d'inscription vendredi 14 mai 2004 Statut Membre Dernière intervention 11 mars 2019 34
19 oct. 2004 à 22:15
en supposant que Form1 et Form2 sont visibles

Private Sub Command1_Click()
Form2.Command1.Visible = Not Form2.Command1.Visible
End Sub
0
cboulas Messages postés 2641 Date d'inscription mercredi 2 juin 2004 Statut Membre Dernière intervention 8 janvier 2014 16
19 oct. 2004 à 22:27
En fait en utilisant Load on charge la form sans l'afficher on l'affiche ensuite avec Form2.show

Sub form1_Click
Load Form2   'Charge Form2 sans l'afficher
Form2.CommandButton.enabled=True   'modif de Enabled
form2.show   'Affichage de la form
End Sub


Chris...
Web : Firstruner - eMail : [mailto:support@firstruner.com Support]
0
econs Messages postés 4030 Date d'inscription mardi 13 mai 2003 Statut Membre Dernière intervention 23 décembre 2008 24
20 oct. 2004 à 09:17
Va falloir faire un mix des solutions proposées ci dessus :

Soit une Form1 avec un bouton nommé Command1
Soit une Form2 avec un bouton nommé Command2

Deux hypothèses :
1- Form2 est déjà visible
2- Form2 n'est pas encore visible

Hypothèse 1
Sub Command1_Click()
 Form2.Command2.Visible=True
End Sub


Hypothèse 2
Sub Command1_Click()
 Load Form2
 Form2.Command2.Visible=True 
 Form2.Show
End Sub



Dans les 2 cas, le code est à taper dans le module de Form1

Manu
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
econs Messages postés 4030 Date d'inscription mardi 13 mai 2003 Statut Membre Dernière intervention 23 décembre 2008 24
20 oct. 2004 à 09:19
ERRATUM :

Il fallait naturellement écrire :

Form2.Command2.Visible=False

et pas True
:)

Manu
0
econs Messages postés 4030 Date d'inscription mardi 13 mai 2003 Statut Membre Dernière intervention 23 décembre 2008 24
20 oct. 2004 à 09:21
ERRATUM bis :

Décidemment , va falloir que je retourne me coucher !!

Form2.Command2.Visible=False ou bien True,
celà dépend si tu veux rendre le bouton visible ou pas.

Voilà, je pense que maintenant, ma réponse est complète ! :)

Manu
0
Rejoignez-nous