Categories

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

How To Use the OpenFileDialog Box in VB.NET

Using the OpenFileDialog box wasn’t as intuitive as I initially expected, I was thinking I could just drag it out onto my form as a button and place it right where I wanted to. But when I clicked on it from toolbox it just went into the bottom frame of my application, but not on my form like I was hoping for. Below I is an example of a dynamically (aka created at run) created OpenFileDialog. Because it’s dynamically created when don’t have to drag it out to form, it’s created by the code, not from the GUI. […]

How to Use the Progress Bar in VB.NET and C#

The progress bar is one of those universal objects that everyone recognizes, it’s useful when doing a large or long task. For example, if your updating/deleting/copying a bunch of files you can update the progress bar as you modify each file. […]

How to Center A Form in VB.NET and C#

I’ve often found it necessary to center a form on my screen using the pure code, but it’s not as easy as Me.center in VB or this.center() in C# so I wrote some code to work around that. Using the code below you can center you application on your monitor in just 3 lines of code using either VB.NET or C#. […]

How to Cut/Copy/Paste into the Clipboard using VB.NET

In this example, I’ll show you how to cut, copy, paste and clear text in the clipboard. Cutting and copying text is really straight forward, pasting text requires just a little bit of checking. For example, we want to check to see what the clipboard contains before we try and do something like pasting an image into a text box. […]

Make Your Computer Talk with VB.NET Application (and Source Code)

I was playing around with COM objects in Windows and discovered that I could access the SAPI.SpVoice interface and make Microsoft Windows talk to me. Well needless to say I had to rush and develop and application to do just that. I uploaded a simple applicaton which will just say whatever you type in as an argument. For example SpeakToMeConsole.exe Hello World will make your computer speak the words “Hello World.” The part that really amazes me is that the guts of this program is only 2 lines long, and it can even that can reduced down to 1 line if we create an anonymous instance of SAPI.SpVoice object. […]

How to Shutdown, Restart, Log off your computer with VB.NET or C#

This is extremely easy using VB.NET or C# (pronounced C sharp) and using the built in windows EXE file shutdown.exe. To shutdown, restart, or log off your computer is as simple as entering 1 line into your program, it just so happens that the 1 line is identical whether you’re using VB.NET or C#. […]

How to Create Message Box Pop Ups in VB.NET

Creating different types of messages boxes in Visual Basic is a simple one line statement. I’m going to run through how to create several different types of message boxes in this tutorial, including OK Only, OK/Cancel, Abort/Retry/Ignore, and a Critical message box. […]

Check If File Exists with VB.NET

I was creating an application in Visual Basic the other day and I couldn’t remember how to check to see if a file exists, so I thought I would do a quick example to see if a file exitsts. If the file exists, the program will continue on, however, if the file doesn’t exist you will get a message box saying that the file does not exist, and the application will exit. […]