Thread: Snippets Vault

Page 3 of 8 FirstFirst 12345 ... LastLast
Results 31 to 45 of 113
  1. #31
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Snippet Name: MPGH: Get Active Users (easy way)
    Keywords: N/A
    Desctiption: Get Active Users of MPGH, see who is online.

    [highlight=vb.net]
    '/// Form Load
    Webbrowser1.Navigate("https://mpgh.net/forum/")
    'Assumes you have added a list box control to add the users to.
    'and a hidden webbrowser control
    'Clear The List Box so doubles are not added
    ListBox1.Items.Clear()
    Dim members As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("a")
    For Each curElement As HtmlElement In members
    ' If the attribute Href contains (in the URL) "/members/" (all registered users will) then add the inner text to the list box)
    If curElement.GetAttribute("href").Contains("/members/") Then
    ListBox1.Items.Add(curElement.GetAttribute("innert ext"))
    End If
    Next
    'Alphabetize the listbox
    ListBox1.Sorted = True
    'If you would like to see the number of users on, simply count the listbox
    'add a label and use the below code
    Label1.Text = ListBox1.Items.Count

    ' You can also check to see if the style attribute contains a specific color and pass that color to the user name to show rank

    [/highlight]
    Last edited by Jason; 02-15-2011 at 09:35 PM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  2. The Following 2 Users Say Thank You to NextGen1 For This Useful Post:

    Lyoto Machida (04-16-2011),Tunguestenio (03-30-2011)

  3. #32
    ZWatch_OutZ's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    My Mood
    Bored
    Computer Information -

    Computer Name: My.Computer.Name
    User Name: My.User.Name
    OS Name: My.Computer.Info.OSFullName
    Desktop: My.Computer.Screen.WorkingArea.ToString
    Total Physical Memory: My.Computer.Info.TotalPhysicalMemory
    Total Virtual Memory:My.Computer.Info.TotalVirtualMemory
    Available Virtual Memory: My.Computer.Info.AvailableVirtualMemory
    Is 64Bit Process: System.Environment.Is64BitProcess

    Download & Run -

    Download: My.Computer.Network.DownloadFile("URL here", "Save file as")
    Run :Process.start("file name")

    Calculator -

    This goes at the top of the code between Public Class Form and First Line -
    Dim Operation As String = ""
    Dim Value1 As double = 0
    Dim Value2 double = 0

    0 Button -
    TextBox1.Text += "0"


    Plus -
    operation = "Plus"
    If CInt(true) then value1 = CDbl(TextBox1.Text)
    TextBox1.clear()

    Minus -
    operation = "Minus"
    If CInt(true) then value1 = CDbl(TextBox1.Text)
    TextBox1.clear()

    Multiply -
    operation = "Multiply"
    If CInt(true) then value1 = CDbl(TextBox1.Text)
    TextBox1.clear()

    Divide -
    operation = "Divide"
    If CInt(true) then value1 = CDbl(TextBox1.Text)
    TextBox1.clear()

    Point -
    Dim dot As boolean
    If TextBox1.Text.IndexOf(".") = 0 Then dot = True
    if dot = False Then TextBox1.Text += "."

    Clear -
    TextBox1.Clear()

    Equal -
    Value2 = Val(TextBox1.Text)
    Select Case operation
    Case Is = "Plus"
    TextBox1.Text = (Value1 + Value2).ToString()
    Case Is = "Minus"
    TextBox1.Text = (Value1 - Value2).ToString()
    Case Is = "Multiply"
    TextBox1.Text = (Value1 * Value2).ToString()
    Case Is = "Divide"
    TextBox1.Text = (Value1 / Value2).ToString()
    End Select

    MessageBox -
    MsgBox("What it will say", MsgBoxStyle.OkOnly, "title")
    Note: There are other MsgBoxStyle's

    Log In Form -
    If TextBox1.Text = "(PASSWORD HERE)" then
    (FORM+NUMBER).Show()
    Me.Hide()
    Else
    MessageBox.Show("Wrong PassWord!")
    End If

    Form Linking to Another -
    Form(number).Show()
    Me.Hide()

    Run a Process -
    Process.Start(filename.exe,.txt, etc)

    Timer Start + Stop -
    Timer1.Start
    Timer1.Stop

    Progress Bar -
    ProgressBar1.Increment(1)
    If ProgressBar1.Value = ProgressBar1.Maximum Then
    Button1.Enabled = True
    __________________

  4. #33
    cosconub's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    in the programming section MPGH Cash: $90,000,000,000
    Posts
    372
    Reputation
    -4
    Thanks
    39
    My Mood
    Psychedelic

    [Tut] How to make simple bookmarks c&p

    Hello, people of mpgh this is my very simple bookmark source. So easy a caveman could do it.

    What is Needed.
    1. Vb.net
    2. a brain
    3. OpenFileDialog
    4. SaveFileDialog
    5. a textbox
    6. 3 buttons
    7. webbrowser1


    Button1
    Code:
      Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim SaveDialog As New SaveFileDialog
            SaveDialog.InitialDirectory = My.Computer.FileSystem.CurrentDirectory
            If SaveDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
    
                Using sWrite As New IO.StreamWriter(SaveDialog.FileName)
    
                    sWrite.WriteLine(TextBox1.Text)
    
                End Using
    
            End If
        End Sub
    Button2

    Code:
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            Dim OFD As New OpenFileDialog
            OFD.InitialDirectory = My.Computer.FileSystem.CurrentDirectory
            If OFD.ShowDialog = Windows.Forms.DialogResult.OK Then
    
                Using sRead As New IO.StreamReader(OFD.FileName)
    
                    TextBox1.Text = sRead.ReadLine
    
    
                End Using
    
            End If
        End Sub
    Button3
    Code:
       Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    
    webbrowser1.navigate = textbox1.text
    End Sub
    This goes in load form
    Code:
    button1.text="Save bookmarks"
    button2.text="load Bookmarks"
    button3.text="Navigate"
    then when u click save type the name of the bookmark and click save then you use the load to see it, and you can always edit the bookmarks in a text editor.
    Last edited by cosconub; 10-24-2010 at 03:46 PM.

    A man is but the product of his thoughts what he thinks, he becomes.
    ~Mohandas Gandhi


    A Genius is nothing with out an idea, An idea is always an idea even without a genius.
    ~ Immortal

  5. #34
    nathanael890's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    158
    Reputation
    13
    Thanks
    46
    My Mood
    Bored
    Snippet Name : Open and Save File Dialogs
    Keywords : n/a?
    Description : Using this basic (but helpful) functions rather than using OpenFileDialog or SaveFileDialog in the toolbox

    Code:
        Public Function OpenFileDialog() As String
            Dim O As New OpenFileDialog
            O.Title = "Open File" 'Title of your "Open File" Dialog
            O.Filter = "All Files (*.*)|*.*" 'File Extension
            O.ShowDialog() 'Shows the dialog
            Return O.FileName
            'If the dialog was cancelled, then it will return as blank
        End Function
    
        Public Function SaveFileDialog() As String
            Dim S As New SaveFileDialog
            S.Title = "Save File" 'Title of your "Save File" Dialog
            S.Filter = "All Files (*.*)|*.*" 'File Extension
            S.ShowDialog() 'Shows the dialog
            Return S.FileName
            'If the dialog was cancelled, then it will return as blank
        End Function
    How does it work?
    Code:
     
    Me.Text = OpenFileDialog()
    ' or 
    Me.Text = SaveFileDialog()
    Please modify this if there is any corrections.. even this is really basic for a newbie..

  6. #35
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by nathanael890 View Post
    Snippet Name : Open and Save File Dialogs
    Keywords : n/a?
    Description : Using this basic (but helpful) functions rather than using OpenFileDialog or SaveFileDialog in the toolbox

    Code:
        Public Function OpenFileDialog() As String
            Dim O As New OpenFileDialog
            O.Title = "Open File" 'Title of your "Open File" Dialog
            O.Filter = "All Files (*.*)|*.*" 'File Extension
            O.ShowDialog() 'Shows the dialog
            Return O.FileName
            'If the dialog was cancelled, then it will return as blank
        End Function
    
        Public Function SaveFileDialog() As String
            Dim S As New SaveFileDialog
            S.Title = "Save File" 'Title of your "Save File" Dialog
            S.Filter = "All Files (*.*)|*.*" 'File Extension
            S.ShowDialog() 'Shows the dialog
            Return S.FileName
            'If the dialog was cancelled, then it will return as blank
        End Function
    How does it work?
    Code:
     
    Me.Text = OpenFileDialog()
    ' or 
    Me.Text = SaveFileDialog()
    Please modify this if there is any corrections.. even this is really basic for a newbie..
    Well you do don't need to declare that function for any reason whatsoever. It has no parameters so it's not customizable unless you manually change the title etc, which is what you'd do in a normal declaration of the OFD/SFD. The only way I can see it being useful is something like this:

    [highlight=vb.net]
    Private Function GetOFD(ByVal title As String, ByVal filter As String) As String
    Dim ofd As New OpenFileDialog With {.title = title, .filter = filter}
    If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then
    Return ofd.FileName
    Else
    Return Nothing
    End If
    End Function
    [/highlight]

    But still, nice contribution.
    Last edited by Jason; 02-15-2011 at 09:35 PM.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  7. The Following User Says Thank You to Jason For This Useful Post:

    nathanael890 (11-21-2010)

  8. #36
    willrulz188's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Ohio?
    Posts
    1,786
    Reputation
    35
    Thanks
    231
    My Mood
    Amazed
    Check if a program is running

    Code:
    Public Function ProcessesRunning(ByVal ProcessName As String) As Integer
            Try
                Return Process.GetProcessesByName(ProcessName).GetUpperBound(0) + 1
                : Catch
                Return 0
            End Try
        End Function
    
    Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            If ProcessesRunning("Ccleaner") = 1 Then
                'What ever
            Else
                'what ever else
            End If
        End Sub
    simple but useful
    Question ALL statements! ?
    You're in denial that you're in denial. ?
    [img]https://i360.photobucke*****m/albums/oo45/blood188/Untitled-3.jpg?t=1284590977[/img]

  9. #37
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh

    Some Simple Tuts For Starters

    Well, now per now i'm kinda bored so i decided to get more activity here

    How to make a folder....:
    [highlight=vb.net] Private Function CreateFolder(ByVal FolderName As String, ByVal StartPath As String) As String
    Dim STR As String = New String(FolderName)
    If (FolderName Is Nothing) Then
    Return Nothing
    End If
    If STR.Contains(FolderName) Then
    System.IO.Directory.CreateDirectory(StartPath & "\" & STR)
    End If
    Return Nothing
    End Function[/highlight]
    /Tested
    Working 100%

    ==========================

    Check if a file exists and write/read on it....:
    [highlight=vb.net] Public Function Write(ByVal filename As String, ByVal WhatToWrite As String)
    If Not System.IO.File.Exists(filename) Then
    Return Nothing
    ElseIf filename Is Nothing Then
    Return Nothing
    End If

    Do While System.IO.File.Exists(filename)
    Using Writer As New System.IO.StreamWriter(filename)
    Writer.Write(WhatToWrite)
    Writer.Close()
    End Using
    Loop
    Return Nothing
    End Function[/highlight]

    ==========================

    Gets file's codes....:
    [highlight=vb.net] Public Function GetCode(ByVal path As String) As String
    Dim str As String = ""
    Using sRead As New System.IO.StreamReader(path)
    While Not sRead.EndOfStream
    str = sRead.ReadToEnd()
    End While
    End Using
    Return str
    End Function[/highlight]

    ==========================

    Using Loop....:
    [highlight=vb.net] Public Function LoopStat(ByVal add As String) As String
    Dim urAge As Integer = 12
    Const ret As Integer = 0
    Dim lp As Integer = 20

    For urAge = 12 To urAge = lp
    MsgBox("Your Age Is 20. Happy 20's birthday! ")
    Next
    Return ret
    End Function[/highlight]

    ==========================

    Gets String From A URL......:
    [highlight=vb.net] Public WithEvents WebClient1 As New Net.WebClient

    Public Function GetString(ByVal address As String) As String
    Dim str As String = WebClient1.DownloadString(address)
    Return str
    End Function[/highlight]

    ==========================

    Gets PC Information......:
    [highlight=vb.net] Public Function GetSystemInfo() As String
    Dim win As String = My.Computer.Info.OSFullName
    Dim virMem As String = My.Computer.Info.TotalVirtualMemory
    Dim winVer As String = My.Computer.Info.OSVersion
    Return MsgBox("Your Current OS is: " & win _
    & vbNewLine _
    & "Your OS Version is: " & winVer _
    & vbNewLine _
    & "Your Total Virtual Memory is: " & virMem)
    End Function[/highlight]

    ==========================

    I need to think for more........Hope that those was useful (at least 10% useful )

    Regards, Ace.
    Last edited by Jason; 02-15-2011 at 09:51 PM.

  10. The Following User Says Thank You to ♪~ ᕕ(ᐛ)ᕗ For This Useful Post:

    Tunguestenio (03-30-2011)

  11. #38
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Snippet Name : E-Mail Validation Using RegEx
    Keywords : Email,Validation,RegEx
    Description : Using RegEx to determine if the information in a text box is a valid formated email address.

    Code:
    ' Required
    Imports System.Text.RegularExpressions
    
     ' In a button click event (user submission etc.)
    
            Dim Valid As Boolean
            Try
                'Textbox1.text is the name of the textbox used in you application, Obvs.
                Valid = Regex.IsMatch(TextBox1.Text, "\A(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)\Z", RegexOptions.IgnoreCase)
            Catch ex As Exception
                ' Do nothing 
            End Try
            If Not Valid Then
                ' Replace with a label or whatever
                MsgBox("Please Enter a Valid Email Address")
                TextBox1.Clear()
            Else
                ' Remove message box, it is used for testing purposes
                ' Code to continue here
                MsgBox("Valid email")
            End If

  12. The Following 3 Users Say Thank You to NextGen1 For This Useful Post:

    Blubb1337 (12-01-2010),mapleanton (10-06-2011),Tunguestenio (03-30-2011)

  13. #39
    CptnDutch's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Location myLoc = Netherlands;
    Posts
    157
    Reputation
    18
    Thanks
    16
    My Mood
    Relaxed

    Spammer

    Snippet Name: Very simple spammer
    Keywords: Very, Simple, Spammer
    Description: This is just a very simple spammer that opens a internet explorer every milsec (timer.interval is set to 1...)

    What you need:

    - 1 button (.text - you choose | .name - btnStart)
    - 1 timer (.name - tmrSpammer)
    - Optionally: 1 label (.text - you choose | .name - lblText)

    Code:

    When they click on your button (btnStart)
    Code:
        
    Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
    
            tmrSpammer.Interval = 1
            tmrSpammer.Enabled = True
    
        End Sub
    When the button was clicked the timer started and this happens
    Code:
        
    Private Sub tmrSpammer_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmrSpammer.Tick
    
            Shell("C:\Program Files\Internet Explorer\iexplorer.exe")
    
        End Sub
    I made a much complicated spammer, with a gui and stuff, but i'll post it after this (maybe when i get good comments or so... just kidding)

    I know this is very simple but for the starters.. they can learn much about timer and button objects if the whole program is explained
    CptnDutch on duty

  14. #40
    T0P-CENT's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    88
    Reputation
    14
    Thanks
    17
    My Mood
    Stressed
    your code is messing if 2 process is running the function will return 2
    Code:
    If ProcessesRunning("notepad") >= 1 Then
    correct it
    and here is another noob-friendly code
    Code:
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            If IsProcessRunning("notepad") = True Then
                label1.Text = "Running"
            Else
                label1.Text = "Not Running"
            End If
        End Sub
        Public Function IsProcessRunning(ByVal ProcessName As String) As Boolean
            If Process.GetProcessesByName(ProcessName).Count >= 1 Then
                Return True
            Else
                Return False
            End If
        End Function
    Last edited by T0P-CENT; 01-11-2011 at 06:32 AM.

  15. #41
    T0P-CENT's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    88
    Reputation
    14
    Thanks
    17
    My Mood
    Stressed
    Quote Originally Posted by NextGen1 View Post

    You may want to be more specific.
    Quote Originally Posted by willrulz188 View Post
    Check if a program is running

    Code:
    Public Function ProcessesRunning(ByVal ProcessName As String) As Integer
            Try
                Return Process.GetProcessesByName(ProcessName).GetUpperBound(0) + 1
                : Catch
                Return 0
            End Try
        End Function
    
    Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            If ProcessesRunning("Ccleaner") = 1 Then
                'What ever
            Else
                'what ever else
            End If
        End Sub
    simple but useful
    (To short...)
    Last edited by T0P-CENT; 01-11-2011 at 05:49 AM.

  16. #42
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by T0P-CENT View Post
    (To short...)
    You're right, his code will return the number of open processes with that specific name (GetUpperBound of a process array). Really it should have been a common boolean function, sorta like this maybe?

    [highlight=vb.net]
    Private Function IsProcessOpen(ByVal processName As String) As Boolean
    Dim outputBool As Boolean = False
    If Process.GetProcessesByName(processName).Count > 0 Then outputBool = True
    Return outputBool
    End Function
    [/highlight]
    Last edited by Jason; 02-15-2011 at 09:51 PM.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  17. #43
    T0P-CENT's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    88
    Reputation
    14
    Thanks
    17
    My Mood
    Stressed
    Note: not sure of the code coz i wrote it on normal notepad then paste
    Get All Process Running
    Code:
    For Each Process In System.Diagnostics .Process.GetProcess
         Listbox1.Items.Add(Process.ProcessName)
    Next
    add this code in formload event and in button refresh , don't make it in a timer
    __________________________________________________ _____
    if you want auto refresh
    Code:
    Dim GotProcess As Boolean = False
        Sub GetProcesss()
            On Error Resume Next
            If GotProcess = False Then
                GotProcess = True
                For Each Process In System.Diagnostics.Process.GetProcesses
                    ListBox1.Items.Add(Process.ProcessName)
                Next
            Else
                For Each Process In System.Diagnostics.Process.GetProcesses
                    If Not ListBox1.Items.Contains(Process.ProcessName) Then
                        ListBox1.Items.Add(Process.ProcessName)
                    End If
                Next
                For Each Item As String In ListBox1.Items
                    If Process.GetProcessesByName(Item).Count = 0 Then
                        ListBox1.Items.Remove(Item)
                    End If
                Next
            End If
        End Sub
    this basicly get allprocesses for once then it get all items in listbox and check if that item is running or not if it isn't it removes it and it gets also all process again but it don't add it to the listbox and check if thelistbox contains the process
    only one disadvantage: if 2 notepads is running it only say 1 is running
    just put in a timer GetProcesss()
    Name: Get All Applications Running
    Code:
    For Each Process In System.Diagnostics.Process.GetProcesses
            Listbox1.items.add(Process.MainWindowTittle)
            Listbox1.items.remove("")
    Next
    __________________________________________________ _________________
    Kill A process
    Code:
    Sub KillProcess(Byval ProcessName As String)
        For Each Process In System.Diagnostics.Process.GetProcessByName(ProcessName)
            Process.Kill()
        Next
    End Sub
    Last edited by T0P-CENT; 01-11-2011 at 11:36 AM.

  18. #44
    cgallagher21's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    1,627
    Reputation
    11
    Thanks
    325
    My Mood
    Angelic

    All Dialogs in VB - Font, Color, Open & Save!

    Im bored Heres AQuick Post to help some of ya out!

    OpenFile Dialog

    Code:
    Dim OpenMe As New OpenFileDialog
            OpenMe.Filter = "Executable file(*.exe)|*.exe"
            If OpenMe.ShowDialog = Windows.Forms.DialogResult.OK Then
                TextBox1.Text = OpenMe.FileName
            Else
                MsgBox("Error, please select valid file.", MsgBoxStyle.Critical, "Error")
                Exit Sub
    SaveFile Dialog

    Code:
    Dim SaveMe As New SaveFileDialog
            Dim FileLink As String
            If SaveMe.ShowDialog = Windows.Forms.DialogResult.OK Then
                FileLink = SaveMe.FileName & ".exe"
            Else
                Exit Sub
            End If
    Font Dialog

    Code:
    Dim Font12 As New FontDialog
            If Font12.ShowDialog = Windows.Forms.DialogResult.OK Then
                TextBox1.Font = Font12.Font
            Else
                Exit Sub
            End If
    Color Dialog

    Code:
    Dim color123 As New ColorDialog
            If color123.ShowDialog = Windows.Forms.DialogResult.OK Then
                TextBox1.ForeColor = color123.Color
            End If

  19. #45
    cgallagher21's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    1,627
    Reputation
    11
    Thanks
    325
    My Mood
    Angelic

    Cool Features To Include In Your Program

    Make The Computer Beep

    Code:
    Console.Beep()
    Fade In / Fade Out

    Code:
    For Fadein = 0.0 To 1.1 Step 0.1
    Me.Opacity = Fadein
    Me.Refresh()
    Threading.Thread.Sleep(100)
    Next
    For Fade Out

    Code:
    For FadeOut = 90 To 10 Step -10
    Me.Opacity = FadeOut / 100
    Me.Refresh()
    Threading.Thread.Sleep(50)
    Next
    Make The Computer Talk

    Code:
    Dim sapi
    sapi = CreateObject("sapi.spvoice")
    sapi.Speak("TextHere")
    Create A Message Box

    Code:
    MsgBox("TextHere")
    MessageBox Codes
    Code:
    vbYesNoCancel
    vbCritical
    vbExcalmation
    vbInformation
    vbMsgBoxHelp
    vbMsgBoxRight
    vbOkOnly
    vbRetryCancel
    vbDefaultButton1
    vbDefaultButton2
    vbDefaultButton3
    vbApplicationmodal
    vbQuestion
    vbOkCancel
    vbAbortRetryIgnore
    Start a Process

    Code:
    Process.Start("notepad")
    Kill a Process

    Code:
    Dim RunningProcess As System.Diagnostics.Process = Process.GetProcessesByName("taskmgr.exe")(0)
    RunningProcess.Kill()
    Rename A File

    Code:
    My.Computer.FileSystem.RenameFile ("C:\Program Files\Mozilla Firefox\firefox.exe", "Anything.exe")
    Im bored Still Just Posting some useful stuff got from a website i take no credit, something like hackforumns or somethiong
    Last edited by cgallagher21; 01-12-2011 at 12:30 PM.

Page 3 of 8 FirstFirst 12345 ... LastLast