• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

VB help, creating an optionless window

PooDonkey

Junior Member
I have an application that I run that spawns in the default window. The default window has the regular menu bar, minimize, maximize, and close. I want to be able to disable everything for other users so that when they double-click an icon, they are spawned in a fixed-width optionless window.

I know I can use VB and create a fixed-width optionless window, but how do I have the program run inside this window? Do I even need to use VB or is there another way to do this?

Thanks in advance! Any help is really appreciated.
 
I would strongly recommend against this, as it violates several principles of good user interface design. All Windows applications generally have a title bar, minimize, maximize and close button. By choosing to eliminate those features you are making your program much more difficult to use.
 
This really wasn't my idea, but I told my boss that it could be done. I was thinking that running an external program in the existing window would be easy, however I have no idea how to go about it. If I use the shell command, it will spawn a new window.
 
You can also hide it from task manager. Then, make it immovable, so they can't minimize it etc, and make it add itself to the windows startup reistry entry, thus making their PC unusable. wow, classic how to be a bastard vb6 programmer after only a few hours of learning! hehe, best of luck! Also, if you want to be extra annoying, make it either shutdown widnows when it loads, or make it wait a random period of time, then shut down windows. another classic idea. if i rig up a spare pc, i'm gna spend my time destroying it with these kinds of things. but for now, i don't have anywhere to actually test these programs, as there's noone i'd send it to.

what's the program you want to run? you can make the application do anything you want on the Form_Load() event. also, whatever program you're trying to run, check the help file or /? it to see if it has a silent mode and then you could comand line it and it would run effectively silently whilst your form was displayed.

 
Hmm. What are you trying to accomplish overall by enclosing an external program?

You can do it by setting the owner of the spawned external window and sizing it within the boundaries of your own.
 
Originally posted by: xtknight
Hmm. What are you trying to accomplish overall by enclosing an external program?

You can do it by setting the owner of the spawned external window and sizing it within the boundaries of your own.
I want the user to be forced to always have this application up and running. So what you are saying is create a program with no GUI interface, that spawns an external program. Then, I have the ability to change the window properties of the newly spawned program within my own program?

 
If you are trying to make a kiosk, why not set the program as the Windows shell instead of explorer.exe? Sounds crazy, but I bet it would work, lol.

Oh, you want to remove the control box from the external program so that they can't minimize, maximize, close, move, or resize it? I think that should be pretty easy. Look at the code of this class module, which will do it for your own form's handle: http://vb.mvps.org/samples/project.asp?id=FormBdr

Use hWnd of external program instead of hWnd of your own program. There are ways to enumerate the hWnds spawned by another process.

I think he uses the SetWindowLong API for the bulk of it.
 
Originally posted by: xtknight
If you are trying to make a kiosk, why not set the program as the Windows shell instead of explorer.exe? Sounds crazy, but I bet it would work, lol.

Oh, you want to remove the control box from the external program so that they can't minimize, maximize, close, move, or resize it? I think that should be pretty easy. Look at the code of this class module, which will do it for your own form's handle: http://vb.mvps.org/samples/project.asp?id=FormBdr

Use hWnd of external program instead of hWnd of your own program. There are ways to enumerate the hWnds spawned by another process.

I think he uses the SetWindowLong API for the bulk of it.
Thanks a ton xtknight! I'll give it a try and let you know how it worked out.

 
Back
Top