New VB.NET Quiz! Put your .NET knowledge to the test!

August 31, 2009

This VB.NET quiz allows you to test Visual Basic .NET skills.
Test level: advanced.
.NET Framework 2.0, Visual Studio 2008.
The quiz contains 20 questions.
The test isn’t that easy. However, you may use reference materials and Visual Studio 2008, if needed.
Enjoy!

Read the full article →

Freeware uninstaller released.

August 18, 2009

I’ve tried many different uninstall tools and was completely disappointed with many of them due to their low performance. Therefore, I decided to write my own uninstaller in .NET and succeeded. It is freeware currently and I plan to release it as open-source project in the near future.
Grab first version of the tool and [...]

Read the full article →

How to send e-mail in .NET (C# and VB)

August 8, 2009

.NET Framework doesn’t have any built-in functionality to receive the e-mail, but it’s quite easy to send e-mails via SMTP protocol.
VB.NET and C# versions of the code
First, import appropriate namespaces.

View Code VBNETImports System.Net.Mail
Imports System.Net

View Code CSHARPusing System.Net.Mail;
using System.Net;

Then, you have to create an instance of SmtpClient class.

View Code VBNETDim client As New SmtpClient

View Code CSHARPSmtpClient [...]

Read the full article →

How to deploy .NET Webservice. Step by step tutorial #2

August 4, 2009

First part here: http://johnwilliams.eu/2009/05/how-to-deploy-net-webservice-step-by-step-tutorial/
Step 3:
Open IIS (Start > Administrative Tools > Internet Information Services). If it’s not there, you need to install it via “Control Panel > Add or Remove Programs > Add/Remove Windows Components”. Additionally, you may need to enable “Administrative Tools” in the start menu (right-click start menu, properties, customize, “advanced” tab, scroll [...]

Read the full article →

How to publish asp.net web application and protect its source code

August 4, 2009

Sometimes you need to deploy your web application whilst protecting your source code. In that case, you can compile the code into a single .dll file. Please note that only code files (such as .vb and .cs) can be compiled, not the markup files (aspx, ascx, etc).
In order to get it to work, you need [...]

Read the full article →

Windows Forms “PNG doesn’t show up” issue fix

August 4, 2009

If you’re working on Windows Forms application, sometimes you can encounter a weird problem - PNG images will stop displaying when assigned as “Image” property value to your PictureBox (perhaps some other controls, too). Everything you’ll see is just an empty container. Even if you rebuild the project, the issue persists.
Here’s the solution:
Navigate to directory [...]

Read the full article →

How to shutdown, reboot or logoff the computer using VB.NET or C#

May 3, 2009

Sometimes it’s necessary to shutdown the computer, for example when you’re writing scheduler tool, or reboot it, e.g. when you modify system settings.
It’s not that difficult, but you should know a number of things before you can proceed. The following example contains fully functional VB.NET and C# code.
We’ll use ExitWindowsEx Windows API function.
Before that, we [...]

Read the full article →

How to download strings, pages, images and data in .NET: Chapter I

May 3, 2009

.NET Framework doesn’t have any built-in functionality to receive the e-mail, but it’s quite easy to send e-mails via SMTP protocol. I’m going to show how to send simple e-mail, one with attachments and how to do it asynchronously.
VB.NET version of the code:
First, import appropriate namespaces.

View Code VBNETImports System.Net.Mail
Imports System.Net

Then, you have to create an [...]

Read the full article →