How can I make my aplication NOT to close when i press ALT+F4? or other combinations that does the same task.
Do Not Close
Collapse
X
-
Put this in your Global Functions, modify the code to your liking
Code:function QueryAllowProjectClose() result= Dialog.Message("Application Exit", "Are you sure that you want to quit?", MB_YESNO, MB_ICONEXCLAMATION, MB_DEFBUTTON1); --if they choose yes if result == IDYES then --allow the app to close return true; else --cancel close return false; end end
-
-
Couldn't he also specify an On Key event for each page where he doesn't want ALT-F4 to be available? It would be somewhat tricky in that you'd need to read in the table of e_modifiers and do some string manipulation. Is it doable? Just guessing at a more precise method for handling that specific key combination.
I'm not a programmer, but I play one on TV.
Comment
-
-
I've never tried it Eric, so I can't say for sure. My best guess is no though, as Alt F4 is a system wide hook, and is probably acted on by windows before your app would have a chance. By using QueryAllowProjectClose, you can cancel the close coming from windows, or even withing your own app.
Originally posted by eric_darlingCouldn't he also specify an On Key event for each page where he doesn't want ALT-F4 to be available? It would be somewhat tricky in that you'd need to read in the table of e_modifiers and do some string manipulation. Is it doable? Just guessing at a more precise method for handling that specific key combination.
I'm not a programmer, but I play one on TV.Last edited by Worm; 07-28-2005, 08:58 PM.
Comment
-
-
Originally posted by WormI've never tried it Eric, so I can't say for sure. My best guess is no though, as Alt F4 is a system wide hook, and is probably acted on by windows before your app would have a chance. By using QueryAllowProject close, you can cancel the close coming from windows, or even withing your own app.
Comment
-
-
Originally posted by eric_darlingI'm not a programmer, but I play one on TV.
That’s so funny, I sometimes feel the same way. Mostly, I just get the understudy’s gig though, so I seldom actually appear on camera, but I’m ready to.
Originally posted by eric_darlingCouldn't he also specify an On Key event for each page where he doesn't want ALT-F4 to be available? It would be somewhat tricky in that you'd need to read in the table of e_modifiers and do some string manipulation. Is it doable? Just guessing at a more precise method for handling that specific key combination.
Less code + Greater compatibility = Vastly superior
I’m not knocking your line of thought on this, I shared it. I’m just trying to understand why a real programmer thinks the way Worm does.
We now return you to your regular programming.
.
Comment
-
-
AMS brings an interesting variety of folks to the table. It's a unique product in that it's both accessible and powerful. Not too many pieces of software can claim that (and do it honestly). Come to think of it, when it comes to programming, none actually.
And you're right about the Worm. The elegance of his solutions always astound me. It takes more than a keen eye - to do what he does, it takes superior comprehension of computing on a level I'll never know.
Years ago, when I was a more active type (and lived in northern climes), I skied like it was getting outlawed next week. But I was never a truly master alpine skier. Eventually, I was hired by the patrol squad at a local mountain in Pennsylvania. I attributed my skill set to hanging out with true masters of the sport. They taught me more than I could have ever learned on my own. That was such an important lesson for me. Now, I take every opportunity to glean from the masters. Of course, the real trick is doing that kind of thing without becoming a leech.
Comment
-
-
"All the world's indeed a stage, and we are merely players. Performers and portrayers. Each another's audience..."
- Geddy Lee, 1981
Comment
-
-
You guys are kinda making feel a bit like
<SixteenCandles>Farmer Ted</SixteenCandles>
As for RUSH... I can't for the life of me understand how someone can sing that high and play the bass at the same time. It seems it would be very difficult.
Comment
-
-
Geddy Lee also plays keyboards, bass pedals, and runs the light show *at the same time*. Well lately he doesn't run the light show anymore but for decades here's what Geddy Lee did live, all at the same time:
1. Sang.
2. Played bass guitar.
3. Played keyboard.
4. Played "Taurus" bass pedals with his feet.
5. Manually controlled various aspects of the light show.
6. Manually controlled various aspects of the audio show.
7. Ran the show, i.e. "frontman duties".
And it's not like those bass parts are easy either, I play a few Rush tunes and they are incredibly intricate bass lines, very well thought out, and tasty from a musical standpoint. Geddy Lee gets just as much respect from bass players as he does from singers, unlike most singers who also play bass. I have to say that Geddy Lee is very much one of my all time favorite performers, bar none. And that's not to discount Neil Peart who has arguably been one of the most consistently compelling rock drummers on earth for decades running. He is truly amazing, and also the source of almost all those fantastic Rush lyrics. No one ever walked away from a Rush concert without being shocked by Peart's performance.
Alex Lifeson is a really unique case too. Without hitting you over the head with flashiness, he has also consistently cranked out some of the most compelling riffs in rock history for decades running. Think about the opening bars to Spirit of Radio, Limelight, Tom Sawyer, etc. Those are all guitar riffs which *stick* in your head instantly and forever. As someone who has spent the greater part of his life aspiring to that very accomplishment, I can testify to the vast difficulty of what he has managed. Lifeson has a knack which I've only seen in a handful of performers over the years.
I can't say enough good stuff about Rush, although admittedly the mastering on a few of their albums was *way* too heavy handed. I would have to say that Rush stands out for me as one of the truly great concert acts of all time. :yes
Geedy Lee also did a cameo and a song on Bob and Doug Mackenzie's "The Great White North" album too. "Take Off" was the song and although I've heard the short intro skit I can't remember much about it other than Geddy Lee speakking with a hoser accent. I do however remember the frostbite skit, i.e., "Ernie's mom sucks his toes" so all is not lost.
P.S. Worm rules, definitely a good guy to know if you plan on having any questions about anything, ever. :yes
Comment
-
-
Honestly I've read up on that incident and once you start to hear the real story, he and his boy don't neccesarily come off very well. Truth of the matter is that he absorbs a right cross much better than he gives one.
Ninjas have the best technique. Live well, stay under the radar, and when push comes to shove never telegraph your intentions. The easiest way to never lose a fight is to never fight... :yes
Alcohol is a heck of a thing though, and much of the time celebrities and the sons of celebrities are tools. I've met a few, and was flabbergasted. :o
True story: During spring break 1978 I argued over a ping pong table with "Billy Baio", brother of Scott Baio during a cruise on the Pacific Princess ("The Love Boat"). We were playing and he walked up out of the blue and told us to leave because he needed the table, we told him to beat it, and he did but about 10 minutes later he returned with a whole entourage of people including his agent, his "personal assistant", Billy Crystal (of all people), the ship's Captain, the director of "Love Boat", etc. All seeking to explain to us why Billy Baio "needed" the ping pong table *right now*. It was one of those moments where it would have been easy to stand our ground but it just wasn't worth it. So I gave him the ping pong paddle and said something to the effect of, "Here meathead." (I was 10 years old) and he completely freaked out, crying, screaming, tantruming, stamping his feet, etc. Never seen anything like it. His personal assistant hugged him and started speaking to him in "baby talk", trying to calm him down. He was 13-14 years old at the time. I felt sorry for him at that point. It was surreal, the captain made me apologize for calling him a meathead, which I did. Then as soon as we walked away he decided he didn't want the ping pong table anymore and stormed off, entourage in tow, so we went back and played ping pong. :o
Comment
-
Comment