Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modify
Message
De
27/04/2004 22:44:45
 
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Titre:
Re: Modify
Divers
Thread ID:
00898538
Message ID:
00898811
Vues:
9
'hi Friend!
'Using Tag and ToolTipText properties is a way to do it, but sometimes you
'use them to assign some values to the textbox itself, by instance if you want
'to tell the user what this textbox contains, you must use the toolTiptext property
'such as Text1.ToolTipText = "This TextBox is to set the Address of the Customer"

'I might recommend you to use variables,(variables are like magic pots man!, they rule!)
'and compare them when the form unloads, just as an another procedure friend!

'Start a project and place a TextBox Control in the Form1
'add the following code to the project, this is the magical part man! :0)
Option Explicit
'You can declare as many variables as you need, it will be up to you and your needs
Dim OldValue As String 'the variable containing Old Values of the textbox(s)

Private Sub Form_Activate()
OldValue = Text1 'assigning the text contained in textbox to our variable
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If StrComp(OldValue, Text1.Text) Then
'This is just for example purposes, you can put your own code here when data
'has changed in the TextBox, here I am callig a SaveData Procedure to save changes made in TextBox
SaveData
End If
End Sub

Sub SaveData()

If MsgBox("Data was modified. Do you want to Save this changes?", vbInformation + vbYesNo, "Example for MA") = vbNo Then
MsgBox "You choose not to Save the Data"
Else
'here you save the data with some code, or do whatever you estimate convinient friend!
MsgBox "Put some code here to Save Data"
End If
End Sub
tell me if this helped you anyhow, or what else is it that you need, I am at your order friend, hoorray for Visual Basic!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform