Categories
Tips and Tricks Windows

Visual Basic .NET Operator ! From C#

The C# operator ! is equivalent with the Visual Basic .NET “Not” operator In C# you can use the operation like this bool Var = true; Var = !Var And for Visual Basic .NET Dim Var As Boolean = True Var = Not Var

Categories
Tips and Tricks Windows

VB.NET Draw On Form Outside form1_paint() Function

In Visual Studio VB.net Form project you can draw on the form simple by doing this is the Form1_Paint function and then using the e As System.Windows.Forms.PaintEventArgs like this: Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint e.DrawImage(Image.FromFile(“background.png”), New PointF(0, 0))  End Sub To draw on the form outside of the form1_paint, […]

Categories
Tips and Tricks Windows

VB.net String Compare Not Equal

To compare to string in VB.net like many other language you can’t just use the equal sign = You have to use the .equal() function Dim firstString As String = “test” Dim secondString As String = “test” If (firstString.Equals(secondString)) Then ‘ code End If Now to set this to not equal to you could simply use […]