|
Showing help
|
Total Hit (2681) |
The System.Windows.Forms.Help class encapsulates the HTML Help 1.0 engine and lets you display the index, the search page, or a specific topic in an HTML file in HTML Help format or a compiled help file (.chm) authored with the HTML Help Workshop or some third party tool.
This class exposes two
....Read More |
Rating
|
|
|
Language features - DateTime and TimeSpan Objects
|
Total Hit (3355) |
In this article we will explore some key language features which are frequently used by VB programmers.
«big»DateTimes in VB.net«/big»
VB.net provides many new features for DateTime datatype. Unlike VB6 in VB.net you can initialize DateTime variable with verity of initial values. In VB.net you
....Read More |
Rating
|
|
|
Sending Mail in VB.NET using Sockets
|
Total Hit (3533) |
This class provides all the functionality. This class was implemented without error handing on purpose to make it easier to understand the program flow.
|
Rating
|
|
|
How to clear all controls of a winform or user control?
|
Total Hit (4233) |
Here is the small code snippet to clear most of all controls on your form. This code also take care of containers like group box, panel ... etc.
«code LangId=2»
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ClearControls(Me.Contr
....Read More |
Rating
|
|
|
A generic benchmark routine
|
Total Hit (3378) |
You often need to benchmark a piece of code, which you usually do as follows:
«Code LangId=2»
Dim start As Date = Now
' insert here the code to benchmark
Dim elapsed As TimeSpan = Now.Subtract(start)
Console.WriteLine("Total time: {0} secs.", elapsed)
«/Code»
Thanks to delegates, you can w
....Read More |
Rating
|
|
|
Parsing and validating string dates
|
Total Hit (2757) |
If you have a string variable that should specify a date (asked in input to the user, for example), you can parse the string and get a Date variable by using the Date.Parse method. If the input string is not in a valid format, this method throws an exception though. Follows a routine that parses a s
....Read More |
Rating
|
|
|
CountOccurrences - Counting the number of string occurrences
|
Total Hit (2853) |
«Code LangId=2»
' Count the number of string occurrences
Public Function CountOccurrences(ByVal source As String, ByVal search As String, _
Optional ByVal ignoreCase As Boolean = False) As Integer
Dim options As System.Text.RegularExpressions.RegexOptions
' set the search options a
....Read More |
Rating
|
|
|
|
Adding external commands to VS.NET's Tools menu
|
Total Hit (2699) |
The VS.NET's Tools menu can be customized with your own commands, to launch external programs. For example, you may want to have a command that opens the current project's folder in a Windows Explorer window, to easily manage the project's files. To add such a new command, click Tools | External Too
....Read More |
Rating
|
|
|
|
|
Write applications that take arguments
|
Total Hit (3869) |
C# has a nice feature that VB.NET lacks: the ability to define a Main procedure that takes an array of strings, each one containig one of the arguments passed on the command line. It's easy to mimick this feature in VB, though.
In fact, while the Command function is still supported in VB.NET, you
....Read More |
Rating
|
|
|
Resolve an internet host address
|
Total Hit (2764) |
The System.Net.Dns class exposes a few static methods that let you resolve an internet domain name - such as www.vb2themax.com - into a 4-part numeric IP address, also known as dotted-quad notation.
The Resolve static method takes a string and returns an IPHostEntry object; you can learn the actu
....Read More |
Rating
|
|
|
|
Map an enumerated value to a set of OptionButton controls
|
Total Hit (2575) |
In VB6 and previous version, displaying an enumerated value in a group of option buttons is quite simple, provided that the option buttons be grouped in a control array. VB.NET doesn't support control arrays, so you can't reuse the same simple coding techniques. However, you can prepare a couple of
....Read More |
Rating
|
|
|
Trimming strings
|
Total Hit (3064) |
Visual Basic .NET strings expose three trim methods: TrimStart, TrimEnd, and Trim - which trim one or more characters from the beginning, the end, or both the beginning and end of the string. They therefore work like VB6's LTrim, RTrim, and Trim functions, with an important difference: you can decid
....Read More |
Rating
|
|
|
|
ADO.NET Overview
|
Total Hit (587) |
ADO.NET is an evolution of the ADO data access model that directly addresses user requirements for developing scalable applications. It was designed specifically for the web with scalability, statelessness, and XML in mind.
ADO.NET uses some ADO objects, such as the Connection and Command object
....Read More |
Rating
|
|
|
|
.NET Remoting - Part I
|
Total Hit (1214) |
Remoting provides a flexible architecture for distributed applications in .NET. This series of articles shall examine the topic of remoting.
|
Rating
|
|
|
An Introduction to Regular Expressions and Their Use in .NET I...
|
Total Hit (2549) |
Regular expressions pop up in several locations in .NET and its supporting technologies. A prime example would be in the RegularExpression server validation control but the power of regular expressions are also utilised elsewhere, for example within XSD schemas with the pattern facet. This gives a g
....Read More |
Rating
|
|
|
|
How Do I...use the Xml Schema Object Model?
|
Total Hit (559) |
This sample illustrates how to read two XML Schema Definition language (XSD) schemas into a SchemaCollection, navigate through the schemas that they represent, and create a fictious XML output that is representative of the schema's.
This sample shows how to use the XmlSchemaCollection to cache a
....Read More |
Rating
|
|
|
A class to put a ProgressBar into a StatusBar
|
Total Hit (2064) |
It is not possible to directly put a ProgressBar in a StatusBar in VB.NET. Solutions are available for C++ or VB 5 or 6.0. This is a way to do it in VB.NET.
|
Rating
|
|
|
Subclassing in .NET - The pure .NET way
|
Total Hit (2202) |
If you are a Visual Basic 6 programmer then you are obviously aware of the sub-classing power. My article demonstrates the same thing for .NET. If you are a C# programmer, then you can easily change this code to fit into a C# Project. This project demonstrates how can you use the .NET way to subclas
....Read More |
Rating
|
|
|
Automatically Upgrade Your .NET Applications On-the-Fly
|
Total Hit (1204) |
Rich client, (or in .NET terminology, "Windows Forms") applications provide a great user experience in terms of functionality, usability, operating system and inter-application integration. Unfortunately, they have also suffered from a relatively high total cost of ownership compared to browser-base
....Read More |
Rating
|
|
|
ADO.NET: Loading a native ADO recordset into a DataSet
|
Total Hit (1353) |
This sample illustrates using ADO recordsets with managed Datasets. To provide access to ADO Recordset and Record objects from ADO.NET, the OLE DB .NET Data Provider overloads the Fill method of the OleDbDataAdapter to accept an ADO Recordset object or an ADO Record object. Filling a DataSet with th
....Read More |
Rating
|
|
|
Property Bag Changes in Visual Basic .NET
|
Total Hit (1078) |
In Visual Basic® 6.0, the PropertyBag object was used to persist an object's data between instances. This paper demonstrates how to duplicate the functionality of a Visual Basic 6.0 property bag in Visual Basic .NET using serialization.
|
Rating
|
|
|
Enumerating Windows
|
Total Hit (1894) |
This sample provides a class wrapper around the EnumWindows and EnumChildWindows API calls for use in .NET.
|
Rating
|
|
|
How Do I...Use an XmlNodeReader?
|
Total Hit (996) |
This sample illustrates how to create and use an XmlNodeReader. An XmlNodeReader is a reader that provides fast, non-cached, forward-only access to XML data in an XmlNode. It has the ability to read an entire XML DOM tree or read from just a subtree. However, the XmlNodeReader does not support Docum
....Read More |
Rating
|
|