battle programmers alliance

battle programminga forum for elite programmerswith extreme will powerto sharpen theire skills
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in
Search
 
 

Display results as :
 
Rechercher Advanced Search
Latest topics
» xamarin c# manual image app walkthrough
Sat Aug 12, 2017 2:08 pm by Moti Barski

» win10 shortcut keys
Wed Aug 09, 2017 2:40 am by Moti Barski

» vb.net region
Sat Aug 05, 2017 12:25 am by Moti Barski

» visual studio 2017 xamarin c# hello world walkthrough
Sat Jul 29, 2017 11:34 am by Admin

» gear s3 frontier s voice command list
Sat Jul 22, 2017 7:07 pm by Moti Barski

» how to use magnet links
Wed Jun 28, 2017 3:41 am by kurosen

» evolution of code
Mon Jun 12, 2017 12:08 am by kurosen

» chicken bot
Sat Apr 29, 2017 11:09 am by Moti Barski

» vb.net convert to binary
Thu Apr 27, 2017 7:48 am by Moti Barski

August 2017
SunMonTueWedThuFriSat
  12345
6789101112
13141516171819
20212223242526
2728293031  
CalendarCalendar
Social bookmarking
Social bookmarking Digg  Social bookmarking Delicious  Social bookmarking Reddit  Social bookmarking Stumbleupon  Social bookmarking Slashdot  Social bookmarking Yahoo  Social bookmarking Google  Social bookmarking Blinklist  Social bookmarking Blogmarks  Social bookmarking Technorati  

Bookmark and share the address of battle programmers alliance on your social bookmarking website
Share | 
 

 vb.net Batch Coder / Compiler

View previous topic View next topic Go down 
AuthorMessage
Admin
Admin
avatar

Posts : 53
Join date : 2011-08-01

PostSubject: vb.net Batch Coder / Compiler   Thu Aug 11, 2011 8:50 pm

by Smasherx74



