|
|
Using "Date" intervals in VB.NET
|
Total Hit (2483) |
The versatile Date datatype in VB.NET provides a large amount of built in functionality to manipulate dates and times. The ability to add, subtract and compare date values is very useful in particular.
For example, suppose you are managing hundreds of clients in an insurance company. Since insu
....Read More |
Rating
|
|
|
Leverage the improved Shell function
|
Total Hit (2991) |
The version of the Shell function included in VB.NET expands on the original version and supports an additional argument that enables you to specify whether to wait until the shelled program terminates, with an optional timeout. This solves an old problem known to many Visual Basic developers withou
....Read More |
Rating
|
|
|
Any2Dec - Convert from any numeric base to decimal
|
Total Hit (2890) |
«Code LangId=2»' convert from any base to decimal
' BASE can be in the range 2-36
Function Any2Dec(ByVal otherBaseNumber As String, ByVal base As Integer) As Long
Dim digits As String
Dim digitValue As Long
' check base
If base < 2 Or base > 36 Then
Throw New Argum
....Read More |
Rating
|
|
|
|
|
Printing formatted text and other data with the WebBrowser control
|
Total Hit (2224) |
Printing con be quite difficult in VB.NET (or any other .NET language), especially if you not only have to print plain text, but also tables, images, bulleted lists, text with different fonts, styles, colors and any other type of formatted data. Here's a tip that can make your life much easier, in m
....Read More |
Rating
|
|
|
|
ConcatenateFiles - Concatenating multiple text files
|
Total Hit (2828) |
«Code LangId=2»
' Concatenate a variable number of text files into a single result file
'
' Params:
' - resultFile: the complete path of the result file you want to create
' - header: a string that is written when a file is added to the result file.
' Note: this string can contain the #Fi
....Read More |
Rating
|
|
|
Creating applications that target .NET Framework v. 1.0 and/or 1.1
|
Total Hit (2653) |
As explained in this article, the applications you create with one version of the framework, can target only that version or both, according to the settings you put in the appname.config file. (Where appname is the full name of your executable file including the extension, such as myapp.exe, so the
....Read More |
Rating
|
|
|
|
|
A For Each loop that iterates in reverse order
|
Total Hit (11611) |
The For Each loop always iterates orderly on all the elements of an array or a collection (more precisely, on all the elements of a class that implements the IEnumerable interface). What happens if you need to iterate in reverse order, though? If you have an array or an ArrayList you can always refe
....Read More |
Rating
|
|
|
Persist ADO.NET extended properties
|
Total Hit (3721) |
Many ADO.NET classes, including DataSet, DataTable, and DataColumn, use the ExtendedProperties property to enable users to add custom information. Think of the ExtendedProperties property as a kind of generic cargo variable similar to the Tag property of many ActiveX controls. You populate it with n
....Read More |
Rating
|
|
|
|
Clipping the mouse to a rectangle area
|
Total Hit (2098) |
The Clip property of the Cursor is the rectangle within which the mouse cursor is confined, or its value is Nothing if the mouse can move over the entire screen. This rectangle is in screen coordinates, so you must do some conversions if you want to confine the mouse to an object on the form:
«Co
....Read More |
Rating
|
|
|
|
Understanding and Working with Oracle Data Provider for .NET
|
Total Hit (1673) |
Oracle Data Provider for .NET (ODP.NET) is an implementation of a data provider for the Oracle database. ODP.NET uses Oracle native APIs to offer fast and reliable access to Oracle data and features from any .NET application.
|
Rating
|
|
|
How Do I...Write to a performance counter?
|
Total Hit (1027) |
Windows performance counters allow your applications and components to publish, capture, and analyze the performance data that applications, services, and drivers provide. You can use this information to determine system bottlenecks, and fine-tune system and application performance. For example, you
....Read More |
Rating
|
|
|
Navigating Multiple Related Tables in an ADO.NET Dataset
|
Total Hit (644) |
A dataset in ADO.NET is an in-memory representation of data that can contain multiple related data tables. This paper describes the methods of navigating these related data tables within a dataset. You will create a Windows® application in Visual Basic® .NET or Visual C#™ .NET that returns related r
....Read More |
Rating
|
|
|
|
Smart Socket
|
Total Hit (4963) |
A Smart Socket will allow you to send serializable objects via a socket without having to manually serialize or deserialize the data on either the client or the server. When working with low-level objects like TCP clients and listeners, much code needs to be written before you can start using the ob
....Read More |
Rating
|
|
|
Console Enhancements
|
Total Hit (2087) |
System.Console is a class provided by the framework to handle console I/O and redirection. The Win32 API also supports a set of console APIs. Win32 supports a single console for each application (process), even a Windows Forms Application. Consoles support a number of features such as buffering, ful
....Read More |
Rating
|
|
|
How Do I...Use Assembly Version Policy?
|
Total Hit (990) |
A primary goal of the deployment system in the .NET Framework is to eliminate conflicts between applications caused by shared components and shared states (or DLL conflicts). A key solution to this problem is a robust versioning system. The .NET Framework records information about an application's d
....Read More |
Rating
|
|
|
|
vbAccelerator IconComboBox Control
|
Total Hit (1541) |
One of the more notable omissions from the set of .NET Framework Windows controls is a Combo Box which supports icons, despite a control of this type being used to good effect in Explorer and IE. This article provides a reusable control which extends the standard ComboBox to allow you to associate i
....Read More |
Rating
|
|
|
Using System.Net.Mail
|
Total Hit (859) |
Sending an e-mail with classes of the .Net Framework is pretty easy. Michel Fournier wrote an article titled Sending email from VB.Net in the April 2006 edition of the Level Extreme .Net magazine providing you a good wrapper that does most operations you need when an application needs to send an e-m
....Read More |
Rating
|
|
|
|
Updating with the SQLDataAdapter...
|
Total Hit (904) |
Using the SQLDataAdapter's Update method is a very valuable and timesaving approach when synching a DataSet with a database. The SQLDataAdapter updates the SQL Server data source through the DataSet object, which tracks changes at the row level, through the RowState property. There are several metho
....Read More |
Rating
|
|
|
How Do I...Use XML Schema Collection?
|
Total Hit (607) |
This sample illustrates how to use the XmlSchemaCollection class used by the XmlValidatingReader for efficient data validation. The XmlSchemaCollection class allows you to maintain a cache of multiple XML Schema Definition language (XSD) and XML-Data Reduced (XDR) schemas which can then be used when
....Read More |
Rating
|
|