Library tutorials & articles
Visual Basic Tutorial
Conclusion
When you are happy with your project, you can compile it to an EXE file (which you can then run from explorer, or on another PC) by clicking File | Make ProjectName.exe...
Hopefully by now, your understanding of Visual Basic will have grown enormously. I realise that ideally, this tutorial could continue for another 100 pages, and hopefully I will get some time to extend it. Below are a few challenges to enhance your application. Hints for these tasks are at the bottom of the page.
- Display a message asking the user a question
- Disable the OK button when the user has not entered a name
- Provide a Cancel button
- Remove the Maximize and minimize buttons
- Display another form after the user has entered their name, and display their
name there.
- 'Remember' the name that the user entered.
Below are also a few suggestions for expanding your knowledge of VB!
i) take a look at some of the other Commands described at VB Web,
such as the MsgBox and InputBox
pages... see if you can ask the user a question using the information provided
there.
ii) you can then move on to some of the Conditional statements.... executing
code when a certain condition is true. Take a look at the If...Then...Else
statement and Select...Case, or even
the Number functions page.
iii) explore the other tutorials at VB Web and on other sites to expand your
knowledge
iv) use the Visual Basic help files! This is a massive resource, and also enourmously
under-used.
v) Finally, play around, and have fun! This is the best way to learn how to
program with VB. Write a few lines, run it, learn from your mistakes, and find
out how to enhance it. If you are not sure how to do something, after looking
at the VB help, join our discussion list, and send the email there. There are
hundreds of programmers on the list, all of whom are willing to answer your
questions. Before you know it, you will be answering others queries too.
Good luck with your programming career,
James Crowley
Hints for the tasks...
- Display a message asking the user a question
Hint: Look at the MsgBox function page
- Disable the OK button when the user has not entered a name
Hint: Look at the buttons Enabled property and the text boxes Change
event
- Provide a Cancel button
Hint: Use Unload Me in the Click event
- Remove the Maximize and minimize buttons
Hint: Look at the forms MaxButton property
- Display another form after the user has entered their name, and display their
name there.
Hint: Add another form to your project by clicking Project|Add Form. You can
display another form by calling formname.Show,
and hide one using formname.Hide
- 'Remember' the name that the user entered.
Hint: Use the registry!
Related articles
Related discussion
-
VB6 Runtime error 381 subsript out of range Error
by Uncle (2 replies)
-
passing and reading parameters from using Shell
by jigartoliya (0 replies)
-
Convert C++ code to VB6
by mawcot (4 replies)
-
listbox scrollbar
by Dennijr (10 replies)
-
Can you describe Above simple VB6 code?
by pramodmca09 (0 replies)
Related podcasts
-
Christian Beauclair
14 mai 2008 (�mission #0074) ::.Christian Beauclair: Stratégies de migration VB6 vers .NET Nous discutons avec Christian Beauclair des stratégies de migration VB6 vers .NET. Entre autres, nous discutons comment utiliser le "VB 6 Code Advisor" et le "Interop Forms Toolkit" pour ajouter la puiss...
what's "grammer" anyway? and who's needing it here?
I take IT course, n we'll gonna use VB for nxt semester.1st n 2nd semester we already have C n C++,so i hope any1 here can help me out..TQVM..
Hi,
I have been using Visual Basic for one year. Now, I want to switch to VB.net as it is the latest technology. I am totally confused how should I go about doing this. Could you tell me the name of a few books that are for new users. I dont even have any knowledge of ASP(I know a bit of HTML). Do I need to install IIS on my laptop to start web development ? If yes , where can I get it for free?
Thnaks a ton!
You may not be able to comile your code into an executable that would be portable, but your code can be copied into notepad files and kept for later use/reuse.
I am a student at a vocational school in Ohio. I made a program in VB.NET for students and I would like to know if there is any way I can make an .exe file of my program to take home with me. It isn't for reselling or anything. Just wondering, thanks.
Jimmy Jimmy 05
Hi...
Can anybody suggest me one reference book for VB.NET??
Thanx
Deepthi
how can i delete posted msgss here ???
Hello,
Can someone please help meee!
Thanks so much,
Lsan
Whether to learn VB or VB.NET depends on your reason for learning the language - at the moment, VB probably has more use in a commercial sense; VB.NET is still too new. But if you're looking to the future, then VB.NET/C# is where its at!
Hi i'm a beginner with programming & i'd like a piece of advice on whether to learn vb or visual basic .net and i would also like to know if knowledge of vb is a prerequisite to knowing visual studio.net
in adodc.recordsource
In where clause use [primary key
i like to learn vb
Many thanks to James Crowley, he has removed my fears of moving on from QB to VB.
Does anyone else know of a good source of VB tutorials.
Regards,
welcome to DF
thats what we are all here for... learning and working together
I just read your post about the VB for beginners and I want to thankl you about your help and love for learning VB,
thank you alot,really you gave me the motivation that was needed to start with it.
sorry for my english it's not perfect but you can understand me (i understand everything that you whrote)
ok and continue like that people need your help
thank u
by the way, do u know of any vb samples for developing a meeting room booking system?
i use the following code to delete records:
while not adodc1.recordset.eof
adodc1.recordset.delete adaffectcurrent
adodc1.recordset.movenext
loop
only after 4 deletion i have always this error:
"runtime error -2147467259(80004005);key coluymn information is insufficient or incorrect. too many rows were affected by update"
how can i solve this error and continue my deletion process?
MsgBox "Hello " & txtName.Text & "!"
end sub
That should work
I put MsgBox "Hello " & txtName.Text & "!" in between the () tags on the cmdOK_Click() command, it didint work but i couldnt see anywere els to put it im proberly making a compleat begginer mistake so i'll keep at it till i figure out what im doing wrong.
Im useing Visual Basic 5.0 CCE if anyone can figure out what im doing wrong =)
Thanks James, for a really helpful and very well written crash course. I've been wondering about having a go with VB, and you've convinced me!!
I have much more knowledge to add to my head, and it is because of this tutorial. Thank you once again. You have helped my greatly in my assignment.
Thanks for your great article. Before reading this I had no idea about VB, this has given me a head start, I will surely pass this info on to my friends who are interested in programming.
Thanks again
Great article for someone who knows no programming, with exception of HTML. Obviously, I'm new to the world of VB. I'll be sure to spread the word, should I come across anyone else new. Great site, also.
This thread is for discussions of Complete VB Beginners Tutorial.