Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need Maint Form to catch a state change
Message
From
28/06/2006 14:36:57
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01131923
Message ID:
01132527
Views:
12
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
Previous
Reply
Map
View

Click here to load this message in the networking platform