victoryhighway2
Programmer
Hello,
I'm writing an application where I would like to open a custom form get a string value back and then close the form (sort of like the intrinsic inputbox). However, the reason that I would like to do this instead of using the inputbox is because I want to restrict both the characters that can be entered as well as the number of characters that can be entered. Here's what I've done so far:
In my main code, I've entered the following:
In my frmPassword, I have the following code written for the password property:
However, this isn't doing what I want. When the Get code is run, it runs the Form_Load code for frmPassword, but it doesn't wait to actually display the form. Instead, it automatically goes to the following line:
Obviously, I'm doing something wrong. Does anyone have experience doing this in VB 2005?
Thanks in advance for your help.
Regards,
Geoffrey
I'm writing an application where I would like to open a custom form get a string value back and then close the form (sort of like the intrinsic inputbox). However, the reason that I would like to do this instead of using the inputbox is because I want to restrict both the characters that can be entered as well as the number of characters that can be entered. Here's what I've done so far:
In my main code, I've entered the following:
Code:
Dim GetPassword As New frmPassword
Dim password As String
password = GetPassword.Password
In my frmPassword, I have the following code written for the password property:
Code:
Public Property Password() As String
Get
Me.Show()
Return m_Password
End Get
Set(ByVal value As String)
m_Password = value
End Set
End Property
However, this isn't doing what I want. When the Get code is run, it runs the Form_Load code for frmPassword, but it doesn't wait to actually display the form. Instead, it automatically goes to the following line:
Code:
Return m_Password
Thanks in advance for your help.
Regards,
Geoffrey