|
-
Feb 27th, 2000, 12:46 AM
#1
Thread Starter
New Member
I am making a program and I wont to code it so if they get the password wrong the computer will crash and they will have to restart the computer. I would also like it to play a wav file while the computer is locked so I can tell if someone near me has tried to get onto my program. PLease could you tell me how to do this.
Thank you very much
Michael
-
Feb 27th, 2000, 12:59 AM
#2
Member
sorry, just need to clarify something:
make sure you compile the program because then the whole program will freeze and crash, if you don't it does not matter but it would work better this way
>when the user gets the password wrong, use this:
>this is so easy is unbelievable:,,,
>you know when there is an error in your code and you run >it, just look at the error number and replace the 54 with >whatever the number if you want,, but this works perfectly:
>err.Raise 54
>easy hey!!!
>tell me if it works on your program 
Edited by paulwbarnes on 02-27-2000 at 01:04 PM
-
Feb 27th, 2000, 01:10 AM
#3
Thread Starter
New Member
I have only just stated vb so I dont know what you are on about. Please could you explain what I have to do from me creating a new form.
Sorry about this
Michael
-
Feb 27th, 2000, 02:23 AM
#4
Member
ok, to crash the program, simply stick this code as the action (what happens when password (IN YOUR PROJECT)is wrong)
--------------
err.raise 54
------------
first stick the code in a command button and test it.
fiddle around with the number (54) to get different types of crashes
BELEIVE ME, IT MIGHT NOT LOOK LIKE VB BUT IT IS
-
Feb 27th, 2000, 05:25 PM
#5
Frenzied Member
Am I not the only one here that thinks a program that is made to deliberately crash is very bad..?
Why not play the wav file (a tip for doing so is on this website if you search for it) and exit the program. If you've got a program that crashes the PC all sorts of problems could arise - least of all you will completely destroy any open documents etc the user has and a worse case scenario will be that you corrupt the hard disk.
Sorry to be the prophet of doom I just don't think this is the best way around the problem..
'Buzby'
Visual Basic Developer
"I'm moving to Theory. Everything works there."
-
Feb 27th, 2000, 06:03 PM
#6
why you don't correctly shutdown the pc trought the win-API ??? that maybe more user and data friendly.....
taLON
-
Feb 27th, 2000, 06:04 PM
#7
Hyperactive Member
I agree with Buzby.
Crashing a computer is something that a serious developer never should consider.
The problem that could cause is huge, as Buzby said
you will completely destroy any open documents etc the user has and a worse case scenario will be that you corrupt the hard disk.
Instead try to make a splashscreen that states that the user has tried to do something illegal and if he doesn't give 50'000$ to the Red Cross, something terrible will happend to his bike or something other hidious thing.
And play that wav-file while the splash-screen is open.
Onerrorgoto
Dont be to optimistic, the light at the end of the tunnel might be a train
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|