I am a teacher (this explains my lack of expertise at understanding many VB technicalitiesin manuals etc.) experimenting with creating bits and pieces of software for children with learning disabilities and would like to know if there is an easy (novice easy!) way of doing this ….
- I want to type a letter on the keyboard, and I want VB to automatically create a button with that letter (label) on it on-screen.
- I want to type a letter on the keyboard, and I want VB to automatically create a similar button, but with pre-defined properties (perhaps already defined and ina dBase linked to VB).
Here are the basic steps for this:
- Create a button on the screen, label it something like cbLetter or whatever.
- Set the index property of it to the number zero.
- Set the visible property to false.
- In the KeyPress event for the TextBox or wherever you are entering keys, to create a new button, you do: Set cbLetter(1) = New CommandButton That will create a new button at index #1. You then need to set the top, left, height and width properties, as well as the caption. There’s not really a good way to use a template or anything like that. You basically have to set the properties equal to those on another button, such as the invisible one. It’s not a particularly easy thing to do…it becomes a pain to manage.