MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides  
Homepage Register FAQ Members Mark Forums Read Advertise Marketplace FPSowned


Go Back   MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides > Programming > Programming section > VB
Reload this Page How to make a pop-up prank
VB Discussions about VB programming

Reply
 
LinkBack Thread Tools
How to make a pop-up prank
(#1)
Old
Neth'zul's Avatar
Neth'zul is Offline
Contributor
Rep Power: 3
Reputation: 218
Neth'zul has a spectacular aura aboutNeth'zul has a spectacular aura aboutNeth'zul has a spectacular aura about
 
Posts: 850
Join Date: Nov 2007
Location: Head of Recruitment
How to make a pop-up prank - 08-06-2008

So here I will give you the code to make a program that dose not let you close it, you press a button another thing comes up. YOU JUST CAN'T CLOSE IT

First make 2 buttons and 1 label.

1. Name the label : Just try to close me!
2. Name button 1 "Close me"
3. Name button 2 "CLOSE!!!"
4. here is the code for button 1:

Code:
 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim newform1 As New Form1
        times = times + 1
        newform1.Text = "Try to Close This!" & times.ToString
        newform1.Show()

    End Sub
5. Double click form 1 so you get your code.
Right beside From1 events there's a drop down menu, there make the from1 Click
and type this in:

Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
MsgBox(" Windows errors, you are tying to click here. YOU CAN'T CLICK HERE!", MsgBoxStyle.Critical, "ERROR")
MsgBox("Windows is trying to finalize.", MsgBoxStyle.Critical, "Windows Information")
Application.Exit()
End Sub

then double click form1 again and youll get a blank code spot again make that spot FormClosing

The code for that is:
Code:
 Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        If e.CloseReason = CloseReason.UserClosing Then
            e.Cancel = True
            MsgBox("Try Another way bud...", MsgBoxStyle.Critical, "ERROR")
        ElseIf e.CloseReason = CloseReason.ApplicationExitCall Then
            e.Cancel = True
            MsgBox("Application is trying to finalize itself but it is impossible", MsgBoxStyle.Critical, "ERROR")
        ElseIf CloseReason.TaskManagerClosing Then
            e.Cancel = True
            MsgBox(" Task manager? ITS NOT FAIR!", MsgBoxStyle.Critical, "ERROR")
            Application.DoEvents()
        End If
    End Sub
And for button 2 its
Code:
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Application.Exit()
    End Sub
Over all it should look like this:

Code:
Public Class Form1
    Dim times As Long = 0
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim newform1 As New Form1
        times = times + 1
        newform1.Text = "Try to Close This!" & times.ToString
        newform1.Show()

    End Sub

    Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
        MsgBox(" Windows errors, you are tying to click here. YOU CAN'T CLICK HERE!", MsgBoxStyle.Critical, "ERROR")
        MsgBox("Windows is trying to finalize.", MsgBoxStyle.Critical, "Windows Information")
        Application.Exit()
    End Sub

    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        If e.CloseReason = CloseReason.UserClosing Then
            e.Cancel = True
            MsgBox("Try Another way bud...", MsgBoxStyle.Critical, "ERROR")
        ElseIf e.CloseReason = CloseReason.ApplicationExitCall Then
            e.Cancel = True
            MsgBox("Application is trying to finalize itself but it is impossible", MsgBoxStyle.Critical, "ERROR")
        ElseIf CloseReason.TaskManagerClosing Then
            e.Cancel = True
            MsgBox(" Task manager? ITS NOT FAIR!", MsgBoxStyle.Critical, "ERROR")
            Application.DoEvents()
        End If
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Application.Exit()
    End Sub
End Class




Reply With Quote

Donate to remove ads.
(#2)
Old
Fireking300's Avatar
Fireking300 is Offline
Master Sergeant
Rep Power: 2
Reputation: 7
Fireking300 is an unknown quantity at this point
 
Posts: 78
Join Date: Jun 2007
Location: Texas
08-07-2008

Lol Nice prank I'll try to top it!
Reply With Quote
(#3)
Old
ReidE96's Avatar
ReidE96 is Offline
Contributor
Rep Power: 3
Reputation: 266
ReidE96 is a jewel in the roughReidE96 is a jewel in the roughReidE96 is a jewel in the rough
 
Posts: 758
Join Date: Dec 2006
Location: Scotland
08-07-2008

task manager -> right click the program -> go to process -> delete key (or end process) -> yes

NOTHING can stop that. At all.


Reply With Quote
(#4)
Old
Jensecj is Offline
Master Sergeant
Rep Power: 3
Reputation: 18
Jensecj is on a distinguished road
 
Posts: 110
Join Date: Sep 2006
08-07-2008

wrote this in C# so not completely sure it works in VB, but this should disable the taskmanager( app needs to be able to write to registry ofcource):

Code:
 
Dim keyValueInt As String = "1"
Dim subKey As String = "SoftwareMicrosoftWindowsCurrentVersionPoliciesSystem" 
Try 
Dim regkey As RegistryKey = Registry.CurrentUser.CreateSubKey(subKey)         
regkey.SetValue("DisableTaskMgr", keyValueInt) 
regkey.Close 
    Catch ex As Exception         
MessageBox.Show(ex.ToString)     
End Try 
Reply With Quote
(#5)
Old
Neth'zul's Avatar
Neth'zul is Offline
Contributor
Rep Power: 3
Reputation: 218
Neth'zul has a spectacular aura aboutNeth'zul has a spectacular aura aboutNeth'zul has a spectacular aura about
 
Posts: 850
Join Date: Nov 2007
Location: Head of Recruitment
08-07-2008

Yeah you can do that, but I don't want to be stuck with one of those




Reply With Quote
(#6)
Old
GunMan's Avatar
GunMan is Offline
Knight-Lieutenant
Rep Power: 2
Reputation: 34
GunMan is on a distinguished road
 
Posts: 316
Join Date: Apr 2007
Location: Los Angeles, CA
08-12-2008

... How do we close this after we try it out...

I kinda.. well...
XD

Success, it stopped working. :P


GunMan's Pally: Level 61/70
Reply With Quote
(#7)
Old
Gothian's Avatar
Gothian is Offline
Contributor
Rep Power: 4
Reputation: 249
Gothian has a spectacular aura aboutGothian has a spectacular aura aboutGothian has a spectacular aura about
 
Posts: 500
Join Date: Jul 2006
Location: root
08-13-2008

Quote:
Originally Posted by avec View Post
wrote this in C# so not completely sure it works in VB, but this should disable the taskmanager( app needs to be able to write to registry ofcource):

Code:
 
Dim keyValueInt As String = "1"
Dim subKey As String = "SoftwareMicrosoftWindowsCurrentVersionPoliciesSystem" 
Try 
Dim regkey As RegistryKey = Registry.CurrentUser.CreateSubKey(subKey)         
regkey.SetValue("DisableTaskMgr", keyValueInt) 
regkey.Close 
    Catch ex As Exception         
MessageBox.Show(ex.ToString)     
End Try 
The two languages are interchangeable. I don't see anything wrong with this code up front without testing it, other than... why declare a variable which contains an integer, as a string O.o?



Soon you can find my projects at: www.termight.info

Last edited by Gothian; 08-13-2008 at 06:51 AM..
Reply With Quote
(#8)
Old
Jensecj is Offline
Master Sergeant
Rep Power: 3
Reputation: 18
Jensecj is on a distinguished road
 
Posts: 110
Join Date: Sep 2006
08-13-2008

Quote:
Originally Posted by Gothian View Post
The two languages are interchangeable. I don't see anything wrong with this code up front without testing it, other than... why declare a variable which contains an integer, as a string O.o?
dident write it in vb, just wrote in C# and converted :P but now when you say it, i can actually see what you meant, just never really bothered to look into the VB code :>
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361