Wednesday, 15 February 2017

Check Admin Or Not VB.NET + Source Code

Check Admin Or Not VB.NET + Source Code

Program :


Dim user As System.Security.Principal.IIdentity = System.Security.Principal.WindowsIdentity.GetCurrent()

        Dim principal As New System.Security.Principal.WindowsPrincipal(CType(user, System.Security.Principal.WindowsIdentity))

        If principal.IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator) Then
            MsgBox("Admin Account", MsgBoxStyle.Information)
        Else
            MsgBox("Normal Account", MsgBoxStyle.Information)
        End If

USB Freezer/Auto Run Blocker VB.NET + Source Code

USB Freezer/Auto Run Blocker VB.NET + Source Code


Just Download & Install Self Extracting Archive (.EXE)

Download Project Source Code 227kb

Extract Each Lines From Text Box VB.NET Source Code

Extract Each Lines From Text Box VB.NET Source Code


Source Code

Button 1 Click Event

 Dim loi As Integer = 1
        For Each strLine As String In TextBox1.Text.Split(vbNewLine)
            If loi = 1 Then
                MsgBox(strLine)
                loi = 0
            Else
                MsgBox(strLine.Remove(0, 1))
            End If
        Next
    End Sub

If Condition Used For Avoid Extra New Lines..