|
Load a DataGrid Contol with XML Data using ADO.NET
|
Total Hit (1401) |
You will need to create a new Form, and then add three controls to it. A Button called btnImportXML, a DataGrid called DataGrid and a TextBox called txtPath.
Run the project and type the complete path to your XML document in the Textbox then click the Button. The DataGrid will be loaded with you
....Read More |
Rating
|
|
|
|
|
|
Store bits and small integers efficiently in a BitVector32
|
Total Hit (3285) |
The System.Collections.Specialized.BitVector32 structure can be used to store up to 32 boolean values, or a set of small integers that can take up to 32 consecutive bits. The BitVector32 is similar to the BitArray class, in that it can hold boolean values that take only one bit each, yet it is more
....Read More |
Rating
|
|
|
IsDriveReady - Returns whether a drive is ready
|
Total Hit (3121) |
«Code LangId=2»
' Returns a boolean indicating whether a given drive is ready
' Example: check if the floppy disk drive is ready
' Debug.WriteLine(IsDriveReady("a"))
Function IsDriveReady(ByVal driveLetter As String) As Boolean
If driveLetter.Length = 1 Then driveLetter &= ":\"
Dim
....Read More |
Rating
|
|
|
TrimEx function using Regular Expression.
|
Total Hit (3159) |
Regular Trim function only removes preceding and trailing space but it does not remove all other white space characters e.g. New Line(\n), Carraige return(\r), Form Feed(\f), Tab(\t). To remove these characters you can easily implement function using Regular expression.
....Read More |
Rating
|
|
|
How to create XP-Style Balloon Tooltip in VB.net (Updated)
|
Total Hit (36509) |
Using api you can create ballon style tooltip. You can also set various parameters for tooltip i.e. Delay, Visible Time, Style, Title, Description , Font, TextColor, BackColor etc...
Note: If tooltip is OnDemand ToolTip then VisibleTime and Delay Properties have no effect. To set VisibleTime and
....Read More |
Rating
|
|
|
|
|
|
Include schema information in a DataSet's DiffGram
|
Total Hit (2809) |
In the .NET Framework, the DataSet's WriteXml method when used to create a DiffGram does not provide the capability to include schema information along with the data. This is more of a design choice than an objective difficulty, though. When you return a DataSet object from a Web service method your
....Read More |
Rating
|
|
|
|
How to determine Application Path in .net?
|
Total Hit (3576) |
In Visual Basic 6 you could use App.Path to see where your application's executable resides.
In VB.NET you need to use the Application object and its ExecutablePath property to get the path for the executable file that started the application, including the executable name:
Dim aPath As Strin
....Read More |
Rating
|
|
|
Close the DataReader before changing database
|
Total Hit (2675) |
The ChangeDatabase method of the ADO.NET Connection object requires an open connection to execute correctly. Even if the connection is open, you can still have an InvalidOperationException when invoking this method; this happens when you are reading data from the connection by means of a DataReader
....Read More |
Rating
|
|
|
Visually browsing hierarchical files
|
Total Hit (2662) |
VS.NET has a nice feature that allows you to visually navigate through the content of hierarchical files, and quickly jump to a particular section. Hierarchical files are all those files written in XML-like syntax, such as .HTML, .ASPX and .Config files. To use this feature, click the View | Other W
....Read More |
Rating
|
|
|
|
Process individual pixels of a bitmap
|
Total Hit (3894) |
While you can access individual pixels of a bitmap by means of the GetPixel and SetPixel methods of the Bitmap object, in practice you seldom want to use these methods, as they are simply too slow for most cpu-intensive operations. Fortunately there is a faster way, which consists of moving all the
....Read More |
Rating
|
|
|
Using Classes and Structures in Visual Basic .NET
|
Total Hit (1106) |
This article is intended to help developers choose between a class and a structure when writing an application. You can review the basic points of comparison between the two types in the "Structures and Classes" topic of the Visual Studio .NET product documentation. To find this topic, start Visual
....Read More |
Rating
|
|
|
|
How Do I...Write XML to a file?
|
Total Hit (918) |
This sample illustrates how to write XML to a file using the XmlTextWriter class. The writer provides a fast, forward-only way of generating XML and helps you to build XML documents that conform to the W3C Extensible Markup Language (XML) 1.0 and the Namespaces in XML specifications. The XmlTextWrit
....Read More |
Rating
|
|
|
|
How Do I...Call COM Methods from .NET?
|
Total Hit (801) |
This example demonstrates how to use COM object from a Visual Basic .NET or C# application.
In order to use the types defined within a COM library from managed code, you must obtain an assembly containing definitions of the COM types. Refer to the How Do I...Build a .NET Client That Uses a COM Se
....Read More |
Rating
|
|
|
XPath Tutorial
|
Total Hit (530) |
XPath is a Query language for XML. You can use XPath to retrive data from XML document. XPath gives you faster performance and flexibility.
This tutorial will explain you all basic concepts of XPath. It covers folloing topics.
«LI»XPath Tutorial
«LI»XPath HOME
«LI»XPath Intro
«LI»XPath Synt
....Read More |
Rating
|
|
|
|
How Do I...Invoke methods using reflection ?
|
Total Hit (1670) |
This sample illustrates how to invoke different kinds of methods through reflection. Because the names of the methods being invoked are stored in strings, this mechanism provides the capability to specify methods to be invoked at runtime, rather than at design-time, providing the scope to give your
....Read More |
Rating
|
|
|
Visual Basic .NET Internals
|
Total Hit (1210) |
The Microsoft .NET Framework has opened a new world for Visual Basic developers. Visual Basic .NET combines the power of the .NET Framework and the common language runtime with the productivity benefits that are the hallmark of Visual Basic. Although the Visual Basic .NET language looks the same on
....Read More |
Rating
|
|
|
Stripping HTML Tags using Regular Expressions
|
Total Hit (1865) |
Have you ever wanted to strip all of the HTML tags from a string? There are many reasons you may want to do this. For example, if you provide a feature on your site where a user can have the contents of a Web page emailed to them, you may wish to strip all of the HTML tags from the particular articl
....Read More |
Rating
|
|
|
Subclassing In .NET
|
Total Hit (1957) |
In VB 5 and 6, subclassing was something of a pain. To do it at all you needed a raft of cunning hacks and had to keep a very careful track on which object was subclassing what. All of that pain is removed in .NET with the System.Windows.Forms.NativeWindow class, which makes it almost trivial to pro
....Read More |
Rating
|
|
|
Getting File Icons Using The Shell
|
Total Hit (1487) |
The .NET Framework doesn't provide much in the way for classes to interact with the Shell. This article provides a simple class which wraps the Shell's SHGetFileInfo to extract large and small icons plus the display name and file type for any file.
|
Rating
|
|