Click here to Skip to main content
15,886,873 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 Updated

Visual Basic 

9 Jul 2011 by #realJSOP
Avoid exceptions when setting enumerators from unknown/untrusted sources.
23 Jun 2011 by #realJSOP
One way to guarantee uniqueness and avoid misspelling your session variable names
23 Jul 2011 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...
10 Nov 2011 by #realJSOP
This is an alternative to "DataSet to String to DataSet".
3 Dec 2010 by -james
Iterate through the results and extract using system.reflection
5 Jul 2016 by _Matt_Wilkinson_
How to centralise a Form when using multiple screens
30 Aug 2013 by _Niharika Saxena
Schedule task in windows 7
22 Jun 2012 by A. Ganzer
Using snippets to create a full and correct implementation of complex interfaces
25 Jun 2011 by a_pess
Draw to Screen without using API
22 May 2014 by a_pess
ThreadSafe Generic List
12 Dec 2010 by aaroncampf
14 Aug 2012 by Abdul Quader Mamun
Convenient way to remove items from list when items exist in second list.
5 Jun 2012 by Abed AlSayed
AlSayed ColorBar is a TrackBar best for professional color picker, like the one used in Adobe Photoshop.
28 Sep 2011 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[^]
8 Sep 2015 by Adam A Black
MVC HtmlHelper for HTML5 datalist Tag
17 Aug 2013 by adriancs
An Office 2010 Style Color Picker for .NET WinForm.
13 Sep 2014 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.
18 Dec 2012 by Ahmad Dekmak
In this project we learn how to resign a signed assembly with another one of your choice
30 May 2012 by Ahsan Murshed
This article gives ideas to developers to increase development time productivity using the free Visual Studio 2010 extensions.
24 Jan 2011 by ahsan sarfraz
Convert a Dataset to bytes array and then compress that array.
4 Mar 2013 by Ajit Amare
Get the viewable text for your textbox.
6 Jul 2012 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.
31 May 2015 by Alaa Ben Fatma
Choose your text maximum length programmatically and show a message whenever the length = the maximum length
26 Jul 2015 by Alaa Ben Fatma
Generate your arrays using a GUI tool
24 Sep 2010 by Alan Burkhart
27 Sep 2010 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...
10 Nov 2011 by Alan Tuscano
Converting DataSet to String to DataSet
17 Aug 2014 by Alejandro Gaio
A simple solution to a serialization problem with IBindingList-implementer classes.
27 Jun 2011 by Alexandros Pappas
This tool reads the descriptions of the columns of the SQL server and creates a Word document using SoftArtisans' WordWriter.
29 Jun 2011 by Alexandros Pappas
Display of a context menu when pressing the Apps key in a DevExpress GridControl
1 Jul 2013 by Alexandros Pappas
This project measures performance of the DataTable.Merge method.
12 Nov 2014 by Alexandros Pappas
Lists the files that are installed with Windows 7 on a Virtual PC
20 Jan 2016 by Alexandros Pappas
Windows Services cannot create more than a certain number of processes, whereas Console Applications seem not to have a limit.
15 Jul 2014 by AlexF185
A dynamic progress bar control easy to use and literally plug and play
19 May 2015 by algor-AG
VBA : encrypted / password protected PDF for MS Office
9 May 2012 by Ali Al Omairi(Abu AlHassan)
Overwriting the __doPostBack() function to target the post-back form according to eventTarget
17 Oct 2013 by Alireza C
I want to show how we can export data from data table to Excel simply.
17 Feb 2010 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...
1 Dec 2022 by Allegra Angelo
This tip intends to discuss how to rename multiple files in VB.NET.
22 Nov 2021 by Allegra Angelo
Create a multipage TIFF image from images
24 Jan 2024 by Allegra Angelo
Save, read and text recognition of network parameters
8 Jul 2011 by Amey1202
In WPF, just set the ToolPanelView property of CrystalReportViewer to None. That is enough.
19 Dec 2010 by Amit Kumar Tiwari
Fixed or Sticky header or ASP.NET webpage
19 Jun 2012 by Andreas Gieriet
This is an alternative for "Call Functions Until One Meets Condition"
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...
7 May 2012 by andrewbb@gmail.com
Includes most API functions except for graphical ones.
15 Apr 2012 by andrewbb@gmail.com
Includes most API functions except for graphics.
6 Jan 2012 by Andrewiski
A modified version of SendKeys to allow sending of keyboard input to Citrix
9 Dec 2021 by Andy De Filippo
Draw a shape-like editor implementing the use of anchors to resize and rotate a selection rectangle
10 Jun 2010 by Anshul R
Label1.Paren...
10 Jun 2010 by Anshul R
Converts a given decimal number to fraction
10 Jun 2010 by Anshul R
A class for N-Digit Arithmetic
10 Jun 2010 by Anshul R
Shortcut for Commenting
10 Jun 2010 by Anshul R
The Perfect Translation/Conversion of Code
21 Jun 2010 by Anshul R
Saving a form's settings
24 May 2011 by Anshul R
Handle code redundancy for many controls in one subroutine
21 Sep 2011 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: " &...
14 Mar 2013 by Anshul R
Quick way to read RSS
4 Apr 2010 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...
9 Sep 2013 by Anthony Daly
A simple library for dealing with unhandled exceptions, with email support.
19 Jul 2019 by Anurag Gandhi
An Excel macro that generates SQL insert script that can be executed against database directly
20 Sep 2011 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 =...
19 Jun 2013 by aref.bozorgmehr
How to use a Persian datetime picker and calendar in your applications.
18 Aug 2013 by ARNOULT
Visual Studio 2010 Macro : Collapse all sections of code between 2 lines of comment
3 May 2012 by AshishSaxena19
Migration of a VB project which is using .tlb refrences, to VB.NET
2 Feb 2011 by AspDotNetDev
Lambdas can be composed of multiple lines of code.
3 Mar 2011 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.
1 May 2012 by AspDotNetDev
Call a series of functions until the return value meets a condition without a chained-if or short-circuiting.
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...
22 Jun 2011 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 ...
26 Sep 2011 by AspDotNetDev
The Silverlight WebBrowser won't navigate to some URL's, but this can be worked around.
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
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.
31 Aug 2012 by atamata
File renaming algorith to mimic Windows copy+paste renaming
16 Jul 2013 by Atulkumar P Patel
Anti Patterns are wrong practice followed by Developers. They are opposite to Design Patterns.
10 May 2010 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 ...
11 Sep 2016 by Avatar2400
This is a simple class that allows you to have message box with checkbox and other small features.
8 Jul 2014 by B.O.B.
How to get correct caret position from Textbox control
19 Nov 2015 by B.O.B.
A simple extension to add an item that has a data source bound to combobox.items
29 Mar 2012 by barrd
Fix an exception related to ISupportInitialize.BeginInit and learn why it happens.
22 Oct 2013 by Bashar Tahir
Easily zip / unzip files using Windows Shell32
18 Feb 2017 by BeardyMcBeardFace
How to update a UI element from multiple threads
5 Apr 2013 by bEGI23
Convert filesize (bytes) according to highest possible size scale (KB, MB, GB, TB, PB).
10 Mar 2013 by bEGI23
Retrieve information about your IP from a website.
17 Dec 2012 by bEGI23
This code allows to drag and resize a borderless form!
19 Oct 2010 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.
1 Jan 2015 by Benjamin Lifshitz
With this code, you can print images quickly and efficiently, using the largest part of the A4 page for your image.
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.
27 Dec 2017 by Bhanu Pratap Singh Rathore
This tip contains easy steps to extract XML data from URLs in VB.NET
14 Jan 2016 by Bhishma Anil Kajaria
Browse and Copy data from your CSV file to SQL directly without any Windows application...
21 Dec 2014 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
16 Mar 2010 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...
25 Dec 2011 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.
3 Jan 2012 by bluesathish
Fastest and most efficient method to insert large amount of records to a SQL Server database from our system generated datatable.