|
TrimEx function using Regular Expression.
|
Total Hit (3150) |
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 (36480) |
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
|
|
|
|
How to determine Application Path in .net?
|
Total Hit (3569) |
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
|
|
|
List all COM components on local machine
|
Total Hit (2814) |
The following routine parses the registry and lists all the installed COM components:
«Code LangId=2»
' this code assumes that you have used this Imports statement
' Imports Microsoft.Win32
' Print ProgID, CLSID, and path of all the COM components
' installed on this computer.
Sub DisplayC
....Read More |
Rating
|
|
|
Include schema information in a DataSet's DiffGram
|
Total Hit (2803) |
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
|
|
|
Retrieve file version information
|
Total Hit (3615) |
The System.Diagnostics.FileVersionInfo class lets you easily read file version information without having to call Windows API functions (as you have to do under previous VB versions). This class has a static GetVersionInfo method that returns a FileVersionInfo object related to a given file. Once yo
....Read More |
Rating
|
|
|
Create a unique GUID
|
Total Hit (4117) |
The System.Guid type exposes several shared and instance methods that can help you work with GUIDs, that is, those 128-bit numbers that serve to uniquely identify elements and that are ubiquitous in Windows programming. The most important member is the NewGuid shared method is useful for generating
....Read More |
Rating
|
|
|
Skipping columns when tabbing on a DataGrid
|
Total Hit (3549) |
It happens quite often that you have a DataGrid with hidden columns (with width = 0), because you need their values but don't want to show them to the user. However, when you tab through the DataGrid's columns, these "hidden" columns are still taken into account in the tab order. This means that whe
....Read More |
Rating
|
|
|
How to find and sort files based on creation time
|
Total Hit (6589) |
The following code will sort file list based on CreationTime
«code LangId=2»Option Explicit On
Option Strict On
Imports System.Collections
Imports System.IO
Module Module1
Private Class CreateTimeComparer
Implements IComparer
Public Function Compare(ByVal x
....Read More |
Rating
|
|
|
|
|
|
InstrTblRev - The last occurrence of a char in a table
|
Total Hit (3342) |
«Code LangId=2»' If INCLUDE is True or is omitted, return the last occurrence of a character
' in a group
' or -1 if SOURCE doesn't contain any character among those listed in TABLE.
' If INCLUDE is False, return the last occurrence of the character in SOURCE
' that does not appear in TABLE.
....Read More |
Rating
|
|
|
VS.NET ListBar Control
|
Total Hit (1189) |
This control uses the Outlook Style ListBar control as a basis for a full implementation of a Visual Studio-style List Bar which holds lists of controls. Bars and items can be dragged around the control, and items can be dragged, pressed or double-clicked to add the item to an object. For additional
....Read More |
Rating
|
|
|
Using Message Queing in .NET applications
|
Total Hit (1345) |
Message Queing provides asynchronous programming model for your applications. For distributed and internet applications whene immediate response is not required from the actual server message quing can be used. This makes your application robust as message delivary is guranteed even if the remote se
....Read More |
Rating
|
|
|
Accessing the Registry with Visual Basic .NET
|
Total Hit (811) |
This article describes how to access the registry using the Visual Basic .NET built-in functions, DeleteSetting, GetAllSettings, GetSetting and SaveSetting, as well as using the Registry and RegistryKey classes of the common language runtime. It details the required permissions, explains when to use
....Read More |
Rating
|
|
|
Sample Chapter from Visual Basic .NET Threading Handbook
|
Total Hit (3015) |
This book will cover how .NET applications are executed, the life cycle of a thread in .NET, how the .NET Framework uses threads, how threads work in an event-driven environment, how we can avoid race conditions and deadlocks, how the activity of multiple threads can be synchronized, and how to debu
....Read More |
Rating
|
|
|
Defining Types
|
Total Hit (1215) |
Visual Basic .NET is usually described as an object-oriented programming language. This encourages us to think about our programming in terms of objects. During object-oriented analysis and design, then, we identify the most important objects in our system, and consider how they relate to each other
....Read More |
Rating
|
|
|
How Do I...use XmlNamespaceManager and NameTable?
|
Total Hit (531) |
This sample shows how to select namespace specific XML data from an XmlDocument. It demonstrates the use of the XmlNamespaceManager class. This class encapsulates a collection of namespaces and provides a variety of namespace management tasks, such as resolving, adding, and removing namespaces to a
....Read More |
Rating
|
|
|
How Do I...Create a Remote Server?
|
Total Hit (869) |
This sample demonstrates how to create the remoting version of a Hello World server. When a client calls the HelloMethod on the HelloServer class, the server object appends the string passed from the client to "Hi There" and returns the resulting string back to the client. The following code example
....Read More |
Rating
|
|
|
GotDotNet User Sample: FTP Client in .NET
|
Total Hit (1284) |
This is a simple FTP protocol client component class written in C# using .NET sockets. It implements core functionality of the FTP protocol, so you can connect, change working directory, download and upload files. Masks will be added later.
|
Rating
|
|
|
|
Font ComboBox
|
Total Hit (2492) |
This control adds a thin wrapper around the Icon ComboBox to convert it into an Office-style font picker control. Features include a most-recently used font section, initialisation on a background thread, auto-complete and built-in detection of non-character fonts like Wingdings (VB.NET and C# code
....Read More |
Rating
|
|
|
How Do I...Read from an event log?
|
Total Hit (2486) |
Event logging provides a standard, centralized way for you to have your applications record important software and hardware events. Windows supplies a standard user interface for viewing the logs (Event Log). Using the Microsoft .NET Framework's EventLog component, you can easily connect to existing
....Read More |
Rating
|
|
|
|
How Do I...Call COM Methods from .NET?
|
Total Hit (797) |
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
|
|
|
|
How Do I...Write XML to a file?
|
Total Hit (911) |
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...Invoke methods using reflection ?
|
Total Hit (1661) |
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
|
|