Click here to Skip to main content
15,881,665 members
Everything / Programming Languages / Visual Basic

Visual Basic

VB

Great Reads

by Fredrik Bornander
WPF Implementation of the spinning panel frequently used on the iPhone
by Steve Krile
Fully AJAX-enabled user control used to select names from a database in a drop-down format.
by Graeme_Grant
A Modern Toggle Switch - From mock concept to a full custom WPF control that you can plug into your own apps
by JosipK, Marko Kozlina
C# and VB.NET console applications that demonstrate how to create and send an email reply with IMAP and SMTP protocols in .NET Framework

Latest Articles

by Jo_vb.net
This article and the demo are about getting started using my Schafkopf_OOP VB.NET project.
by CODING_MLD
Expanding and collapsible panels implemented in VB.NET
by Allegra Angelo
Save, read and text recognition of network parameters
by Ralf Meier
This article revolutionizes Shelly device management, providing an updated, efficient, and feature-rich solution for both beginners and advanced users." You will discover new ShellyCom2 features, such as property manipulation using PropertyDescriptor, and a set of valuable helpers and commands.

All Articles

Sort by Title

Visual Basic 

9 Nov 2021 by Member 12660776
Programmatically Adding New ConfigurationSectionGroup Corrupts Declaration Section With Multiple Group Declarations.
19 Mar 2014 by Jacob Himes
My go around to an Entity Framework alternative
4 Nov 2013 by SimbarasheM
A .NET v4 Library for converting DataTable row(s) to JSON String for WCFServices
25 Jan 2012 by Louis van Tonder
Quick and easy way to add dropdown functionality to the listview.
8 Jul 2014 by B.O.B.
How to get correct caret position from Textbox control
15 Jul 2014 by AlexF185
A dynamic progress bar control easy to use and literally plug and play
4 May 2021 by Mr.Kim2050
How to convert .ts files to .mp4
5 Jun 2011 by thatraja
Display Date Time in 12/24 hour time format in C#/VB.NET
7 Feb 2014 by Subodh Raghav
In this tip, you will learn how to send an email in your ASP.NET application.
21 Apr 2016 by Subodh Raghav
A web service is a web application (a piece of software component) which is available on the internet.
19 Jun 2014 by Maciej Los
If you want to know the way you can serialize and deserialize custom class collection, this tip is for you.
3 Jun 2022 by Southmountain
This tip shares some lessons and thoughts after using this converter.
11 Nov 2017 by Herbert Lausmann
An IconBitmapEncoder that produces high-quality icons, written in VB.NET and C#, WPF
3 Nov 2014 by Paul M Cohen
A month/year date picker in VB.NET
6 Mar 2014 by LucaDN
Add zoom capabilities, grid and rulers to the standard WinForms PictureBox control
20 Dec 2015 by shijo joseph
An easy to implement yet powerful logging library which requires absolute zero learning curve
8 Jul 2010 by Stefan Huy
VBA Hashtable Visual Basic Queue FIFO
4 Apr 2012 by BorysT
This is an alternative for "A quick & simple VBA FIFO Queue Implementation"
8 Jul 2010 by Stefan Huy
VBA Hashtable Visual Basic Hash
8 Jul 2010 by Stefan Huy
VBA Hashtable Visual Basic Stack LIFO
3 May 2023 by Xavier Junqué i de Fortuny
A rational class to extend numeric functionality
2 Dec 2009 by bobishkindaguy
A simple entry box for various numbers, especially phone numbers.
10 Mar 2017 by CHill60
Simplify complex if-statements with "where value in list"
3 Feb 2011 by Prerak Patel
Type Character
31 Jan 2011 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[^]
30 Apr 2013 by Michael Rosqvist
If you want to measure something on the screen, here is a utility.
12 Apr 2011 by Morris Bahrami
A small example of how to list computers in your domain
12 Mar 2010 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...
16 Mar 2010 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 =...
23 Oct 2014 by Tantum
Access values of ProgressBar created at runtime
29 Oct 2013 by Mike-MadBadger
How to discover all the controls on a form at design time for a property editor
10 Jan 2011 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.
28 Aug 2012 by Curtis Hines
Convert EDI file terminators to CRLF
15 Jun 2015 by jurhas
An algorithm for sort alphanumerical strings in their own natural way
24 May 2014 by CHill60
Allowing a User to cancel a Form when Validation is in place and invalid data has been entered.
5 Jun 2012 by Abed AlSayed
AlSayed ColorBar is a TrackBar best for professional color picker, like the one used in Adobe Photoshop.
29 Jan 2019 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.
15 Jul 2013 by AspDotNetDev
In this alternate version, we take into account the possibility that binding to a list of different types may cause compile errors.
4 Nov 2015 by Casey Witt
A class for implementing BeginEdit/EndEdit functionality in a "Using" Block
29 Apr 2011 by dontumindit
An Easy Way To Query a Database
14 Feb 2011 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)) { ...
14 Feb 2011 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...
23 Feb 2011 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; ...
14 Feb 2011 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...
22 Aug 2014 by rmliu
Resize either images or canvas only, resize batch images
10 Jun 2014 by Thava Rajan
This tip is used to fix a workaround for a bug in double click on checkbox
19 May 2015 by Bhanu Pratap Singh Rathore
Animate Controls with ease using the MAnimation class developed by myself and can be used by anyone.
29 Jun 2011 by Alexandros Pappas
Display of a context menu when pressing the Apps key in a DevExpress GridControl
15 Nov 2015 by David Vanson
A small application to pretty print Arduino code with syntax highlighting
26 Jul 2015 by Alaa Ben Fatma
Generate your arrays using a GUI tool
18 Oct 2012 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.
18 Oct 2012 by AspDotNetDev
C# version
17 Jun 2015 by Chamila Nishantha
Multiple uploader control for ASP.NET applications
13 Nov 2013 by James Gabel
ASP.Net timed page reload on button click/form submission.
30 Dec 2015 by Tristan9
Better use async / await in web applications
14 Apr 2016 by veen_rp
This message will self destruct in 5 seconds...
12 Nov 2015 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.
1 Mar 2010 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...
15 Jan 2016 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)
14 Dec 2015 by bradyguy
Don't send your mail out using the wrong account
4 Aug 2016 by Duncan Edwards Jones
How to clear out a partition in an Azure table
13 Nov 2011 by Patil Kishor
Backup & Restore of SQL Server database using VB.NET
26 Oct 2015 by Hernán Hegykozi
This tip will show how to perform a backup and restore database from an application in VB.NET 2010.
13 Sep 2012 by CorvetteGuru
Backup Stored Procedures in SQL Server.
5 Aug 2015 by sreeyush sudhakaran
VB.NET code for Base64 Encoding and Decoding of Image files
20 Apr 2014 by Zhuyun Dai
Your build will fail if you print 'Error:' in your custom Build Events of Visual Studio.
12 Apr 2017 by Duncan Edwards Jones
Thoughts for writing code for the next developer to use (or how to apply the golden principle to code)
16 Jan 2012 by Robby Tendean
Simple implementation guide for log4net in a VB.NET web application.
3 Aug 2010 by Tim-bot
Simple calculation to determin a value at a percentage along a bell curve. Also with an offcenter curve intersection thing....
19 Jun 2018 by tmenier
An introduction to Flurl, an open-source .NET library for fluently building URLs
28 Nov 2016 by Zebedee Mason
Or why not both? This shows how.
25 Jun 2012 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.
8 Oct 2013 by Prashant.Tiwari
Must required functions for any Image manipulation task.
5 Jul 2012 by Matthias Böhnke
Bug Fixes for Reading Barcodes from an Image - III
14 Jan 2016 by Bhishma Anil Kajaria
Browse and Copy data from your CSV file to SQL directly without any Windows application...
30 Jan 2012 by Robby Tendean
How to bypass SSL certificate validation checking and restore it
8 Feb 2012 by Pascal Hubert
Looks like what I use!ServicePointManager.ServerCertificateValidationCallback = New RemoteCertificateValidationCallback(Function() True)
30 Jan 2015 by Emiliarge
Using FindWindow() and WindowFromPoint() to identify window, and SetWindowText(), MoveWindow(), SetForegroundWindow(), EnableWindow() to interact with it
6 Mar 2015 by Darkencrow
A multi-drawer style collapsable UI container
13 Feb 2010 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...
30 Oct 2012 by hajivalie
Call Form with string name
1 May 2012 by AspDotNetDev
Call a series of functions until the return value meets a condition without a chained-if or short-circuiting.
29 Mar 2011 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
2 Apr 2011 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...
6 Apr 2011 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 ...
24 Jun 2011 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...
19 Jun 2012 by Andreas Gieriet
This is an alternative for "Call Functions Until One Meets Condition"
25 Jun 2014 by SibeeshKV
Calling an ASMX webservice from other server using jquery and PHP
22 Sep 2016 by Farai Chikwetu
This tip describes how to capture audio and then replay it using Microsoft Direct Sound DLL.
14 Mar 2010 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...
5 Jul 2016 by _Matt_Wilkinson_
How to centralise a Form when using multiple screens
2 Nov 2011 by Patil Kishor
Change font & size of Crystal report dynamically
27 May 2012 by Yumashin Alex
This tip describes how to change DataGridView behavior concerning row resizing