Jem (jemjabella) wrote in visualbasic,
Jem
jemjabella
visualbasic

  • Mood:

A little help..?

Okey dokey.

I am really newbie when it comes to Visual Basic, but I am trying to making a little program in VB6. I only know what I bothered to listen to last year at college. Anyway, I have a question.. which is probably really stupid, but I couldn't find it everywhere else I looked.

Is there a way to get my application to be the only thing clickable? So, when it's run.. you can't click off onto something else, or change focus with alt+tab or something like that?

Anything that would help would be greatly appreciated as i'm totally stupid when it comes to things like this, heh. Also, this is crossposted to another community or two- so my apologies if you see it on your friends list more than once.
Subscribe
  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 18 comments
You mean, something like "On Top" ?
Uh.. basically, yes. I want my application to be the only thing that can be clicked/typed in/in focus/whatever until it's closed.
Don't think it can be done...
Are you sure? :/ Because that will be absolutely crappo if it can't. :X
not without some hefty circumventing of windows code, you are correct.

jemjabella

14 years ago

within a Vb app, you have to do a '.showmodal' with the form.

To keep it on top instead of any other application running, requires some crazy code, but basically on the "deactivate" code, you'll want to set focus back to the form. I don't advise this, its quirky. Windows is specifically designed to not allow this kind of thing.

jemjabella

14 years ago

It is not possible to do this in VB, or in fact at all, in a Windows app. To get this kind of functionality, you'd have to write a Windows Explorer replacement (not hard). I assume you want some sort of kiosk type app that's very secure?
Well, I was just working on a little mock-voice recognition system for my PC, because I have problems with people getting on it without permission. But, although it says it's testing voice, etc.. there's a tiny label in the left corner, not even visible, that terminates the application.

Kinda silly, but it'd work (because the people who use my PC are idiots).. although, it's not really a serious thing and doesn't matter. I'll find another way...
If you want to get serious, there is an API for replacing the NT/XP/2000 logon screen. You might look into that.
Ive pondered the same questions, as I wanted to make a similar application to fool some of my friends. The easiest way (Noob way) to do this is to make windowstate Maximized, and borerstyle 0.
Yeah, I figured that.. i'd be able to set it non-moveable. It might work. I'll have to try it later, thanks. :)
I have a program that is written in VB, I need to find it, that is basically a way to lock the computer. You can't alt-tab, ctrl-alt-delete, or move the mouse out of the application until you've typed in the correct password. Just a quick little prog to lock the computer.

Sorry, I don't have the code for it though. I'll see if I can find it.
UPDATE:

I found the app but it doesn't work correctly on WinXP and probably not 2000 either because I can alt-tab and ctrl-alt-delete. But, it still keeps the mouse pointer in the window only.
Well, here's a link to code to stop alt-tab, ctrl-alt-delete in VB.NET:

http://freespace.virgin.net/s.cowan/vbhowto/how_to/api/disable_winkeys.html

I also saw code to do it in VB6, there should be an example around to trap the mouse to your window also. Just do a search on google, you'll find it. I did.
Thanks a lot!