skippi90
01-20-2008, 11:41 AM
OK, I have a couple of things to ask.
1. How do you get characters entered into a textbox to appear only as *'s i.e. in a password field?
2. How do I create a menu bar that will:
Close the program
Display a particular form
Display a txt help file
Amateur VB user.
All help much appreciated. :D
mkaras
01-20-2008, 11:56 AM
For the text box there are two ways. 1) use a control that supports a password masking character property. 2) code similar behavior yourself by setting the .Text to a string of "**"s of the appropriate length. For convenience in the latter method you could store the password in the .Tag property of the text box.
For the menu bar you create an set of menu function methods on the Form code page that are invoked from the individual menu items. For close program the invoked method would respond by performing the form unload process. For the other two you would write code to respectively invoke the Show method for another form in your project and load a text file into say a multiline text box.
Sometimes I have dealt with the help file by having the help file prepared in HTML which I just load from am local file into a pop-up form that has a WebBrowser control on it. This allows for nicer help screens than can be created via simple text controls.
skippi90
01-20-2008, 12:04 PM
Thank you. Could you possibly show an example of code or steps I should take to do this?
I am very new to all this and need all the help I can get. Currently taking a HND Computing course and would like to get a distinction in my Programming project.
For #1, just set the PasswordChar property of your textbox to * (I assume that's what mkaras was referring to with his first suggestion).
To get started with your menu (not sure at what point you are having trouble), go to Tools > Menu Editor and set up your options there. Code for each option would be as mkaras suggests.