LeeSalter
Freshman
I have two forms.
I have this code at the top of the first form (ControlPanel).
A button on ControlPanel has the following code attached:
LANUser is a class that has some methods that call the NetUserGetInfo API.
After the button on ControlPanel is pressed and the code is fired, the UserManager form is displayed with details from the LANUser class.
This works perfectly for seven or eight passes.
However, eventually, an error occurs just before displaying the input box that say "Error Creating Window Handle".
Has anybody come across this problem before??
I have this code at the top of the first form (ControlPanel).
Visual Basic:
Public frmUserManager As UserManager
Public myUser As LANUser
A button on ControlPanel has the following code attached:
Visual Basic:
Private Sub btnAdministerUser_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdministerUser.Click
Dim UserID As String
Dim setTop As Short = CShort(MyBase.Top) + CShort(MyBase.Height)
Dim setLeft As Short = CShort(MyBase.Left)
Try
If frmUserManager.Visible = True Then
'frmManagerWindow already exists.
End If
Catch ex As Exception
frmUserManager = New UserManager(setTop, setLeft)
Me.myUser = New LANUser()
End Try
UserID = InputBox("Please enter User ID", "Enter User ID")
If Me.myUser.GetUserDetails(UserID, frmUserManager) = True Then
frmUserManager.Show()
End If
End Sub
LANUser is a class that has some methods that call the NetUserGetInfo API.
After the button on ControlPanel is pressed and the code is fired, the UserManager form is displayed with details from the LANUser class.
This works perfectly for seven or eight passes.
However, eventually, an error occurs just before displaying the input box that say "Error Creating Window Handle".
Has anybody come across this problem before??