Write text files without Byte Order Mark (BOM)?

In order to omit the byte order mark (BOM), your stream must use an instance of UTF8Encoding other than System.Text.Encoding.UTF8 (which is configured to generate a BOM). There are two easy ways to do this: 1. Explicitly specifying a suitable encoding: Call the UTF8Encoding constructor with False for the encoderShouldEmitUTF8Identifier parameter. Pass the UTF8Encoding instance … Read more

VB6 keyword Set what does it mean?

Set is assigning a new reference to the AST variable, rather than assigning a value to (the object currently referenced by AST)’s default property. There’s not much VB 6 documentation around on the web, but1 some of the help for VB.Net still references the older ways. See Default Property Changed for Visual Basic 6 Users: … Read more

AndAlso/OrElse in VBA

The only short circuiting (of a sort) is within Case expression evaluation, so the following ungainly statement does what I think you’re asking; Select Case True Case (myObject Is Nothing), Not myObject.test() MsgBox “no instance or test == false” Case Else MsgBox “got instance & test == true” End Select End Sub

Webpage works in IE, Chrome and Firefox, but not when using the .NET WebBrowser control

It has probably got to do with that the WebBrowser control by default uses a document emulation mode of IE 7, meaning all pages are handled using the Internet Explorer 7 engine. Since that version is quite old most websites today are not compatible with it, which affects the functionality when you visit the page. … Read more

How to programmatically add controls to a form in VB.NET

Yes. Private Sub MyForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim MyTextbox as New Textbox With MyTextbox .Size = New Size(100,20) .Location = New Point(20,20) End With AddHandler MyTextbox.TextChanged, AddressOf MyTextbox_Changed Me.Controls.Add(MyTextbox) ‘Without a help environment for an intelli sense substitution ‘the address name and the methods name ‘cannot be wrote in … Read more

Installer with Online Registration for Windows Application

One-Shot Setups: “A setup is run once, an application can be started again – in order to resolve and debug problems interactively – with meaningful error messages show to the user.“ Hence: avoid license validation in the setup. Short version on licensing. License Key: Preferring to deal with license keys in your application seems logical … Read more