Archive for the ‘VB.NET’ Category

How To Create a Windows Service using VB.NET

Introduction
Microsoft introduced long running background application called Services along with Windows NT Operating System. These services are multithreaded. Writing a windows NT Service using VB 6 was a tedious job. However, VB.NET masks the task much easy. In this article I will show you how to create a simple Windows Service using VB.NET
Overview of Services
Windows [...]

“My” Objects of VB.NET

Introduction
The VB.NET Version 2.0 as well as C# version 2.0 contains many new enhancements to the core language. One of the new cool feature added to VB.NET is “My” objects. My objects is a set of objects that are implicitly available to your application which provide short cut to many tasks otherwise [...]

How To Read and Write XML Documents in .NET

Introduction
XML provides platform independent, self-descriptive and very flexible way to represent your data. .NET has harnessed the capabilities of XML in variety of ways. In addition to providing W3C compatible classes .NET also provides additional classes which make XML document  manipulation easy. In this article we will take a look at reading and writing XML documents using .NET [...]

How TO Monitor File System Events

In some applications like file system explorers, file managers etc. it becomes necessary to keep an eye on file system changes. In traditional tools like VB6 this task usually required some third party component or Windows APIs. In .NET the FileSystemWatcher class from System.IO namespace provides easy way to do the same thing. A windows [...]

How To Use Monitor Class For Thread Synchronization

Introduction
While developing a multithreaded application  it is very important to maintain synchronization between multiple calls to the same method. Consider for example that you have a function that writes to a file. If at the same time multiple threads call this function it is bound to throw an exception as previous method call is yet [...]

How To Use ThreadPool Class

Introduction
You can use Thread class directly to create and run a new thread. Even though creating threads in this fashion is easy there is still easier way to do that. ThreadPool class allows you to simply place a function in a queue which is executed by the ThreadPool. ThreadPool internally maintains a pool of threads [...]

How to use Timer class

Introduction
If you have programmed in VB6 before then probably you are familiar with Timer control. The Timer control triggers a code after certain interval of time. This control is typically used on windows forms. Similar control does exists for Windows Forms as well. What if you need such timer functionality on a thread of your [...]

How To Create COM+ Aware Components in .NET

COM+ provides many ‘middle ware’ services like increased scalability, Transactions, object pooling, Just-In-Time activation to your components. Enterprise components typically developed in VC++ or VB are often hosted in COM+ to gain above advantages. As you might be aware that .NET components are different than traditional COM components in terms of reference counting, memory management [...]

VB.NET Multithreading

In past developing multithreaded appilactions in VB was tedious task. Many times spawning new threads actually spawn errors . The picture has changed in VB.NET. VB.NET now has simplicity of Java while dealing with threads. We will see a simple example of running your code in a separate thread in following section
Example of Creating Multithreaded [...]

How To Automate Data Export using DTS and ADO.NET

Most of the Organizations have requirement of maintaining all corporate data at one centralized place. Since the enterprise is having different kinds of system it is quite hard to achieve the centralization. From SQL Server 7.0 onwards, Microsoft provided the drag and drop facility for automation to DBA. The tool that SQL Server provides is [...]