Video Tutorials! Learn VB.NET Now!

Eleqtriq

New member
Joined
Jan 23, 2010
Messages
4
Programming Experience
1-3
VB.NET Video Tutorials

by TeachMeComputer(Eleqtriq)

Do you want to learn Visual Basic .NET programming the easy way? I have created many Video Tutorials on a new Youtube channel and will be making hundreds more. I'll start from the bottom and cover everything that you need to know if you want to become an advanced Visual Basic .NET Programmer. Please Subscribe to the Youtube channel and rate the videos, that is all I ask.

Here is a contents of the video tutorials so far. Simply click the hyperlink to open the video. Also Click Here for the Youtube Channel itself.


#1. Introduction
#2. Hello World
#3. Variables
#4. If Statements
#5. Math Functions
#6. Form Properties
#7. The Progress Bar
#8. The Listbox
#9. The Radio Button + The CheckBox
#10. The Toolstrip
#11. Linking Forms
#12. Log In Form
#13. Text To Speech
#14. Splash Screen
#15. For Loop
#16. Do While
#17. Do Until
#18. Subs
#19. Functions
#20. Advanced MessageBox



So please subscribe to the channel and interact with all of the videos. I have around 150 planned tutorials already and I will be taking requests and adding more.
 
Very nice, but you really need to write code with Option Strict turned ON!

I ran the "Text To Speech" video and tried the code, but it didn't go past the first line with Option Strict On. So I declared SAPI As Object. Then I got an error at the SAPI.Speak line that late binding was not allowed with Option Strict On.

How can this code be modified to work correctly with Option Strict On?
What is the correct type for SAPI? I'm not sure it should be declared as Object.

This is the original code as you have it in the video:

VB.NET:
	Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
		Dim SAPI
		SAPI = CreateObject("SAPI.spvoice")
		SAPI.Speak(TextBox1.Text)
	End Sub


Note: I'm a teacher and would like to recommend your tutorials for my "Introduction to Programming" students to use, but I make sure they have Option Strict On from the very beginning.

I like the way you zoom in on the code in your videos, but I have a problem with the audio, which is not always very clear.
 
Last edited:
There is no correct type (other than Object) because SAPI is a dynamically created COM object. Such cases are exactly when and where late-binding is required, so Option Strict Off is appropriate in such cases. The most appropriate approach is to separate all the code that needs to use late-binding into its own code file(s), using partial classes if necessary, and then turn Option Strict Off for just those files.
 
Prior to .Net 3.0 you could use the "Microsoft Speech Object Library" (add reference, COM) and objects in interop SpeechLib namespace. From .Net 3.0 System.Speech namespaces were added for managed interaction with SAPI.
 
Back
Top