Results 1 to 5 of 5
  1. #1
    Iamazn's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    141
    Reputation
    10
    Thanks
    85

    [TuT]Preventing your Program from Closing

    Add this code to your form.
    Code:
        Private Sub Form1Closing(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
            e.Cancel = True
        End Sub
    If you want to be able to exit, add this code to a button
    Code:
    End
    It should look something like this, IF your button is called Button1 and your form is called Form1
    Code:
    Public Class Form1
    
        Private Sub Form1Closing(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
            e.Cancel = True
        End Sub
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            End
        End Sub
    End Class

  2. #2
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    Fail..... e.cancel = true is not right...Give a error!

    Put: eventArgs.Cancel = True and then it will work...

    Thank me if I helped!

  3. #3
    Iamazn's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    141
    Reputation
    10
    Thanks
    85
    Quote Originally Posted by hejsan1 View Post
    Fail..... e.cancel = true is not right...Give a error!

    Put: eventArgs.Cancel = True and then it will work...

    Thank me if I helped!
    You need to have
    Code:
     Private Sub Form1Closing(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing

  4. #4
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    huh.... I´m know that....

  5. #5
    Iamazn's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    141
    Reputation
    10
    Thanks
    85
    Quote Originally Posted by hejsan1 View Post
    huh.... I´m know that....
    If you knew that how come you said it gave an error?

Similar Threads

  1. Prevent Your work from getting Leeched!
    By Invidus in forum Combat Arms Discussions
    Replies: 13
    Last Post: 02-22-2010, 12:32 AM
  2. [TUT]Spoof your name including GM Rank
    By Mat901 in forum Combat Arms Hacks & Cheats
    Replies: 11
    Last Post: 08-22-2008, 04:57 AM
  3. [TuT] Make Your Own Clean.Bat
    By Recreation in forum WarRock - International Hacks
    Replies: 4
    Last Post: 06-10-2008, 11:52 AM
  4. (TUT) Make your hack less detected. (NEW)
    By JuniorD in forum WarRock - International Hacks
    Replies: 3
    Last Post: 11-27-2007, 04:56 PM
  5. [TUT]Change your IP!
    By xxpagxx in forum WarRock - International Hacks
    Replies: 44
    Last Post: 05-22-2007, 05:28 PM

Tags for this Thread