|
List all running Windows processes
|
Total Hit (2751) |
The System.Diagnostics.Process class exposes the GetProcesses static method, that returns a list of all running processes. It is quite easy to leverage this feature to display all running processes in a ListBox or ComboBox control:
«Code LangId=2»
' This code assume that you've used the followin
....Read More |
Rating
|
|
|
SearchString - Searching a string in case [in]sensitive mode
|
Total Hit (2307) |
«Code LangId=2»
' Search the specified string, with the case-sensitive mode or not
' Returns the index of the first occurrence found, or -1 if not found
Public Function SearchString(ByVal source As String, ByVal search As String, _
Optional ByVal ignoreCase As Boolean = False) As Integer
....Read More |
Rating
|
|
|
String operation in vb.net
|
Total Hit (1894) |
The following example uses some of the methods discussed in the Basic String Operations topics to construct a class that performs string manipulations in a manner that might be found in a real-world application. The MailToData class stores the name and address of an individual in separate properties
....Read More |
Rating
|
|
|
Object Oriented features in VB.net (Part-1)
|
Total Hit (5968) |
In this article we will discuss about Object Oriented Features available in VB.net
Let’s first understand the basic terminology used in Object Oriented Programming.
«big»Classes, Objects, Members and Abstraction«/big»
An object in programming is a construct that represents something from th
....Read More |
Rating
|
|
|
Tutorial - Language and Syntax changes in VB.Net for VB6 Programmers
|
Total Hit (11284) |
If you are a VB6 programmer and want to learn VB.net then it will be easier for you but still you need to learn new language and syntax changes in VB.net. This article is for VB6 programmers who are moving to VB.net. New programmers can skip this article, we will cover each language feature in detai
....Read More |
Rating
|
|
|
EasterDate - Evaluating the Easter date for a given year
|
Total Hit (2713) |
«Code LangId=2»' Evaluate the Easter date for a given year
' Example: MessageBox.Show(EasterDate(2003).ToLongDateString())
Function EasterDate(ByVal year As Integer) As DateTime
Dim g, c, h, i, j, l, month, day As Integer
g = year Mod 19
c = year \ 100
h = ((c - (c \ 4) -
....Read More |
Rating
|
|
|
|
|
DisplayExceptionInfo - Displaying error information
|
Total Hit (2791) |
«Code LangId=2»
' A reusable routine that displays error information
' Note: requires Imports System.Reflection
Sub DisplayExceptionInfo(ByVal e As Exception)
' Display the error message.
Console.WriteLine(e.Message)
Dim st As New StackTrace(e, True)
Dim i As Integer
....Read More |
Rating
|
|
|
DecodeBase64 - Decoding a string from base64
|
Total Hit (2890) |
«Code LangId=2»' Returns the input string decoded from base64
Private Function DecodeBase64(ByVal input As String) As String
Dim strBytes() As Byte = System.Convert.FromBase64String(input)
Return System.Text.Encoding.UTF8.GetString(strBytes)
End Function
«/Code»
....Read More |
Rating
|
|
|
|
Create Transparent Forms in VB.NET
|
Total Hit (1998) |
Generally, the classes form the «b»System.Drawing«/b» namespace are used to draw objects and print text directly on a form or control. However you can have some interesting visual effects by modifying just a few properties of a form.
There are two new properties now which will allow you to create
....Read More |
Rating
|
|
|
|
Create console apps that return an exit code
|
Total Hit (3254) |
Writing an application that returns an ERRORLEVEL to Dos is quite difficult in VB6, because you are forced to use a Windows API that ends the application immediately, thus preventing orderly release of resources. Conversely, this task is quite simple in VB.NET, thanks to the Exit static method of th
....Read More |
Rating
|
|
|
Using multiple fields as value for the DropDownList control's items
|
Total Hit (4126) |
Being an avid Access Programmer I have been frustrated with the limitation of VB DropDownLists to using only 1 field as the value. I found a way to simulate/work around this behavior with concatenation of several database fields at the query level to be my columns(i.e. Select KeyId1 + '~' + KeyId2 +
....Read More |
Rating
|
|
|
Accessing FTP servers in .NET applications
|
Total Hit (5252) |
<p>[From: "Accessing FTP servers in .NET applications",<br>
<URL:<a href="http://dotnet.mvps.org/dotnet/faqs/?id=ftp&lang=en">http://dotnet.mvps.org/dotnet/faqs/?id=ftp&lang=en</a>>]<br>
Accessing FTP servers in .NET applications<br>
Samples:<br>
<br>
How to access a File Tr
....Read More |
Rating
|
|
|
|
|
ADO.NET: Retrieve Data using OLE DB
|
Total Hit (551) |
This sample illustrates how to read data from an OLE DB provider using the OleDbDataReader class. This class provides a way of reading a forward-only stream of data records from a data source. If you want to work with SQLServer 7.0 or higher, you should refer to the topic Retrieve Data from SQLServe
....Read More |
Rating
|
|
|
How the System Deals with Text
|
Total Hit (1917) |
This chapter describes how text is used in a typical computer operating system. Specific descriptions are given of how text is used in Visual Basic .NET. This chapter will show some examples to set the context of how text processing was performed before Visual Basic .NET and the .NET Framework. With
....Read More |
Rating
|
|
|
Custom Actions - Part 1
|
Total Hit (1957) |
Custom Actions are deployment projects .NET programs written by your team that execute near the end of the installation process. You can use them to perform installation shores hard to implement with the existing features exposed by the setup project, in this order of ideas a custom action can insta
....Read More |
Rating
|
|
|
Virtual ListBox
|
Total Hit (2157) |
Virtual List Boxes can be used if you ever need to try and show a list containing a vast quantity of data. Instead of adding physical objects to the ListBox, instead you tell it how many rows there should be, and it simply defers all drawing of items to the owner of the box using owner draw item met
....Read More |
Rating
|
|
|
How to run your .net application using admin privilege under Vista?
|
Total Hit (955) |
Assume you're writing some application that really - I mean really really - needs administrative privileges (does it? you must be kidding). So, you want it to run evelated as an administrator. How to tackle this requirement in a Windows Vista and UAC world where even an administrator is locked down
....Read More |
Rating
|
|
|
|
VB.NET & C# comparison cheat sheets
|
Total Hit (4174) |
Because developing with the .NET framework gives you the freedom to use multiple languages it can be a bit of a hassle to choose between them. VB.NET and C# are probably the most wide spread languages and a question that gets asked regularly on the ASP.NET forums is which one to choose. My answer: l
....Read More |
Rating
|
|
|
NetProjectZip
|
Total Hit (794) |
NetProjectZip is an update of the VBPZip utility for VS.NET Projects and Solutions. The idea of the project is to make it easier to copy the important parts of a project or solution without any of the unnecessary files created as part of the build or IDE's working.
In VB, zipping was a fairly dif
....Read More |
Rating
|
|
|
How Do I...Apply validation when reading XML?
|
Total Hit (1001) |
This sample illustrates how to apply validation when reading and parsing XML data using the XmlValidatingReader class. Validation is the process of enforcing rules on the XML content either via a Document Type Definition (DTD) or a schema. At it's simplest, a schema is an XML representation of a DTD
....Read More |
Rating
|
|
|
How Do I...Load XML data into an XmlDataDocument?
|
Total Hit (968) |
This sample illustrates how to load XML into the XmlDataDocument class. This class extends the XmlDocument class, allowing structured data to be stored, retrieved, and manipulated through the DataSet class, which provides a relational view onto the loaded XML data. This affiliation between the XmlDo
....Read More |
Rating
|
|
|
Executing Custom Code During Installation
|
Total Hit (1522) |
An application can consist of not only traditional program files, message queues, event logs, and performance counters on the deployment destination but also custom code that must be executed on the deployment destination. You can configure your application to execute the custom code when your appli
....Read More |
Rating
|
|
|
How to implement XML and Binary Serialization (All FAQs)
|
Total Hit (807) |
Binary:
1. Which class is responsible for binary serialization?
2. What does it take to make my object serializable?
3. What are the main advantages of binary serialization?
4. How do you encapsulate the binary serialization?
5. How do you encapsulate the binary deserialization method?
6. Will
....Read More |
Rating
|
|