November 10, 2003

WinForms Controls—Creating Control Arrays in VB.NET

ne of the VB6 features that are no longer supported in VB.NET is the automated creation of control arrays by simply copying an existing control as many times as required into an array. There is existing literature in MSDN which illustrates how to create control arrays at run time, but

JoinBinaryFiles – Joining a variable number of binary files into a single file

‘ Join a variable number of binary files into a single file” Params:’ – resultFile: the complete path of the result file you want to create’ – sourceFiles: the sequence of files whose content will be joined together” Example:’ JoinBinaryFiles(“D:Test.bin”, “D:Source1.bin”, “D:Source2.bin”,’ “D:Source3.bin”)Sub JoinBinaryFiles(ByVal resultFile As String, ByVal ParamArray sourceFiles()

ImageFormatUtils class – Find the ImageFormat for a filename or MIME type

‘/// ‘/// Provides static (Shared) methods to find the’/// ImageFormat for a filename or MIME type.’/// Public NotInheritable Class ImageFormatUtils Private Shared codecs() As ImageCodecInfo Private Shared formats As Hashtable Shared Sub New() ‘// Get a combined list of all codecs Dim encoders() As ImageCodecInfo = ImageCodecInfo.GetImageEncoders() If encoders Is

Changing the font for the VS.NET IDE’s dialogs and windows

If you do presentations/trainings and have to use VS.NET, and actually want your students to see the text on the IDE’s windows and dialog, you’d be better off changing the default font. You have two ways to do this: Start the IDE by launching devenv.exe with the /fn and /fs