Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Everything / Languages / VB

VB

VB

Great Reads

by Stefano Castelli
The article will illustrate how to create a Code39 barcode in VB.NET and C#
by Aydin Homay
In this article, I tried to show a real benchmark based on presser test method, for a Big Data collection deals on C++, C#, and VB.NET.
by Chai_Pot
How to use MySQL as database in VB.NET applications.
by Mr.PoorEnglish
Compute "SnapValues" with minimum of fractional digits, useful in autoscaling Chart-control

Latest Articles

by Stefano Castelli
The article will illustrate how to create a Code39 barcode in VB.NET and C#
by Aydin Homay
In this article, I tried to show a real benchmark based on presser test method, for a Big Data collection deals on C++, C#, and VB.NET.
by Chai_Pot
How to use MySQL as database in VB.NET applications.
by Mr.PoorEnglish
Compute "SnapValues" with minimum of fractional digits, useful in autoscaling Chart-control

All Articles

Sort by Score

VB 

by Chai_Pot
How to use MySQL as database in VB.NET applications.
by Member 12660776
Programmatically Adding New ConfigurationSectionGroup Corrupts Declaration Section With Multiple Group Declarations.
by Jacob Himes
My go around to an Entity Framework alternative
by SimbarasheM
A .NET v4 Library for converting DataTable row(s) to JSON String for WCFServices
by Louis van Tonder
Quick and easy way to add dropdown functionality to the listview.
by B.O.B.
How to get correct caret position from Textbox control
by AlexF185
A dynamic progress bar control easy to use and literally plug and play
by Mr.Kim2050
How to convert .ts files to .mp4
by Subodh Raghav
In this tip, you will learn how to send an email in your ASP.NET application.
by XyedBilal
URL binding failure
by Subodh Raghav
A web service is a web application (a piece of software component) which is available on the internet.
by thatraja
Display Date Time in 12/24 hour time format in C#/VB.NET
by Maciej Los
If you want to know the way you can serialize and deserialize custom class collection, this tip is for you.
by Southmountain
This tip shares some lessons and thoughts after using this converter.
by Herbert Lausmann
An IconBitmapEncoder that produces high-quality icons, written in VB.NET and C#, WPF
by Paul M Cohen
A month/year date picker in VB.NET
by LucaDN
Add zoom capabilities, grid and rulers to the standard WinForms PictureBox control
by shijo joseph
An easy to implement yet powerful logging library which requires absolute zero learning curve
by Stefan Huy
VBA Hashtable Visual Basic Queue FIFO
by BorysT
This is an alternative for "A quick & simple VBA FIFO Queue Implementation"
by Stefan Huy
VBA Hashtable Visual Basic Hash
by Stefan Huy
VBA Hashtable Visual Basic Stack LIFO
by bobishkindaguy
A simple entry box for various numbers, especially phone numbers.
by CHill60
Simplify complex if-statements with "where value in list"
by Prerak Patel
Type Character
by Dave Kreskowiak
Yeah, this has been a "feature" of VB for about 20(?) years now. The "!" is one of the Type Characters. It's all documented here[^]
by Michael Rosqvist
If you want to measure something on the screen, here is a utility.
by Morris Bahrami
A small example of how to list computers in your domain
by veen_rp
An add-on tip to articles already posted on Code Project
by DaveAuld
I recently had created a windows forms application in VB.Net2008 and made use of the BindingSource control to bind all the forms controls to the underlying SQL Queried data.I built user functionality on the form to allow the user to further filter (client side filtering ) the original data...
by Ravi LVS
I don't see any difficulty in finding the above solution, because I am using same functionality since long back. Here is my alternative code.Instead of creating a new DataView object, you can directly call the DataTable's DefaultView.sourceDataTable.DefaultView.RowFilter =...
by Tantum
Access values of ProgressBar created at runtime
by M-Badger
How to discover all the controls on a form at design time for a property editor
by Chen, Shaowen
In this solution, we try to capsule our figure and its caption in a Textbox, so that if we move the Textbox, the contents (figure and caption) will move together.
by Curtis Hines
Convert EDI file terminators to CRLF
by jurhas
An algorithm for sort alphanumerical strings in their own natural way
by CHill60
Allowing a User to cancel a Form when Validation is in place and invalid data has been entered.
by Abed AlSayed
AlSayed ColorBar is a TrackBar best for professional color picker, like the one used in Adobe Photoshop.
by nickdenker
An ORM style layer which turns Azure Table Storage into a cheap and scalable indexed noSQL database - without the costs associated with Azure CosmosDB.
by AspDotNetDev
In this alternate version, we take into account the possibility that binding to a list of different types may cause compile errors.
by Casey Witt
A class for implementing BeginEdit/EndEdit functionality in a "Using" Block
by dontumindit
An Easy Way To Query a Database
by Andrew Rissing
The following samples should take advantage of using statements and furthermore built in features of the ADO.NET framework. Furthermore, if you open a connection, make sure you open it at the latest time possible and close it as soon as possible.Edit: While I was originally not trying to...
by FZelle
You are both wrong with the DataAdapter.Why do you think there is an overload with the querystring and the connectionstring?public DataSet select_query(string query, string con_str){ try { using (SqlDataAdapter da = new SqlDataAdapter(query,con_str)) { ...
by woric
The sample code provided by Andrew Rissing is a huge improvement over the original, but incorrectly catches the exception and displays a MessageBox. (Andrew correctly points out this is not a good idea.)A better solution is to allow the exception to fail:public DataSet...
by PrimeCoder
Nice,How about adding a couple of other methodspublic static void Parameter(IDbCommand command, string naam, object value){ IDbDataParameter par = command.CreateParameter(); par.ParameterName = naam; par.Value = value ?? DBNull.Value; ...
by rmliu
Resize either images or canvas only, resize batch images
by Thava Rajan
This tip is used to fix a workaround for a bug in double click on checkbox
by Bhanu Pratap Singh Rathore
Animate Controls with ease using the MAnimation class developed by myself and can be used by anyone.
by Alexandros Pappas
Display of a context menu when pressing the Apps key in a DevExpress GridControl
by David Vanson
A small application to pretty print Arduino code with syntax highlighting
by Alaa Ben Fatma
Generate your arrays using a GUI tool
by AspDotNetDev
You can't use an if statement in a bound code block, but you can still use conditions in your markup based on bound data.
by Chamila Nishantha
Multiple uploader control for ASP.NET applications
by James Gabel
ASP.Net timed page reload on button click/form submission.
by Tristan9
Better use async / await in web applications
by veen_rp
This message will self destruct in 5 seconds...
by Eduardo Yost
Creating a Web User Control containing an AutoCompleteExtender for data through WCF (JSON) allowing to store the entity selected through EntityFramework. Entity object serialization from the server to the client and the client to the server.
by r verma
Following trick will also provide a way how to handle/pass objects to web service through a web application as in web applications developer will not be able to update proxy class (old trick followed in case of class library). When you try to serialize your class let say using Binary...
by veen_rp
Big lists (>1,000,000 items) can cause out-of-memory errors raised by .NET. Manage them by a List of List(Of T)
by bradyguy
Don't send your mail out using the wrong account
by Duncan Edwards Jones
How to clear out a partition in an Azure table
by Patil Kishor
Backup & Restore of SQL Server database using VB.NET
by Hernán Hegykozi
This tip will show how to perform a backup and restore database from an application in VB.NET 2010.
by CorvetteGuru
Backup Stored Procedures in SQL Server.
by sreeyush sudhakaran
VB.NET code for Base64 Encoding and Decoding of Image files
by Zhuyun Dai
Your build will fail if you print 'Error:' in your custom Build Events of Visual Studio.
by Duncan Edwards Jones
Thoughts for writing code for the next developer to use (or how to apply the golden principle to code)
by Robby Tendean
Simple implementation guide for log4net in a VB.NET web application.
by Tim-bot
Simple calculation to determin a value at a percentage along a bell curve. Also with an offcenter curve intersection thing....
by tmenier
An introduction to Flurl, an open-source .NET library for fluently building URLs
by Zebedee Mason
Or why not both? This shows how.
by wesamq
This article explains how you can identify any compatability issues for a legacy code written in VB, or any other language that produces TLB (Type Library) files for its interfaces.
by Prashant.Tiwari
Must required functions for any Image manipulation task.
by Matthias Böhnke
Bug Fixes for Reading Barcodes from an Image - III
by Bhishma Anil Kajaria
Browse and Copy data from your CSV file to SQL directly without any Windows application...
by Robby Tendean
How to bypass SSL certificate validation checking and restore it
by Pascal Hubert
Looks like what I use!ServicePointManager.ServerCertificateValidationCallback = New RemoteCertificateValidationCallback(Function() True)
by Emiliarge
Using FindWindow() and WindowFromPoint() to identify window, and SetWindowText(), MoveWindow(), SetForegroundWindow(), EnableWindow() to interact with it
by Darkencrow
A multi-drawer style collapsable UI container
by Pratik M Mahajan
'Call Date and Time Zone Property[Shell Script]'Tested in XP not on Vista'Take one button and write following code in its click event:Public Class Form1Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickShell("rundll32.exe...
by hajivalie
Call Form with string name
by AspDotNetDev
Call a series of functions until the return value meets a condition without a chained-if or short-circuiting.
by cechode
Sorry, but could not resist :)Being that we we started with select case (in the launge), I felt that this was missing both the initial condition and the action to perform for the case that got hit.So given this:static Action SelectCase(T conditionValue, List<System.Tuple<Func<T,...
by AspDotNetDev
VB.NET Version (C# Version)Thanks to cechode for inspiring this tip/trick. Suppose you have the following functions:Function Step1() As Boolean Return TrueEnd FunctionFunction Step2(ByVal val1 As Integer, ByVal val2 As Integer) As Boolean Return val1 = val2End...
by Member 4694807
Sorry, but I don't like adding additional artificial elements like function arrays . I would code it as following:If isok(Step1()) OrElse isok(Step2(1,1)) OrElse isok(Step3() OrElse isok(Step4() OrElse isok(0+1) thenend ifFunction isok(ByVal rc as Integer) As Boolean ...
by FDW
I do think the approach is over complicated, but in some cases there may be (a small) benefit. As an alternative I would offer:First version (no common test):((Action)(() =>{ if (!Step1()) return; if (!Step2()) return;}))();Second version (common...
by Andreas Gieriet
This is an alternative for "Call Functions Until One Meets Condition"
by SibeeshKV
Calling an ASMX webservice from other server using jquery and PHP
by Farai Chikwetu
This tip describes how to capture audio and then replay it using Microsoft Direct Sound DLL.
by hground
I have several applications that open a SaveFileDialog, but it always comes up in "List" mode and I had not found a way of configuring the dialog to display in "Details" mode. This is a kludgy work-around, but it seems to work OK. After Declaring the dialog in your code and just prior to calling...
by _Matt_Wilkinson_
How to centralise a Form when using multiple screens
by Patil Kishor
Change font & size of Crystal report dynamically
by Yumashin Alex
This tip describes how to change DataGridView behavior concerning row resizing
by yozi
Sometimes you need to change objects type to another type.Convert.ChangeType does this job for you. But when you use Nullable(Of T), this function throws an exception.You can use the following function to change type(including Nullable types) safely... Private Function CType2(ByVal...
by djdynamix
A little workaround to enable a VB.NET application to read and alter the WPC settings for any user.
by bluesathish
If you build the Query executer tool in a VB.NET, you need to check the input query syntax before getting the results. This tip gives you a small idea of how to get the syntactic errors from the VB.NET front end screen by calling already created stored procedure.
by Dallas Adams
A DLL with a few classes and functions to provide data within Matlab on the elements from the periodic table.
by ha_asgag
Using number systems in statistics
by Mithun Thakur From NICE Computers
Clear All textboxes text in VB
by Rixterz123
How to get text to show perfectly clearly on Aero glass
by sudevsu
Clearing the controls on Submit
by terry.corridan
This code processes a Click or a DoubleClick event.
by herves
This is an alternative for "Click or DoubleClick".
by Duncan Edwards Jones
Utility class for adding XML comment to auto-generated code
by Duncan Edwards Jones
A quick-and-dirty function to display the VB.NET code resultant from any given code compile unit
by B.O.B.
A simple extension to add an item that has a data source bound to combobox.items
by Anshul R
Shortcut for Commenting
by Chris Jorna
Populating NICs, online (IP and MAC) and offline IPs in a network environment
by Chris Jorna
Source code and demo on general TCP client & server library mainly usable for / tested on SICK lidar devices
by Chris Jorna
Communication library files - UDP broadcast
by Frankxcid
Class that allows you to programmatically create an Open XML Excel spreadsheet
by Karl Tarbet
Complex math library for C# and VB.NET
by Jose Xavier
VB Function to Comput Easter Date
by Chamila Nishantha
Adding report pages to create one report
by Hassantga
How to connect to a MySQL database using VB.NET.
by Jules Harcourt
How to use the excellent Holiday web service in VB.NET using VS 2010.
by Abdul Quader Mamun
Convenient way to remove items from list when items exist in second list.
by Anshul R
The Perfect Translation/Conversion of Code
by TomQuinn
A simple function used to determine if a file path refers to a network drive and if it does convert it to use the UNC path
by Prerak Patel
Here is an API way using WNetGetUniversalNameImports System.Runtime.InteropServices _ Private Shared Function GetUName(ByVal Path As String, ByVal outName As Integer, ByVal bObj As...
by Ehsan Valizadeh
This Function allows you to convert a normal string to UTF-16 encoding in VB.NET. You can find tools like Unicode Code Converter that operate like ConvertToUTF16 function.' if you pass this parameter to function : "I'm from Azerbaijan."' the return value is :...
by Daniel Leykauf
Same function and little bit easier:Imports System.Runtime.Remoting.Metadata.W3cXsd2001Class Converter Public Shared Function ConvertToUTF16(ByVal str As String) As String Return New SoapHexBinary(System.Text.Encoding.BigEndianUnicode.GetBytes(str)).ToString End...
by nogChoco
''' ''' Converts a CIDR formatted string to the IPAddress-range it represents. (Function handles IPv4 only). ''' ''' CIDR formatted string, example: "209.85.134.0/23" ''' A List(Of IPAddress): (0)=StartIP,...
by EddeKreij
Convert csv file to a data table
by Emiliano Musso
A quick method to convert a CSV file in XML
by Jesse Fatherree
Convert DataSet or XML to JSON using VB.NET
by bEGI23
Convert filesize (bytes) according to highest possible size scale (KB, MB, GB, TB, PB).
by jonx
Very good stuff. Learned me a lot about how to access to the physical structure of the query.There is also a CopyToDataTable : http://msdn.microsoft.com/en-us/library/bb386921.aspx[^]And for the record here is a C# version:protected DataTable EntityToDatatable(IQueryable Result,...
by Mahmoud El-Baz
It converts 123 to One Hundred twenty three
by Normz Antonino
This tip shows you how to convert numbers to words neatly.
by FatzBomb
How to convert a written number to a numerical value anywhere in a string.
by Ron Beyer
You may want to take a look at String.Join:Your code can be compressed to:Dim str as Stringstr = Chr(34) + String.Join(Chr(34) + "," + Chr(34), arr) + Chr(34)(My VB skills are a bit lacking, so the syntax may be a bit off, but you get the idea).
by Alan Burkhart
I'd never used String.Join before. Didn't even know it was there. :laugh: However, part of the idea is to skip all empty lines AND not end up with an empty string at the end (which my first code didn't address) AND insert the quotes. To get all this done with String.Join, it still took 8...
by Prerak Patel
Pretty simple to ignore blank entries..Dim s As String = """" & String.Join(""",""", txt.SelectedTextt.Split(vbCrLf.ToCharArray, StringSplitOptions.RemoveEmptyEntries)) & """"
by charles henington
Convert an Image to grayscale without using unsafe code
by ahsan sarfraz
Convert a Dataset to bytes array and then compress that array.
by veen_rp
Geographic coordinates from decimal degree to degrees, minutes & seconds. And vice versa.
by bobishkindaguy
Thread safe control displays status with icon according to type of message. Tutorial on sending messages around your application using delegates.
by bobishkindaguy
A simple list control that prevents double entries, doesn't drop down, has icons to add and delete items
by bobishkindaguy
TrackBar that can work with time values, has a nice spotlight for the current value, and won't allow its value to change when the user moves their mousewheel.
by veen_rp
Use and benchmark of coordinate transformation using the C++ proj4 library in VB.NET and C#
by Thava Rajan
Copy and insert data at any postion in your datagridview
by Morten Lossius
Copy tables between servers with smo - different collation
by miteleda
Copy DataGridView contents to clipboard regardless of current selection.
by Nosey Parker
Crafting on hex string
by OldUser101
A walkthrough of building a MySQL Database Connection Tester application in VB.NET
by Ruzli999
How to create Animation using separated Images
by Alexandros Pappas
This tool reads the descriptions of the columns of the SQL server and creates a Word document using SoftArtisans' WordWriter.
by Lau Han Ching
How to create Microsoft Access database programmatically using VB.NET without Microsoft Office
by Fahmi Noor Fiqri
Create PDF from Image files using VB.NET and PDFSharp library.
by Emiliano Musso
How to create a UserControl to show QR Codes created with Google APIs
by Florin Pănescu
This library is for creating shortcut .lnk & .url
by Zdenek Jagrik
A template for Windows Form Application written and compiled without Visual Studio.
by Florin Gherghel
How to create a BOTTOMMOST window (Win32 and .NET).
by TechKidd
This trick is on a intermediate/advanced level.
by MattSparks
Resuable Playlist Control for Use with COM Media Player Objects Such as Window Media Player
by Melih Mucuk
Creating a WCF Service with JSON data for use on iOS
by Mik Wadstrom
Simple way to use Crystal reports as embedded dynamic printable reports
by W. García
Turn Microsoft Office applications into a masterpiece for cleansing, reshaping, managing and analyzing data from CSV files. No more intermediary spreadsheets, no more headaches due to DLL updates that make your implementations stop working, the pure VBA solution is here.
by Wendelius
This is an alternative for "Cumulating values with LINQ"
by DaveAuld
Here is a lesson I learnt while working with custom application settings in XML files and Visual Studio
by Mang Irpan
This control is a datagridview that can contain control as its node, and it can contain unlimited node control
by Bob Stoom
Working code of the custom MenuStrip on the LinearGradientBrush constructor base. And how to control Form without borders.
by Surendra Adhikari SA
Implimenting a message box that closes automatically using thread.
by Avatar2400
This is a simple class that allows you to have message box with checkbox and other small features.
by Tajwer Jalal
Data Entry Form made Easy, Enabled / Disabled controls on Data Entry Form
by DonWim
how to implement data validation via regular expressions in a WPF application
by The Myth
Databinding examples in WPF for VB.NET.
by DaveAuld
A simple way to create a grow only Column Width routine
by MarioRainer
Here is a simple way to sort the datagridview by Multi-Columns
by Jαved
DataGridView: Make Enter Key Move to Next Column
by Robby Tendean
ExcelLibrary implementation sample to convert DataSet to Excel file in VB.NET
by Robert Hutch
Hi,another alternative is this Excel C# / VB.NET component that has limited free version that can be used in commercial applications and unlimited professional version.Here is an Excel VB.NET code how to export DataSet to Excel:Dim ef = New ExcelFile()For Each dataTable As...
by Alan Tuscano
Converting DataSet to String to DataSet
by #realJSOP
This is an alternative to "DataSet to String to DataSet".
by Igor Krupitsky
This article shows how to get ADO.NET DataTable out of Excel
by Alexandros Pappas
This project measures performance of the DataTable.Merge method.
by Patrice Dargenton
Database Administrators need to compare database structures. DBReport shows only (and all) significant information that makes sense for daily administrator work.
by Alejandro Gaio
A simple solution to a serialization problem with IBindingList-implementer classes.
by terry_tldsb
A class using Win32 Unicode calls to handle file names/paths longer than 254.
by Anshul R
Converts a given decimal number to fraction
by Ivan0001
You have too many icons on your desktop? Well, this will solve your problem. With this program, you can organize your desktop, create categories and add programs/documents to category.
by Brian Risley
How to do transaction scope exception handling.
by TnTinMn
UpdateDefaultButton - Allows detecting change in ActiveControl
by karenpayne
This code permits a developer to determine if a radio button is selected in a container such as a panel or GroupBox using syntax similar to TryParse.Requires Requires Framework 3.5 or higherExamplePrivate Sub Button1_Click() Handles Button1.Click Dim SelectedButton As New...
by CorvetteGuru
A few fun Dictionary utiltities.
by M. Rawan
direct print for microsoft report (RDLC) without preview
by joejames111
Hook to System Events without libraries or anything complicated.
by vertex4343
DirectShow Hangs on Pause – Solved with WNDPROC message
by Minh Danh Nguyen (ToughDev)
Depending on system preferences (in Control Panel/Sounds), the .NET WebBrowser control (just like Internet Explorer) may produce a click sound when changes are made programmatically to its DocumentText property, which is irritating to the user.There are two ways to avoid this:1. Use...
by emolina
Public Sub DisableSound() Dim keyValue As String keyValue = "%SystemRoot%\Media\" If Environment.OSVersion.Version.Major = 5 AndAlso Environment.OSVersion.Version.Minor > 0 Then keyValue += "Windows XP Start.wav" ElseIf Environment.OSVersion.Version.Major = 6 Then ...
by Member 8208766
To me the second method was problematic. After searching, I found an apparently equally good solution:webBrowser1.DocumentText = text;or in your case:webBrowser1.Document.Write("Hello, world!");from here:...
by pipiscrew
nah, try the light one ://at FormLOAD WB.Navigate("about:blank"); //at treeview event private void treeview_AfterSelect(object sender, TreeViewEventArgs e) { WB.Document.Body.InnerHtml = (dR["html"].ToString()); }
by OriginalGriff
Disable the Close box on a form
by Brian Pendleton
I could be missing the point here, but I believe you could also override the OnClosing event.protected override void OnClosing(CancelEventArgs e){ // allow default behavior.. base.OnClosing(e); // test for whatever... // on fail, e.Cancel = true; // set some...
by charles henington
I have used this in the past and have also posted as one of my tip tricks :-} One tip trick that I still like with CreateParams is changing parms.ClassStyle |= 0x200; to parms.ClassStyle = this.Handle.ToInt32(); which will render the form invisible which is much easier than overriding...
by jwalker343
See a couple of Alternate ways & Original Thread here:Disable Close Button from Title bar of a Window[^]
by Simon_Whale
This is purely a VB.NET version of what Griff posted Public Const CS_NOCLOSE As Integer = &H200 Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams Get Dim params As CreateParams = MyBase.CreateParams ...
by peymanabolghasemi
by peyman abolghasemi , Display DB info
by DX90
A simple library to control registry easier
by Jose A Pascoa
Part 1 - Using DMath from C#
by Neil Siegfried
Double Buffer a List View Control to eliminate all flickering associated with it.
by Sujith Karivelil
This article Describes Connectivity to Gmail using IMAP, and also guide you to download and save mail content along with attachment.
by bEGI23
This code allows to drag and resize a borderless form!
by PWFisch
Drag drop multiple selected rows of datagridview with left mouse button
by Vincenzo Barone
This tip shows how to make a multiple controls drag effect in winform.
by a_pess
Draw to Screen without using API
by Thomas Corey
Using the Action(T) delegate to reduce repetitive coding
by Duncan Edwards Jones
Make a nice diagram experience for your domain specific language by adding a smart tooltip to your connectors
by Thomas Corey
Dynamically sort query results using LINQ expressions and reflection with sorting and paging using VB.NET.
by Jo_vb.net
An extended version of the Dynamic Tab article
by marc9889
This code demonstrates how to append an XML document. We will add a new element and some inner text. Call the function, provide arguments for the path to the file, the name of the child node, the element name, and the text to add. The file is opened, appended, and saved. The function returns a...
by Member 12032084
.dll for making the FTP management with VB.NET easier
by Bashar Tahir
Easily zip / unzip files using Windows Shell32
by DerekT-P
Use .NET function to evaluate your custom formulae
by Robert Bettinelli
Easy JSON Recursion in VB.NET with nested levels
by Prince Tegaton
This entails how to easily add mobile website feature to your ASP.NET website/app
by cjb110
How to configure columns of abstract entities.
by Miller Nguyen
This article will show you how to implement a complete solution of electronic signature by using HTML5 canvas in ASP.NET (VB).
by Brandon Rohrer
Embed HTML in a Word Document
by The Myth
Embedding Chrome in a WPF VB.NET application using CEFSharp
by Mauricio Orejuela Bohorquez
Emulating HTML Text boxes Value attribute in VB.NET text boxes
by GabrieleTronchin
Increase DataGridView performance
by Umarfarukh7
This tip is about encrypting web.cofig file using aspnet_regiis utility of .NET Framework.
by kadu.sumit
String encryption/decryption functions in .NET.
by Carlos Bocanegra
This tip describes a useful way to create and send an email with a summary of the exceptions from a file validation process in a SSIS package using a XML and a XSLT template.
by Duncan Edwards Jones
How an event sourcing / projection based system allows you to fully unit test the business code the application will use without mocks
by Anurag Gandhi
An Excel macro that generates SQL insert script that can be executed against database directly
by NewPast
Excel, Pure VBA Macro: Molecular Weight/Molecular Mass Calculator
by JamesFaix
Automated build tool for ExcelDNA projects to add referenced libraries to packed ExcelDNA add-in
by Anthony Daly
A simple library for dealing with unhandled exceptions, with email support.
by The ANZAC
A simple and modifiable approach to collapsing and expanding grouped data within a datagridview custom control
by Ozan Müyesseroğlu
If you want to export strings in C++ to VB.NET, build your function like this:BSTR __stdcall expfun(void){ char* cp_test = "Hi World!"; CString cs_test; cs_test.AppendFormat(L"%s", cp_test); return cs_test.AllocSysString();}and in VB.NET:Imports...
by Ravi Kumar Mishra
Data export from data table or dataset to Excel with formatting.
by Michael Rosqvist
How to export a DataGridView to Excel.
by jeffery c
How to export and import wireless settings using Netsh in VB.NET (updated)
by hawk3434
A class to export the data from the DevExpress dashboard viewer object
by Jayson Ragasa
Expose those class members written in .NET, in VB6
by Dejan Mauer
Probably the easiest way to detect faces in images by using Accord.net framework
by Emmanouil Gimissis MSc ICSD
Fast calculation of week days between two dates using DateDiff
by ZamirF
Can we simplify it by: (This essentially passes only two numbers). public int GCD(int value1, int value2){ int max = 0; bool gcdFound = false; int counter = 1; //Make sure both numbers are atleast 2 or above if (( value1 <= 1 ) || (value2 <= 1)) return...
by jfriedman
/// /// Find the Greatest Common Divisor /// /// Number a /// Number b /// The greatest common Divisor public static long GCD(long a, long b) ...
by Mauro Leggieri
It is better to do this:public static long LCM(long a, long b){ return (a / GCD(a,b)) * b;}To avoid overflow on big numbers.
by David Vanson
How to make a video converter that shows the conversion progress to the user using ffmpeg
by atamata
File renaming algorith to mimic Windows copy+paste renaming
by Patrice Dargenton
File2XL lets you open any text file into MS-Excel
by Menelaos Vergis
FileLoadException in InitializeComponent.
by TMSxCodeProj
Hiding/Showing TreeNodes and Filtering them in Winforms TreeView Control
by Mr.PoorEnglish
Explain the instruction-sections of the placeholders within a formatstring more clearly than MSDN-Documentation does
by prashant chalise
Get the text present inside tablecell in both visible or hidden mode using VB.NET
by Rajesh Londhe
Its needed to work with different factors of date. To find out total number of weeks in months is one of important task in it.
by Marc Koutzarov
Sometimes, it is useful to know if an object has a certain property and then fill it by only having the propertyname as a string at hand.
by Enver Maroshi
Find first day of week containing given date
by Eskern
public static DateTime GetFirstDayOfWeek(this DateTime date) { var dfi = DateTimeFormatInfo.CurrentInfo; var firstDayOfWeek = date; while (firstDayOfWeek.DayOfWeek != dfi.FirstDayOfWeek) firstDayOfWeek=...
by twehr
public DateTime GetFirstDayOfWeek2( DateTime date) { return date.AddDays(-(int)date.DayOfWeek); }
by dgDavidGreene
How to find and link config and other files from other projects within your solution.
by Wild-Programmer
Fixed or Sticky header or ASP.NET webpage
by bradyguy
Outlook 2013 does not advance the current time in the calendar view; here is a hack fix.
by Southmountain
How to install and register .OCX components for legacy application
by shavinder
Format a textbox for currency input (VB.NET)
by OriginalGriff
Normally I keep information like this in a text file, in a folder called "How To Do It", as it is handy to have around, and too much work to search for each time I need it, but too much detail for me to remember if I don't use it often. Formatting a DateTime for display:DateTime.ToString()...
by nan49
'All business logic access to the database can make use of this 'function if one is using a stored procedure.'--------------------------------------------------------------Public class classDbAccess#Region "DML OPERATIONS USING ORACLE STORED PROCEDURE" 'This take the necessary...
by lidialee
I have a report which can be viewed in Crystal Report viewer in VS. Client needs to generate a PDF file with a click of a button and the PDF should pop up upon finishing exporting and let the client decide where to save the file.'vb.netImports...
by atverweij
The last part can be written much easier in VB:Private Sub msGPDF_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles msGPDF.Click Dim Stream As IO.Stream = objRpt.ExportToStream(ExportFormatType.PortableDocFormat) Dim Buffer(CInt(Stream.Length)) As Byte ...
by Mr. xieguigang 谢桂纲
Generate markdown from your nuget package
by Gregory Morse
Generating Unique Contrasting Colors
by Juan F. Paleo
Map a DataReader from any database to a custom Class in your VB.NET Project and validate that content is "correct"
by JamesFaix
Get a collection of all running Excel interop Application objects (not just the active one)
by pdoxtader
Use DeviceIoControl, QueryDosDevice and WNetOpenEnum to get information about your system.
by Willem Hijlkema
SQL Blob field into picture box
by Trung Nguyen Son
How to analyse and tune your dotnetnuke site to get best performance.
by User 7711251
Get images, links, and source code from a website.
by Doug- VisualBasic VB.NET
A quick Function to get UTC / NTP time
by karenpayne
Returns all checked Checkbox controls in a Windows Form container
by AspDotNetDev
Using TinyMCE is fairly simple, but attempting to access the value entered by the user in ASP.NET 4.0 presents with some problems.
by Ajit Amare
Get the viewable text for your textbox.
by Mr. xieguigang 谢桂纲
GetLastError error codes
by Nosey Parker
How to calculate subnet fast and get active ip-addresses
by Mike Meinz
Demonstrates two functions to retrieve the current Windows System Audio Volume and set Audio Volume.
by Gregory Gadow
With LINQ, you can retrieve an enumeration's metadata, such as its minimum and maximum values and whether it contains a given value.
by Wendelius
This is an alternative for "Getting publishing information for a ClickOnce deployment"
by Huseyin Atasoy
A very simple and short way to get the external IP address
by Sander Rossel
How to check an Objects Type, ignoring all subtypes, in C# and VB.
by Gehan Fernando
Custom glass message box for WinForms development.
by Manoj K Bhoir
A Glass style progress bar
by Len van den berg
GMaps Control Simplified in VB.NET
by Robert Bettinelli
Check this for a good universal way of running stored procedures..
by Michael_Davies
Handling large numbers of application settings
by Sujith Karivelil
This article will help you to create, update and delete events/ appointment in google calendar from your web application.
by Robert Gustafson
Simplifies working with ToolStrip-type menus and tool bars for MDI-parent and other forms; also works with ToolStrip-type context menus. Also handles help requests for menu and toolbar items.
by Hasan Habib Surzo
Basic Server/Client Example using Windows Communication Foundation (WCF) programming
by Kanwal Shehzad
Hiding ReportGroupTree in WPF is a little bit tricky, as there is no simple property or method to do this.
by Amey1202
In WPF, just set the ToolPanelView property of CrystalReportViewer to None. That is enough.
by Colin3
Using the SAPBusinessObjects.WPF.Viewer.dll, the property ShowGroupTree is not available.To Hide the GroupTree as a default, set the property .ToggleSidePanel to SAPBusinessObjects.WPF.Viewer.Constants.SidePanelKind.None.e.g.With _viewer .IsEnabled = True ...
by Simon-Benyo
Hooking unmanaged processes using VB.NET.
by Junell Zenarosa
Updating referenced scripts realtime
by David Weaver
How to add the missing byte shifter operators to a VB.NET Netduino Project
by Pete Mourfield
Describes how to check for file existence on an FTP Server using VB.NET
by Richard A. Dalton
A short program that demonstrates some fundamental programming techniques that every student should understand.
by Wendelius
As a general rule of thumb, I'd suggest browsing http://www.connectionstrings.com/[^] for connection strings against popular data sources.
by Michael Rosqvist
A small sample showing how to create a Google Heatmap in ASP.NET/VB.NET
by Mark Springer
Allow navigation - forward, backward, branching, and loops with a few changes to your existing projects
by Mike Meinz
Source code to demonstrate the creation of a new task in Windows Task Scheduler.
by PdotWang
Add to Layout, and Add Event
by Tino Fourie
Catering for user needs in a dynamic manner using a DataGridView
by Systematix Infotech
How to create the customized Kendo auto complete as a shared control into ASP.NET MVC using VB
by Patil Kishor
How to declare variables in VB.NET without using the As type.
by PdotWang
I have some lessons learned on the topic.
by Lai Taiyu
Designing an identification card (ID Card) print program using Visual Basic 6.0 on Windows 2000, 7 or later
by Ajitchahal
This is quite useful if you are building a crawler or need to download images from public sources. Transparent images can be easily discarded.
by Mike Meinz
How to use .NET Framework to determine the drive letter of the CD/DVD (optical) drive.
by -james
Iterate through the results and extract using system.reflection
by dapeacenforcement
Easy way to edit the right ListViewItem (Row/Column) after MouseDoubleClick.
by Maciej Los
This tip is desired for those who want to list all available SQl Server instances that are in a network.
by Alireza C
I want to show how we can export data from data table to Excel simply.
by Ed Nutting
How to fix LocalDB / SQL Server: "Cannot open database "XYZ" requested by the login. The login failed. Login failed for user ABC"
by Peter BCKR
Fixing missing ContentType-Bug in Internet Explorer 10 on Windows 8 when using XDomainRequest and POST requests
by Mike Meinz
Function returns exe name and command line for the provided filename and extension.
by Koshy Panicker John
File Name from Path
by Simon_Whale
imports system.iodim Filename as string = "C:\Users\Sony\Desktop\Readme.txt"dim FileInfo as new fileinfo(filename)'this gets the filename and extension e.g. readme.txtmessagebox.show (Fileinfo.name)'this gets the extensionmessagebox.show (Fileinfo.extension)'this gets the...
by Tino Fourie
Use an image to store passwords to be used to Encrypt / Decrypt information
by sid2x
Kill any process using VB.NET.
by dhamenha
One day i created many aspx files in one directory, then I wanted to browse those files without going and clicking each one of them, I decided to write small function to create a hyperlink for each file. I thought someone else might benefit from the code, here it is: strDir =...
by Md. Marufuzzaman
Introduction How can you lock your Windows NT based Workstation programmatically? To do this, you just need a little basic knowledge on how to use user32.dll. Here you will find a function name as LockWorkStation() and you need to know how to call this function. A sample example with the...
by Hadrich Mohamed
This tip shows you how to make your own Gmail Notiifer using VB.NET
by Florin Pănescu
This is how to achieve mouse fade effect when mouse is hovered in/out on control inherited.
by Mike Meinz
The COM Interop Runtime Callable Wrapper (RCW) is a "Black Box" that creates references to memory that need to be released before the called program will end.
by Prerak Patel
How to remove characters from a numeric string
by Syed Wayez Ahmed
How to remove characters from a Numeric String:
by The Myth
How to return Json in VB.NET in multiple ways
by Kethu Sasikanth
How to select an initial value for a DropDownList in MVC3 App
by Michael Rosqvist
This tip discusses how to send an instant message in plain text to a Lync receiver.
by vinodkumarnie
Show or hide controls through code behind or through JQuery
by Rolando CC
Shows how to sign a string using a PFX certificate to create a CMS/PCKS#7 signed data. Also, shows how to take the signed data and compare with the original text to check sigh validity.
by Neha Ambasta
This tip describes how to convert the data table/grid into Excel sheet.
by Maciej Los
This tip shows how to get data from multiple workbooks using one OledbConnection.
by arith silva
EffiProz(www.e...
by Anshul R
A class for N-Digit Arithmetic
by TheCardProject.co.uk
Quickly set up the ability to serve up several pages and record which was served in SQL Server
by Philippe Herremans
This tip describes a VB.NET program to implement Custom task panes in Excel 2010 and 2013 using Excel-DNA to integrate .NET into Excel.
by A. Ganzer
Using snippets to create a full and correct implementation of complex interfaces
by Casey Witt
Function for parsing Microsoft Excel "XML Spreadsheet" clipboard DataObject into .NET Array of Objects
by Ahsan Murshed
This article gives ideas to developers to increase development time productivity using the free Visual Studio 2010 extensions.
by Herbert Lausmann
Inject a script (JavaScript) into a web page loaded in a WebBrowser control.
by TANMAY N
How to Integrate Google map in VB.NET without using any API in VB.NET Windows application
by Duncan Edwards Jones
Using interfaces to add sematic meaning to your POCO classes
by Soufiane Rabhi
Communication between .NET and other programming languages
by SREENATH GANGA
.NET Equivalent to MInverse in Excel
by Santiago Santos Cortizo
How to resolve cached post problem with iPhone/iPad with iOS6 update.
by Matthew8
A set of rules IPFW can pass or reject depending on the specific nature of the package.
by barrd
Fix an exception related to ISupportInitialize.BeginInit and learn why it happens.
by Sacha Barber
Dim DataGridView1 As New DataGridViewDim TextBox1 As New TextBoxTextBox1.TabStop = what the hell, it makes no sense
by NavnathKale
I dont get why someone what to relate between DataSource and TabStop. Dim DataGridView1 As New DataGridViewDim TextBox1 As New TextBoxTextBox1.TabStop = (DataGridView1.DataSource IsNot Nothing)
by FrankNight
In this tip, I show a set of helper classes useful to prepare and send messages to the SqlXML Joomla component and execute remote SQL calls to your hosted website.
by drewman5150
Simple jQuery ASP.NET Slideshow
by herves
This is an alternative for "Latitude and longitude"
by veen_rp
A simple, step by step tutorial to set up an MS-Office Excel Ribbon, launch your own .NET applications from Excel and interact with the spreadsheet values.
by Emiliano Musso
How to calculate the distance between two strings according to Levenshtein algorithm
by maz2331
License Key class to make generating and validating keys easy.
by dirigo
Preventing a log file from growing forever
by Daniel Leykauf
A LinkLabel replacement with auto URL detection
by Hisham Abdullah Bin Ateya
LINQ Extensions methods that may help you a lot
by Hisham Abdullah Bin Ateya
LINQ to CSV files.
by Tim Corey
Learn how to use a dataset object to load a combobox (or other similar objects) at runtime instead of needing to set anything up at design time.
by maffeinet
A simple code that loads a daagridview from a textfile
by Zeev Goldstein
Protecting your work - use the right way to identify your client machine
by NikulDarji
Calculating the magic square in VB.NET.
by Member 551133
How to add, and update an existing, entry on MailChimp list, using API V3. Optionally, you can add to one or more groups easily. Written in VB.NET, but could be easily converted to C#
by maxitone
Use this if you're working in a fullscreen RDP session - for example - to see new e-mail or appointment alerts
by MuhsinFatih
Making a nice tailed round effect
by Juan Davel
Managing Application Scoped Connection Strings
by Raphael Adeniji
Many a times, we need to programmatically manage GridView/DataGrid in Visual Studio web applications and this looks very difficult because we do not know what properties or events of the control to use. It may also be as a result of time constraint.
by Mr. xieguigang 谢桂纲
Manhattan plot in VisualBasic, application of the cross platform VisualBasic in the data science
by ganiweecom
How to display Master Detail Views in Windows Forms Datagridview
by Manoj K Bhoir
Why another Tool Strip or Status Strip? The standard ToolStrip/StatusStrip is too limited in functionality and I couldn't find a custom control written that did all that I wanted. This is a User Control with Microsoft Office 2007 Visual Style.
by joe_j
Shows how to split a GridView header using CSS and code.
by Allegra Angelo
Create a multipage TIFF image from images
by Wendelius
When a string longer that 65536 is shown using a message box, the result might be unexpected.
by karenpayne
Use less code in your business logic for messages to the UI
by UKAndrewC
Method sorting utility for VB.NET source code
by Robby Tendean
A tool for viewing Microsoft Excel BIFF8 binary format
by Jepy
Replace the last 3 blocks of code with:String.Format("{0:x}", value)
by Dave5709
The Math.Round function in the Compact Framework only allows for ToEven behavior, not the AwayFromZero functionality as listed here:http://msdn.microsoft.com/en-us/library/system.midpointrounding.aspx[^]This code will allow you to emulate the MidpointRounding.AwayFromZero functionality of...
by AshishSaxena19
Migration of a VB project which is using .tlb refrences, to VB.NET
by e.bonavero-miller
make sure that web.config contains these config sections: ...
by Pratik M Mahajan
Note that you must select NotifyIcon1 from the ToolBox and set any icon to its icon property plus make 3 buttons or you can write minimize to tray code in the form closing event.Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, _ ByVal e As...
by FrostedSyntax
Regex patterns that will condense multiple spaces, tabs or line breaks into a single space, tab, or line break.
by joejames111
Raw input 64-bit .NET classes.
by Jalapeno Bob
Grouping and sorting in a WinForm listview fails in a WPF application unless Visual Styles are enabled.
by Pritam Deshmukh
This tip elaborates few useful tricks and shortcuts of VS 2013 mainly for professional edition (You can find them with Ultimate version too).
by Allegra Angelo
This tip intends to discuss how to rename multiple files in VB.NET.
by Shabra
How to use Resx files to internationalize your code
by carcabot
Multi Language Switcher Dynamically written in WPF VB.NET using XMLDataProvider
by AspDotNetDev
Lambdas can be composed of multiple lines of code.
by Padanian
A panel switch replica, resembling electro-mechanical toggle of a switchboard box
by Anshul R
Handle code redundancy for many controls in one subroutine
by Simon_Whale
why not just create a custom handler for all the textboxes? addhandler textbox1.textchanged, addressof textchangedhandler addhandler textbox2.textchanged, addressof textchangedhandler .... 'add additional textbox handlers .... addhandler textbox7.textchanged, addressof...
by Sion Cohen
An elegant programmatic solution for having multiple indexers in C#
by Adam A Black
MVC HtmlHelper for HTML5 datalist Tag
by JoelDz
This tip shows a control for Windows Forms called MySwitch. This is done in Visual Basic .NET 2013.
by rolandomontero
MySQL Connector for Visual Basic, obtaining a data table
by AspDotNetDev
The Silverlight WebBrowser won't navigate to some URL's, but this can be worked around.
by karenpayne
Using newer conventions of coding in VS2010 and higher
by #realJSOP
One way to guarantee uniqueness and avoid misspelling your session variable names
by bruno1234
I prefer to wrap my session variables like this:public class MySession { public string MyValue { get { return Convert.ToString(Session["MyValue"]); } set { Session["MyValue"] = value; } }}
by AspDotNetDev
This can be automated and streamlined with generics. First, create a SessionVariable class:public class SessionVariable{ private string VariableName { get; set; } private System.Web.SessionState.HttpSessionState Session { get; set; } public T Value { get ...
by Ziad J.khan
You can find a much more advanced version of this here:http://univar.codeplex.com[^]The version provided on the download page is soon to be deprecated by the upcoming version 2.0b however. The latter is available here instead:http://univar.codeplex.com/SourceControl/list/changesets[^]
by Erich Ledesma
I came with another one. I happen to love Lambda expressions. The idea is to extend this base class:public class SafeSessionBase{ HttpSessionState _session; public SafeSessionBase(HttpSessionState session) { _session = session; } protected TResult...
by Anthony Daly
Download source - 30 KBDownload library - 5 KBIntroductionThis set of Non-Repeatable Collections has a very simple concept - to only allow one item of each type to be added, meaning that you cannot have duplicate items in the collection.BackgroundAlthough the .NET Framework...
by Eugene Sichkar
Actually .net 3.5 have non-repeatable collection class - HashSet class and ISet interface.
by Sander Rossel
On the importance of Option Strict...
by ADemontis
An overview on how to interrogate Dall-E in VB.NET
by Shivi Gupta Lucknow
Using EP plus, an Excel file is loaded onto a Windows Form with multiple sheets as buttons aligned horizontally below the gird, to give the look and feel of an Excel sheet.
by taha bahraminezhad Jooneghani
Problem around .first() method in EF and a good solution
by Gun Gun Febrianza
Parental control app.
by marc9889
This is an example of one way to parse an HTML document by using a recursive function. In this example, an html document is loaded from a text file, but the code also demonstrates (in remarks) using a web page as a source file.When the recursive function is called, a conditional statement...
by marc9889
In response to the request to use a website (instead of a file), the pertinent code is shown below. Note that you will need to replace "www.somewebsite.com" with the website page that you want to capture the source code (HTML, for example) from.Dim webclient As System.Net.WebClient = New...
by ac-2008
Maybe this would have saved you some efforts: http://developer.mindtouch.com/SgmlReader[^]. I have already developed a project (Delivery Predictor) with this reader: http://achristov.info/Projects.aspx[^]
by Bhanu Pratap Singh Rathore
This tip contains easy steps to extract XML data from URLs in VB.NET
by Mike Meinz
PartnerTech provides a 32-bit DLL and a 64-bit DLL for communicating with the CD-7220 Series Customer Display in true USB mode. This tip demonstrates a .NET class that can be used to provide an easy way to access the PartnerTech-provided 32-bit DLL.
by OriginalGriff
If you try to pass a DbNull.Value to an SQL Image column, you get an exception: "Operand type clash: nvarchar is incompatible with image" - not sure why it's throwing that, but it can be done.
by FranciskaR
Extract pages from a .pdf file and save as bitmaps
by jkluge
How to compute a 2D Fourier Transform using the nuget package "mathnet.numerics"
by RoarkDude
Generate every permutation of dictionary items.
by Mirzakhmet Syzdykov
Development process in few steps with the help of scripting software
by jadon1979
Ever want to pin a file to the Start Menu? This is a simple class I built that allows you to do just that. It works on XP, Vista, and Windows 7. I've included a small example at the bottom of this post.#Region " Pinner Class " Public Class smPinner Private _isPinned As...
by Tino Fourie
Retain a plotted location on an image while zooming in(+)/out(-).
by Reader Man San
Plug-in Architecture To Work in WinForms MVC + WPF MVVM + ASP.NET MVC + Mobile (Xamarin MVC/PhoneGap MVC) + Win 10 Universal App MVC
by Mike_1989
The following code populates a mainmenu within VB.Net dynamically using recursion, until all items are added to the main menu
by Peter BCKR
In legacy applications you can get a MissingMemberException bei acessing a SqlParameterCollection if you work with object-variables there are reference a SqlCommand-Instance.
by Ali Al Omairi(Abu AlHassan)
Overwriting the __doPostBack() function to target the post-back form according to eventTarget
by Santiago Santos Cortizo
by Santhosh Kumar Jayaraman
This is an alternative for "Previewing Image in ASP.NET Image Control"
by Michael_Davies
Printing To Line Printers (EPOS) Using Windows
by chkmos
by SSDiver2112
Here is an alternate I like to use. Private Function TranslateFileSize(ByVal size As Double) As String Try Dim filesizename() As String = {" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB"} Dim pow As Double = Math.Floor(Math.Log(size,...
by DaveAuld
You can keep your output consistent with how Windows represents file sizes by using the inbuilt function;StrFormatByteSizeThe following code will dump the files from the root of C:\, Call getFilesAndSizes from a button click or wherever you want. ...
by heinrich4J
Print to DotMatrix in VB.NET
by loody
Windows OS doesn't seem to support charset-1001 for Arabic characters, the following Tip will provide an example and working VB.NET class to do the translation manually.
by Benjamin Lifshitz
With this code, you can print images quickly and efficiently, using the largest part of the A4 page for your image.
by Zac Newman
Easy to ready printing options for vb.net
by Ing. Alberto Tognacca
You will learn all the steps for programming a Thumbnail Toolbar with buttons.
by Jeffijoe
Writing properly formatted, grammatically correct, translatable UI messages
by peterswinkels
A Visual Basic 6 program demonstrating how to access databases using Microsoft ADO and how to automate Outlook and Excel.
by Wendelius
This tip shows one way to query hierarchical data from a DataTable by using an AsTree() method.
by DaveAuld
The Dictionary class does not have inbuilt sort functionality and I was looking for a simple way to sort on the Values within the collection.After searching google, it became clear that there are several ways to achieve this, from implementing Lists, using LookUps and even making use of...
by DaveAuld
Using Enum to provide a quick and easy option lists
by ChunkyStool
In C#, I just call ToString to get the name. It's quicker and dirtier...namespace EnumTest{ using System; using System.Linq; enum ListOfChoices : int { Yes, No, Possibly, Never, Pass } class Program { ...
by Anshul R
Quick way to read RSS
by Michael L L
Keep those RDP sessions alive and unlocked
by cass3000
Read n bytes from the serial port in .net
by jkluge
Fast reading/writing of bitmap data in VB.NET using pointers
by Enver Maroshi
Zero-index will return monday (or any other day based on FirstDayOfWeek in culture)
by evry1falls
Receiving response correctly from pop mail server is the first step on receiving emails to your own email client.
by Prerak Patel
To get recent tweets of any user just with a tag. No code is required.
by db7uk
Region adapters in VB.NET
by alisissa
When you are working on a windows application and deploying your solution every now and then, you should be aware on not deleting all files on reinstall like the database file and some files generated by the user.But when changing you application setup project version number you will notice...
by linebenchmark
Remove all blank lines, containing or not spaces:^:b*$\n
by Ziv Nitzan
There is also a Visual Studio extention called CodeMaid that has a lot of cleaning options http://bit.ly/diMTaR
by karenpayne
This VS2008 or higher extension uses a LINQ statement to remove duplicate items from a string array but is not case sensitive, also you might like to leave the sort/order-by in the extension or remove it.ExampleDim Names() As String = {"Bob", "Mary", "bob", "Bob", "Jane", "Kevin",...
by Ramanujam Shankar
Remove Notifyicon from system tray while closing the application from external application (killing proccess from another application)
by Toniyo Jackson
Removing (Deleting) Querystring in ASP.NET
by Kayosblade
Quickly rename thousands of labels in a Designer File without manual intervention
by Gregory Morse
Rendering Qur'anic (complex Arabic) scripts with Unicode in a PDF
by Ahmad Dekmak
In this project we learn how to resign a signed assembly with another one of your choice
by Andy De Filippo
Draw a shape-like editor implementing the use of anchors to resize and rotate a selection rectangle
by Premraj M
Normally, whenever a form is posted backed, the password field will clear. But we dont want it to do that. In that scenario, we can add a little bit of code will avoid the issue.Retain Password In VB.NETProtected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)...
by bEGI23
Retrieve information about your IP from a website.
by sanjay30
Retrieving the COM class factory for component with CLSID
by hemantwithu
How to reverse a string without using the Reverse function in C# and VB.
by Prerak Patel
What is new in this age old method? We can use LINQ too.Dim inputString As String = "Reverse me"Dim input() As Char = inputString.ToCharArrayDim result As String = New String((From i As Integer In Enumerable.Range(1, input.Length) _ Select...
by #realJSOP
I wouldn't create a class for this. I'd make it an extension method, and then do this:public static class String Extensions{ public static string Reverse(this string value) { value = // do your reverse code here; return value; }}// Usage:string x...
by Mohammad A Rahman
Another way,public static class ReverseStringExtension{ public static string Reverse(this string dataToRevese) { Func reverseFunc = (dataToFunc) => { StringBuilder reverseBuilder = new StringBuilder(); for (int index =...
by jfriedman
/// /// Reverses an array (Change the type or use SetItem)/// /// The bytes/// The index in the bytes/// The length of bytes to reverseinternal static void Reverse(char[] array, int...
by Markus Wallner-Novak
Short example of highlighting a grid row on textbox got focus
by Ramanujam Shankar
Remove the triangle and star symbol from the row header in a DataGridView.
by William Dyson
RSS Reader
by The Tigerman
Work in progress, but a simple HTML to RTF converter
by DerStauner
With this library it is possible to query datatables with SQL commands.
by Mike Meinz
Provides a sample program using Google APIs for .NET V3 with YouTube
by Emiliano Musso
How to save DataGrid column's properties for further re-use
by DidiKunz
Save a 32-Bit RGBA-Bitmap in the Truevision Targa Format
by Anshul R
Saving a form's settings
by William Winner
Here's an alternate: a custom class that is serializable to store all of that in instead of a single string that you'd then have to parse.Or store it all in an XML file. There are plenty of object-oriented ways to go about this that would be much more readable than just storing it all in a...
by _Niharika Saxena
Schedule task in windows 7
by Joshi, Rushikesh
Scope of Return Statement, Reachable Code and Behavior in Finally Block
by Manoj K Bhoir
Why another Scroll Bar? The standard ScrollBar is too limited in functionality and I couldn't find a custom control written that did all that I wanted. This is a User Control with Microsoft Office 2007 Visual Style.
by phil2415
How to modify an ASP.NET GridView so that clicking anywhere in a row will select that row.
by ManojRajan
This tutorial explains how to send mails with attachments
by Mike 2005
Code to include in a deployment project
by Andrewiski
A modified version of SendKeys to allow sending of keyboard input to Citrix
by özk@n
Serialization for program settings.
by Abdallah Al-Dalleh
by Allegra Angelo
Save, read and text recognition of network parameters
by Gopal Krishna Ranjan
Set Width of gridview columns dynamically when AutoGenerateColumns=“true”
by #realJSOP
Avoid exceptions when setting enumerators from unknown/untrusted sources.
by Ramanujam Shankar
How to set focus on another application using the process name
by marc9889
Extracting a value from a list item in a SharePoint site is frequently necessary, and it comes with a slight twist that some programmers may not be expecting. So, this is an example of a method that works well for most purposes. First, lets identify the site that holds our SharePoint...
by Florin Pănescu
This example shows how to use SharpCompress library with TreeView & ListView.
by headshot9x
How to create ShoppingCart using Gridview in asp.net with code VB
by Prerak Patel
Here you'll fine many more..http://www.codinghorror.com/blog/files/Visual%20Studio%20.NET%202005%20Keyboard%20Shortcuts.htm[^]
by Behzad Talebpour
Alternatively, you can erase your closing bracket (}) and VS will format the whole block (between opening & closing bracket). This works only if there is no syntax error in that block.
by Tantum
How to show your forms in the current active display on dual (or more) monitors
by furytrader
Using .Net's Async/Await Framework To Create ProgressBar
by M.Ardekanian
A simple and easy way to implement uploading file with progress info to an ASP.NET page.
by hussam.it
Simple Word Document File Viewer
by Nejimon CR
Make irregular splash screens without writing a single line of code!
by Sharp Ninja
Threading can be a daunting topic. This library takes much of the worry (and mistakes) out of multi-threaded application programming.
by Evgeniy Sukhikh
The most elegant implementation for VB.NET and safe as simple
by psychohamster
This article will show you how to use the Sizable CheckBox control I have designed.
by Thava Rajan
Prepare script for specific objects
by Bob L.
This is a simple VB.NET class that encapsulates the sending of e-mail messages via SMTP.
by rnbergren
Gives a run down of how to sort parameters for sharepoint lists selections
by Pratik M Mahajan
Public Class Form1 '********************************************************************************************************************************* 'I am just printing messagebox 'you can replace this with other calling values 'for eg. Dim com As New OleDbCommand ' ...
by Atulkumar P Patel
Anti Patterns are wrong practice followed by Developers. They are opposite to Design Patterns.
by bluesathish
Fastest and most efficient method to insert large amount of records to a SQL Server database from our system generated datatable.
by THE BLACK TIGER
Thank you for this article, okay it's technical.But we can use other methods considered as more efficient. *For Microsoft SQL Server, we can use bulk copy program(bcp). The tool is embeddedwithin SQL server so you can invoke it inside your application - whatever language you use....
by jasonalls
SQL Server Express Membership API Provider Utility
by Simon Korenfeld
SQL schema with multi version tables support
by Hernán Hegykozi
Show you how to make a connection dialog developed completely from scratch.
by joe_j
Export SQL table data into Excel and open the excel file on the client side.
by Suryakant S. Bharne
SSIS Script task to copy Table Object with data from one MSSQL server to another using Transfer SQL Server
by Tieske8
Fast conversion between strings and byte arrays, while bypassing the codepage limitations
by jocko3d
The TestConversion function is not valid. The line of code "data = data & Chr(n)" uses the Chr function to build a string of characters used for the test. The problem is that the Chr function is itself bound to a code page. Specifically, it will utilize the code page that is in use by the...
by dyma
Sunflower fractal, so that you can play and create a wonderful image
by Kelvin Armstrong
GUI application for running SVCUtil to generate service model code
by Mike Meinz
This sample program demonstrates how to use Google Calendar API v3 to delete Google Calendar events, insert Google Calendar events and update Google calendar events based on a .CSV file exported from Calendar Creator.
by Emmery Chrisco
Tabbed Browser Control addon
by Nosey Parker
TcpClient.BeginConnect with timeout
by Dominick Marciano
Validate phone number according to the North American Numbering Plan
by Gregory Gadow
Test if a TreeNode was expanded or collapsed rather than actually clicked.
by Alaa Ben Fatma
Choose your text maximum length programmatically and show a message whenever the length = the maximum length
by Taucher Christoph
WindowsForm Textbox with custom Autocomplete function
by Dev O'Connor
An extension to the textbox control to offer textbox validation without the need to constantly apply code using regular expressions.
by Sushil Pandit
Process for backward migration of code from TFS 2012 to TFS 2010
by open-collar
Download source (55.5 KB)IntroductionThe "using" block in C# and VB.NET can be used as a high-level language construct, not just as a way of tidying-up. In this article I show you how to capture and restore state using constructors and disposers.BackgroundIn any substantial...
by sujit agarwal
read this article if you really are a code snippet freak...
by User 7592706
Freezing the Windows Cursor is done in an easy "one-liner"
by Yashwanth R
To fetch the ID of a grid view control which is inside a User Control
by Johnny J.
A VB conversion of a C# Transparent Label control
by Anshul R
Label1.Paren...
by Jyothikarthik_N
A simpler way to parse a URL address string in VB.NET as URL itself and fetch query string values
by mycenean
Creating a simple color selector dialog
by Duncan Edwards Jones
How to unit test a class that implements INotifyPropertyChanged
by Duncan Edwards Jones
An example of a unity test that tests an object serialises
by BeardyMcBeardFace
How to update a UI element from multiple threads
by Jacob Himes
An automated approach to updating business models intelligently, by updating a destination model with a source model only on properties whose values differ.
by Chamila Nishantha
Guide to upload files to Box using Box API
by Prabakaran T
Ultimate USB Reset Attribute with powerful option
by Bill9603
Many developers use ".cur" cursor files. Using them myself in Visual Studio 2008, they are not the easiest things to work with for many reasons.They are not easy to create without expensive software. (unless you are using the editor within Visual Studio)They cannot easily be ported in the...
by Michael B. Erickson
Control the changes to structured data exposes by your .NET objects
by sujit agarwal
This trick is really meant for novice programmers...
by Jack Z. Stone
How to use Xaml.XamlServices to serialize or deserialize a DependencyObject.
by Prince Tegaton
Building a Custom User Control for Messagebox
by aref.bozorgmehr
How to use a Persian datetime picker and calendar in your applications.
by LarryCharlton
A VB.NET example of Cortana UI and application service
by Wombaticus
A beginner's introduction to using data classes in ASP.NET.
by heemanshubhalla
How to use Masked Textbox control in .NET
by LarryCharlton
Using system, named, and hex color values
by umair zubairy
using Remote Attribute in MVC, vb.net
by Martin Ton
SHA1 and MD5 class for net version.
by Gregory Morse
How to use uniscribe from VB.NET
by Shekhar Pankaj
Using Web Configs Key Value pair in classical Asp pages
by Member 2650270
Code to validate a CSV file in VB.NET.
by Ehsan Valizadeh
This code will validate a password on the server side. ;) Imports System.Text.RegularExpressionsPublic Class PasswordAdvisor Enum PasswordScore Blank = 0 VeryWeak = 1 Weak = 2 Medium = 3 Strong = 4 VeryStrong = 5 End Enum ...
by vblover Programmer
Custom DropDownBox with all languages of the world to select a language.Save and reload Selected language using Application Settings
by vblover Programmer
Load Menu from Resource-Only DLL (created by VC++) and Set for Form As MainMenu by API Functions.
by lorekd
Leveraging the built in LSet statement, along with user-defined types, to implement a class to translate binary data to/from simple data types
by Member 10974085
VB.NET - A different approach to creating control arrays - Create controls at Design time, process them as a control array with shared event handlers
by VyReN
Using VB.NET's RichTextBox and fitting all text into the box
by Member 10974085
VB.NET - Resize and Reposition all controls when Form is resized
by Logicisme
Mimic Excel Slope and Intercept functions for datasets
by IssamK
How to automatically generate classes for your database tables
by fah_q_2007
Creating Code 128B barcodes with VB.NET
by Member 10168565
How to send emails based on RTF templates containing images and attachments, while giving the user the possibility to modify the content before sending
by iupax80
ITAPI, TAPI Incoming call and caller ID/Caller Number show
by Jo_vb.net
How to get started using the MVVM Toolkit
by andrewbb@gmail.com
Includes most API functions except for graphical ones.
by andrewbb@gmail.com
Includes most API functions except for graphics.
by PyroStrex
Example of loading external scripting and external XAML with VB.NET and NeoLua
by vblover Programmer
Adding ContextMenu's MenuItem to the SystemMenu of Form in Windows Forms Application
by algor-AG
VBA : encrypted / password protected PDF for MS Office
by Clifford Nelson
VBA Code that will take a string and attempt to pull out the company name, street address, city, state, zip code, phone number, and web address
by Аslam Iqbal
Very simple way to restore form window to its previous state
by RMittelman
Here is a way to do this without using the registry.In the project's properties, Settings pane, add the following settings. You can name these settings anything you want, but use the same setting name in the code shown below:Name: MainWindowStateType:...
by Edgemeal
Here's another way. This saves the form's normal WindowState settings, so you can still save even if the form is minimized, and it can be used for any form. It also includes a sub to keep forms inside the desktop area.Check the Regpath string before using!...
by MarcusCole6833
Visual Basic SQL to XML
by DerekT-P
Detection and reporting of website environment under IIS
by KRISHNA PRASAD.N
This paper would provide a small code snippet which will report all files from VSS (Visual SourceSafe 6.0) with shared reference instances. It will be useful for migrating files from VSS to TFS.
by prodrigues1990
Easy Assembly Version reflecting SVN working revision
by jleonorlane
Architecture Tools in VS 2010 supports UML (Unified Modeling Language 2.1.1) diagrams to help you understand your application, such as the Architecture Explorer and Dependency Graphs.To create the following UML diagrams, as well as to use the Architecture Explorer, requires Visual Studio...
by Joao Tito Livio
Introduction...
by Mike 2005
In Design Mode a form suddenly fails to display its controls even though the project continues to work normally.
by Member1978
How to use Resources in Visual Studio.
by Mr. xieguigang 谢桂纲
How to use pipeline feature for linux programming
by Marcello Cantelmo
Function Sqrt(ByVal value As BigInteger) As BigInteger Dim a As BigInteger = BigInteger.One Dim b As BigInteger = (value >> 5) + 8 While (b.CompareTo(a) >= 0) Dim m As BigInteger = BigInteger.Add(a, b) >> 1 If (BigInteger.Multiply(m,...
by ARNOULT
Visual Studio 2010 Macro : Collapse all sections of code between 2 lines of comment
by mozwizard
Out of frustration comes simplicity ...
by Jems_007
The tip is for those who getting application hang/freeze issue in web browser control.
by me.ajaykumar
How to convert a web page to PDF or image
by jasper.mandos
/// /// Stuct for the ISO 8601 week date/// /// /// See:/// See:/// Algorithm:<see...
by Richard MacCutchan
Week numbers according to ISO8601
by Luc Pattyn
This is an alternative to "Week Numbers According to ISO8601".
by juwikuang
Weighted Quick Union Find in C#, VB.NET and F#
by Bhushan Mulmule
ArrayList is a non-generic collection class and resides in System.Collection namespace whereas List is a generic class and resides in System.Collections.Generic namespace
by Koshy Panicker John
Different Method(s) to Find IP Address?
by Mohammad A Rahman
namespace IpAddresses{ using System; using System.Collections.Generic; using System.Linq; using System.Net; class Program { static void Main(string[] args) { GetIPAddresses().ForEach(ip => Console.WriteLine(ip)); } ...
by Archimedes24
I find this useful:Dim st As System.IO.StreamDim sr As System.IO.StreamReaderDim req As System.Net.WebRequest = System.Net.WebRequest.Create("http://www.whatismyip.com/automation/n09230945.asp")Dim resp As System.Net.WebResponse = req.GetResponsest = resp.GetResponseStreamsr =...
by Anshul R
Private Sub GetIPAddress()Dim strHostName As StringDim strIPAddress As StringstrHostName = System.Net.Dns.GetHostName()strIPAddress = System.Net.Dns.Resolve(strHostName).AddressList(0).ToString()MessageBox.Show("Host Name: " & strHostName & "; IP Address: " &...
by nlarson11
On Vista/Win 7, I have seen code where only a single period is returned for (0). This makes sure you get the actual IP regardless of the system.Const IPPattern As String = "^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$"With Dns.GetHostEntry(System.Environment.MachineName) Return...
by Dinesh Kr. Choudhary
protected void Page_Load(object sender, EventArgs e){ HttpBrowserCapabilities bc = Request.Browser; Label1.Text = "IP Address=" + Request.UserHostAddress;}
by RayD111
Dim ipE As System.Net.IPHostEntry = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName) Dim AL As Array = Dns.GetHostEntry(vWrkStn).AddressList Dim A As IPAddress For Each A In AL If A.AddressFamily = Sockets.AddressFamily.InterNetwork Then ...
by Hisham Abdullah Bin Ateya
This is some of cool stuff that shipped with Visual Studio.NET 2013 Preview release
by Afzaal Ahmad Zeeshan
A slight comparison of ASP.NET upon other (web) programming languages in the market and a discussion of me and some other (web) programming language developers.
by Alexandros Pappas
Lists the files that are installed with Windows 7 on a Virtual PC
by Farid Alkorashy
Windows OS Version Detector, detects more than 65 different versions of Windows OS
by Alexandros Pappas
Windows Services cannot create more than a certain number of processes, whereas Console Applications seem not to have a limit.
by Jo_vb.net
My idea was to host a WPF user control with Ribbon within a WinForm VB.NET project and try to use MVVM pattern.
by Jamie Highfield
WinForms .NET Time Chooser grid control.
by Can SARIGÜL
WMI Reader, also includes known WMI list.
by LarryCharlton
Getting started with customizing the WPF DataForm.
by Meshack Musundi
How to highlight TextBlock text using attached properties
by fadi_sayyed
WPF Compare two brushes IsEquals
by Cees Verburg
Writing /reading Unicode Characters and INI files in ASCII format
by codiemorgan
When you want your Texture2D resource to download from the Internet
by adriancs
An Office 2010 Style Color Picker for .NET WinForm.