Source
Code:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
     
        SaveFileDialog1.Title = "Save"
        SaveFileDialog1.Filter = "Batch File (*.bat)|*.bat"
        If SaveFileDialog1.ShowDialog = System.Windows.Forms.DialogResult.OK Then
            RichTextBox1.SaveFile(SaveFileDialog1.FileName, Windows.Forms.RichTextBoxStreamType.PlainText)
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        SaveFileDialog1.FileName = "Test.bat"
        RichTextBox1.SaveFile(SaveFileDialog1.FileName, Windows.Forms.RichTextBoxStreamType.PlainText)


        Dim response As New DialogResult
        response = MessageBox.Show("Testing batch file will run the .bat file. Whatever the code does will be executed on your computer, are you sure you want to continue?", "Warning!", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
        If response = DialogResult.Yes Then
            Process.Start("Test.bat")
        Else

        End If

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        RichTextBox1.Text = ""

    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        Form2.ShowDialog()
    End Sub


    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        SaveFileDialog1.FileName = "Project.bat"
        RichTextBox1.SaveFile(SaveFileDialog1.FileName, Windows.Forms.RichTextBoxStreamType.PlainText)


        If WebBrowser1.ReadyState = WebBrowserReadyState.Complete = True Then
            WebBrowser1.Document.GetElementById("userfile").InvokeMember("click")
            Threading.Thread.Sleep(100)
            For Each elem As HtmlElement In WebBrowser1.Document.GetElementsByTagName("input")
                If elem.GetAttribute("value") = "Convert" Then
                    elem.InvokeMember("click")
                End If

            Next
        End If


        Const OneSec As Double = 1.0# / (1440.0# * 60.0#)
        Dim dblWaitTil As Date
        Now.AddSeconds(OneSec)
        dblWaitTil = Now.AddSeconds(OneSec).AddSeconds(10)
        Do Until Now > dblWaitTil
            MsgBox("Compiling Batch file please wait...", MsgBoxStyle.Information)
        Loop

        If WebBrowser1.ReadyState = WebBrowserReadyState.Complete = True Then
            For Each unit As HtmlElement In WebBrowser1.Document.GetElementsByTagName("a")
                If unit.InnerText = "Download" Then
                    unit.InvokeMember("click")
                End If
            Next
        End If

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        WebBrowser1.Navigate("http://www.f2ko.de/programs.php?lang=en&pid=ob2e")
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        If TextBox1.Text = "0" Then
            RichTextBox1.BackColor = Color.Black
        End If

        If TextBox1.Text = "1" Then
            RichTextBox1.BackColor = Color.Blue
        End If

        If TextBox1.Text = "2" Then
            RichTextBox1.BackColor = Color.Green
        End If

        If TextBox1.Text = "3" Then
            RichTextBox1.BackColor = Color.Aqua
        End If

        If TextBox1.Text = "4" Then
            RichTextBox1.BackColor = Color.Red
        End If

        If TextBox1.Text = "5" Then
            RichTextBox1.BackColor = Color.Purple
        End If

        If TextBox1.Text = "6" Then
            RichTextBox1.BackColor = Color.Yellow
        End If

        If TextBox1.Text = "7" Then
            RichTextBox1.BackColor = Color.White
        End If

        If TextBox1.Text = "8" Then
            RichTextBox1.BackColor = Color.Gray
        End If

        If TextBox1.Text = "9" Then
            RichTextBox1.BackColor = Color.Blue
        End If

        If TextBox1.Text = "A" Then
            RichTextBox1.BackColor = Color.Green
        End If

        If TextBox1.Text = "B" Then
            RichTextBox1.BackColor = Color.Aqua
        End If

        If TextBox1.Text = "C" Then
            RichTextBox1.BackColor = Color.Red
        End If

        If TextBox1.Text = "D" Then
            RichTextBox1.BackColor = Color.Purple
        End If

        If TextBox1.Text = "E" Then
            RichTextBox1.BackColor = Color.Yellow
        End If

        If TextBox1.Text = "F" Then
            RichTextBox1.BackColor = Color.White
        End If
        If TextBox2.Text = "0" Then
            RichTextBox1.ForeColor = Color.Black
        End If

        If TextBox2.Text = "1" Then
            RichTextBox1.ForeColor = Color.Blue
        End If

        If TextBox2.Text = "2" Then
            RichTextBox1.ForeColor = Color.Green
        End If

        If TextBox2.Text = "3" Then
            RichTextBox1.ForeColor = Color.Aqua
        End If

        If TextBox2.Text = "4" Then
            RichTextBox1.ForeColor = Color.Red
        End If

        If TextBox2.Text = "5" Then
            RichTextBox1.ForeColor = Color.Purple
        End If

        If TextBox2.Text = "6" Then
            RichTextBox1.ForeColor = Color.Yellow
        End If

        If TextBox2.Text = "7" Then
            RichTextBox1.ForeColor = Color.White
        End If

        If TextBox2.Text = "8" Then
            RichTextBox1.ForeColor = Color.Gray
        End If

        If TextBox2.Text = "9" Then
            RichTextBox1.ForeColor = Color.Blue
        End If

        If TextBox2.Text = "A" Then
            RichTextBox1.ForeColor = Color.Green
        End If

        If TextBox2.Text = "B" Then
            RichTextBox1.ForeColor = Color.Aqua
        End If

        If TextBox2.Text = "C" Then
            RichTextBox1.ForeColor = Color.Red
        End If

        If TextBox2.Text = "D" Then
            RichTextBox1.ForeColor = Color.Purple
        End If

        If TextBox2.Text = "E" Then
            RichTextBox1.ForeColor = Color.Yellow
        End If

        If TextBox2.Text = "F" Then
            RichTextBox1.ForeColor = Color.White
        End If

    End Sub
End Class
Back to top Go down
View user profile http://yotamarker.justforum.net
 
vb.net Batch Coder / Compiler
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Create Batch file for Selenium
» Automation of Unix Batch processes in selenium
» Element not found error and quits in explorer / runs in firefox
» Start Selenium server
» VIDEO TUTORIAL how to use a batchfile to reduce boot.wim

Permissions in this forum:You cannot reply to topics in this forum
battle programmers alliance :: battle programming alliance :: battle programming-
Jump to: