PDA

View Full Version : help with z-order of window


MigLeader
12-07-2008, 07:12 PM
hi there i am new here and i really loved this program it is amazing but i really have 3 questions:

1- when my app opens (lets call it app1) it runs another app with it (lets call it app2) but app1 is always on top of app2 , i want app2 to be always on top app1 only. Note: (app2) is another program not made using autoplay.

2- is there a way to block the (ALT+CTRL+DEL) keys , i tried to make the app1 when it starts it renames the file (C:\WINDOWS\system32\taskmgr.exe to C:\WINDOWS\system32\taskmgrm.exe) but the windows creates the file again.

3-last but not too important , is there anyway to lower the memory usage for the app1.

my application is just an interface for a computer gaming center we own , so i want to make and interface that makes it easier for the customers to start their games yet i want to forbid them to access anything on the pcs (from the desktop to any files on the hard drives), so i dont want the application to eat too many memory (right now it takes up to 42mb from memory).

and sorry about my English , because i am from Yemen.

thanks for any help

longedge
12-08-2008, 03:02 AM
Hello and welcome to the forum :)

1. Look at the project/settings and in the appearance tab below the window title there is an option to set "Always on top". That may be all you need.

2. Not a direct method but there is a dll on the forum HERE (http://www.indigorose.com/forums/showpost.php?p=107076&postcount=48) from member SSIDE which will do this for you.

3. I don't know of any way to do this. The runtime file has a lot of functionality so I guess you just have to live with that.

.. and finally as far as your English is concerned, you have no worries there - it is excellent :) :yes

MigLeader
12-08-2008, 12:08 PM
thanks for answers but :

1-Look at the project/settings and in the appearance tab below the window title there is an option to set "Always on top". That may be all you need

that will make the app1 on top app2 but i want the opposite completely , i want app2 to be on top app1 but app1 runs app2

2-Not a direct method but there is a dll on the forum HERE from member SSIDE which will do this for you.
i am using this .dll (thanks to SSIDE) but it seems it dont disable the (ALT+CTRL+DEL) keys combination's.

3-my application uses a lot of images and buttons and i have about 7 pages and about 40-50 buttons and images , cant i make the application free the loaded images when going to another page?? , or load the images to the virtual memory (hard drive)??

thanks for your time:)

longedge
12-08-2008, 03:41 PM
Ah Ok in that case try-

Window.SetOrder(Application.GetWndHandle(), HWND_BOTTOM);

Not sure about the other two.

MigLeader
12-08-2008, 04:33 PM
ah okay i tried this code before (sorry i didn't say i did) but i don't understand how to get these {Application.GetWndHandle()} , if you could give me an example about this code (i tried to find in the tut page but i dont find it)

longedge
12-09-2008, 02:04 AM
Just put the code exactly as it is in the application startup and then on show start the page timer at say 250 msecs. Put the same code in the on timer event. If the user pulls the window to the fron it will drop back to the bottom again.

If your application requires no user interaction you could also look at using-

Window.Hide(Application.GetWndHandle());

*BUT* you have to code some check into the on timer to look for your second app window and if it's not found, then show the window again, or alternatively just exit the application.

It all depends on how you want to manage it.

MigLeader
12-09-2008, 05:08 PM
you know , i don't know how to thank you , it WORKED!! thanks a lot , it was soooo easy code and i didn't even think of.

now about the 2nd one , i heard that you can disable the taskmanger from the registry , if you know anything about it i will be happy .


thanks for your help

longedge
12-10-2008, 02:07 AM
Off the top of my head I'd say use a similar approach i.e. search for the Task Manager window and if found, close it. You could easily incorporate that into the other timer events you've already got.

I'd caution against messing with the registry unless you are completely 'at ease' with it.

MigLeader
12-11-2008, 05:46 PM
thanks for help but i manged to disable the task mangaer from the registry , but there is one problem.

when i am working in my pc the .dll file from (SSIDE) works fine and it blocks everything as i want , but when i copy the application to another pc for testing nothing works , do you have any idea ??? (my pc is XP sp3 and the other pc is XP sp2) can this be the problem????

Imagine Programming
12-11-2008, 05:54 PM
Most of SSides dll's require .net 2.0, does the other computer have .NET Framework 2.0?

MigLeader
12-15-2008, 04:15 PM
Most of SSides dll's require .net 2.0, does the other computer have .NET Framework 2.0

and you are right , i installed the .net 2.0 and it worked.

maybe the last question , when i run a game using my application i can press the keys that SSides dll's have disabled , is there any workaround???

and i really thanks everybody who helped me here , you made me really happy , thanks.