Показать сообщение отдельно
Старый 27.09.2007, 20:13   #11
johnk
Легенда
 
Регистрация: 01.10.2006
Сообщений: 3,705
Написано 296 полезных сообщений
(для 568 пользователей)
Re: трей и рабочий стол

Вот как спрятать:
Erm, you will have to use userlibs to do that, if you have the full version of Blitz3D, then its okay, if not, your knackered!

Basically, in your Blitz3D root folder is another folder called userlibs, this is a place where you store either DECLS files and sometimes DLL's, I'll not run into it too much, as there is a readme file contained in the folder that shows you pretty much what to do.

The thing I will show you is how to declare WinAPI32 commands in a DECLS file so you can incorporate them as normal Blitz commands.

First, I think you need the ShowWindow WinAPI32 command:-

http://msdn.microsoft.com/library/de...ShowWindow.asp

Now, this page tells you everything you need to know when writing a DECLS file for Blitz, fisrtlt, when writing a DECLS file, we need to know which DLL in the system32 folder the command will come from... Scroll down a bit, and you should see:-

Minimum DLL Version user32.dll

So, to start the DECLS file, we put:-

.lib "user32.dll"

Then we need to write the command, which all its parameter/return properties, we can see that it returns a bool (An integer really), and its parameter list includes the windows handle and its flags (if you will)

So, in the DECLS file, we write underneath the above:-

ShowWindow%(hWnd%,cmdFlags%)

We then save the DECLS file, and open Blitz3D, then to test it, you can use something like this:-

Code:
Local hWnd = SystemProperty("AppHWND")

Print "Window Handle is:"+hWnd

Delay 3000

Print "Hiding Window"
Delay 2000

ShowWindow(hWnd,False)

Delay 3000

ShowWindow(hWnd,True)

Print "And back again :)"

WaitKey
Works a charm!

Dabz

P.S. Now, I'm off out again, will be back, to check what I've done... linky below!

P.S.S. To open the DECLS file, use Notepad
(Offline)
 
Ответить с цитированием