Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need Maint Form to catch a state change
Message
De
28/06/2006 14:36:57
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Divers
Thread ID:
01131923
Message ID:
01132527
Vues:
13
OK, the problem was multifold, but it comes down to where the code is put which is explained not too well for us old and object disoriented ignorants (which, by the way, drives me nuts) <g>.

Here's my code that gets an encrypted code from the table when navigated.

Public Class UsersForm
Inherits mmMaintenanceForm

'Set up to store reference to business object
Private oPurUser As Pur_user

Public Sub New()

'Other setup stuff

' This call is required by the Windows Form Designer.
InitializeComponent()

'Other setup stuff

'Add a state change handler
AddHandler oPurUser.StateChange, AddressOf Me.MyStateChangeHandler

End Sub

'The handler for the state change
Public Overridable Sub MyStateChangeHandler(ByVal bizObj As
mmBaseBusinessObject, ByVal e As mmBusinessStateChangeEventArgs)
Dim lnState As Integer
Dim lcCode As String
lnState = oPurUser.State
If lnState = 8 Then 'Navigated
lcCode = Me.txtIDCode.Text
Me.txtIDCode2.Text = DecodePW(lcCode)
End If
End Sub

This code didn't give me any errors.
Maybe this will help others who might want to do something similar.

CU
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform