AdvancedHMI Software
General Category => Additional Components => Topic started by: Archie on July 11, 2016, 11:21:54 AM
-
- Download the attached file
- In Visual Studio Solution Explorer, under the AdvancedHMIControls project, right click the PurchasedControls folder
- Select Add->Existing
- Browse to the downloaded file
Example of use:
Dim kpd As New AdvancedHMIControls.AlphaKeyBoard2
kpd.PassWordCharacters = True
kpd.ShowDialog()
-
I had to add "Imports MfgControl.AdvancedHMI.Controls" to get it to compile is that correct
-
I like your on screen keyboard, although I am not sure why you added the Public Event ButtonClick. I added upper/lower characters and special characters so that I could use it for passwords.
-
The ButtonClick event is used by the parent to know when to take action for things like clicking Quit or Enter. For example:
If e.Key = "Quit" Then
End If
-
Hi Archie, I'm trying to make use of the keypad to enter an IP address into a text box. I followed the instructions above and added this .vb to my purchased controls folder. I am using 3.99a but get the attached errors. Thanks
-
added more screenshots, thx
-
Do you have the following line above the code were belongs the error ?
Imports MfgControl.AdvancedHMI.Controls
Should solve the problem.
-
Yes I did add this code, however I put it in the main form code since that is where I was writing the kpd code. I now have moved it to the AlphaKeyPad2.vb and it works great! Thanks for the help.
-
Here is a modified version of the AlphaKeyboard2 and also its button control.
It has half-sized keys for special characters, allows to be moved on the screen and has round corners if one of the background picture files is selected. It also has a password feature and multiple PLCAddressKeypad entries are supported. At Runtime, the control will default to the first address entered and right-clicking the button will pop-up a menu with available addresses to choose from.
Background files are in the next post and need to be added to the AdvancedHMIControls project Resources as existing images. If you don't want backgrounds then comment out all the "If" statements within the AlphaKeyboardBackground property.
The attached picture shows what the keyboard looks like.
It does have one small bug, which is when the text is highlighted it will be transparent.
-
The attached file has backgrounds for the modified AlphaKeyboard in the previous post.
Extract the files, right-click the AdvancedHMIControls project, select Properties and in the Properties window select Resources, switch to Images, click Add Resource drop down and select Add Existing File. Browse to location where you extracted the files and select them all at once.
Rebuild the project (if necessary close the project, re-open it and then rebuild it).
-
I like your on screen keyboard, although I am not sure why you added the Public Event ButtonClick. I added upper/lower characters and special characters so that I could use it for passwords.
I can't exactly remember, but I think this is the alphakeyboard I downloaded and am using. FYI, there is a bug in the backspace event, where it will allow a backspace with nothing there, this causes a crash:
I changed to this:
Private Sub BackSpaceButton_Click(sender As System.Object, e As System.EventArgs) Handles BackSpaceButton.Click
Dim CurrentCursorPos As Integer = TextBox1.SelectionStart
If CurrentCursorPos > 0 Then
TextBox1.Text = TextBox1.Text.Substring(0, TextBox1.SelectionStart - 1) & TextBox1.Text.Substring(TextBox1.SelectionStart)
TextBox1.SelectionStart = CurrentCursorPos - 1
TextBox1.Focus()
End If
End Sub