cs_darkbol
Messages postés61Date d'inscriptionlundi 7 juin 2004StatutMembreDernière intervention 6 décembre 2004
-
16 juin 2004 à 12:56
cs_PhilippeE
Messages postés437Date d'inscriptionmercredi 18 décembre 2002StatutMembreDernière intervention10 août 2010
-
16 juin 2004 à 13:44
oui merci
Donc je reprends mon probleme de mise à zéro de mes cases textbox... par un clic sur le bouton RESET.
voici la portion de code concernée :
Option Explicit
Public Xmin As Double
Public Ymin As Double
Public Xmax As Double
Public Ymax As Double
MapFrame As Object
Private Const SWP_NOMOVE = 2
Private Const SWP_NOSIZE = 1
Private Const HWND_TOPMOST = -1
Private Declare Function SetWindowPos Lib "USER32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Sub btnCreate_Click()
If btnCreate.Value = True Then
CreateFrame.Enabled = True
ImportFrame.Enabled = False
End If
End Sub
Private Sub btnReset_Click()
XminVal.Text = ""
YminVal.Text = ""
XmaxVal.Text = ""
YmaxVal.Text = ""
End Sub
Public Sub Form_Load()
Dim XminVal As Object, YminVal As Object, XmaxVal As Object, YmaxVal As Object
ImportFrame.Enabled = False
CreateFrame.Enabled = True
Xmin = 0
Xmax = 0
Ymax = 0
Ymin = 0
SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
End Sub
Private Sub XminVal_Change(Index As Integer)
Xmin = Val(XminVal(Index).Text)
End Sub
J'ai aussi essayé avec vbnullstring mais aucun effet, peut être (c même sur...) que je sais po l'utiliser.
Si tu ne maîtrise pas cette notion, l'idéal serait de supprimer ton groupe de contrôle (en supprimant la valeur de Index), ce qui ne sera possible que si tu n'as pas 2 zones de texte avec le même nom.
Une fois fait, tu pourras reprendre ton ancien code qui devrait marcher.