In wich way could i put the icon of the minimized program(written in BlitzBasic and running) on the quicklaunch bar?
Icon on the quicklaunch toolbar
Blitz3D Forums/Blitz3D Programming/Icon on the quicklaunch toolbar you would probably better off putting the icon in the system tray when you minimize the program, there is code to do this but the search function is off!
Could you help me to search?
You can't put it in the quicklaunch bar, this is basically another folder with a bunch o' shortcuts :)
Search is brokendiddly broken so no help at the mo i'm afraid :(
Search is brokendiddly broken so no help at the mo i'm afraid :(
Yep. You've probably go them mixed up.
Quicklaunch is a toolbar with shortcuts whereas the system tray is the small icons on your lower right.
You'll need a dll with system calls for that one.
Try this one http://www.blitzbasic.com/codearcs/codearcs.php?code=1140
Quicklaunch is a toolbar with shortcuts whereas the system tray is the small icons on your lower right.
You'll need a dll with system calls for that one.
Try this one http://www.blitzbasic.com/codearcs/codearcs.php?code=1140
So, using this dll i can put my program on the quicklaunch bar, and i'll see only that icon for my program?
this DLL will allow you to place the icon for your program in the "SYSTEM TRAY", while your main app is actually invisible :)
where can i get the FindWindowUltimate() function?
There are plenty of libraries for blitz that can do this.
Try a google search as this was how I found the article above :)
Try a google search as this was how I found the article above :)
In the example source there was a link to this site, but it says internel error.
Could anyone copy it on the next post, please?
Could anyone copy it on the next post, please?
FindWindowUltimate() it's used to find the window hwnd.
So, this user32.dll function works too:
api_FindWindow("Blitz Runtime Class", "test")
Now, the problem is, given this example program, in wich way could i only keep the program icon on the system tray as minimized but running?
example progra:
; !*! this demo is for Blitz3D only. please use trayexamp.bb for BlitzPlus
; TODO: you will need to place the ggTray.dll and ggTray.decls files in a folder called userlibs under your B3D directory
; TODO: ggTray.dll will need to be in the same directory that your EXE resides in if you compile
; TODO: you need to include the FindWindowUltimate() function or something similar. it requires some entries in user32.decls and
; is located at http://www.blitzbasic.com/Community/posts.php?topic=18287
;
; TODO: either compile and run the EXE or change cAppDir$ to the hard location of the ICOs. if you choose to compile, be
; sure to put the ggTray.dll in the same directory as your EXE
;Local cAppDir$=SystemProperty("appdir")
Local cAppDir$=""
AppTitle "test"
Global cIconStop$=cAppDir$+"stop.ico"
Global cIconStart$=cAppDir$+"usergrp.ico"
; set the graphics
Graphics 400,100,16,2
If FileType(cIconStop$)<>1
Cls
Text 110,10,"you must set the icon path",True
Else
; TODO: you will need to include the FindWindowUltimate() function and its requirements
; or something similar To get the main window handle
; show the initial icon
ggTrayCreate(api_FindWindow("Blitz Runtime Class", "test"))
; set the icon
ggTraySetIconFromFile(cIconStop$)
; set the tooltip
ggTraySetToolTip("Tray Example Stopped")
; show the icon with the updated text
ggTrayShowIcon()
; main loop to handle events
Repeat
; check for a right click
If ggTrayPeekRightClick()>0
; check the tooltip to see what status we are currently at
If Instr(ggTrayGetToolTip(),"Stopped")>0
; set the icon and a new tip
ggTraySetIconFromFile(cIconStart$)
ggTraySetToolTip("Tray Example Started")
Else
; set the icon and a new tip
ggTraySetIconFromFile(cIconStop$)
ggTraySetToolTip("Tray Example Stopped")
EndIf
; TODO: show your menu here at the event mousex,mousey
Cls
Text 110,10,"click occurred at: "+ggTrayEventMouseX(ggTrayPeekRightClick())+","+ggTrayEventMouseY(ggTrayPeekRightClick()),True
; clear out the events
ggTrayClearEvents()
EndIf
; check for a left doubleclick
If ggTrayPeekLeftDblClick()>0
Exit
EndIf
Forever
; clean up the tray
ggTrayDestroy()
EndIf
So, this user32.dll function works too:
api_FindWindow("Blitz Runtime Class", "test")
Now, the problem is, given this example program, in wich way could i only keep the program icon on the system tray as minimized but running?
example progra:
; !*! this demo is for Blitz3D only. please use trayexamp.bb for BlitzPlus
; TODO: you will need to place the ggTray.dll and ggTray.decls files in a folder called userlibs under your B3D directory
; TODO: ggTray.dll will need to be in the same directory that your EXE resides in if you compile
; TODO: you need to include the FindWindowUltimate() function or something similar. it requires some entries in user32.decls and
; is located at http://www.blitzbasic.com/Community/posts.php?topic=18287
;
; TODO: either compile and run the EXE or change cAppDir$ to the hard location of the ICOs. if you choose to compile, be
; sure to put the ggTray.dll in the same directory as your EXE
;Local cAppDir$=SystemProperty("appdir")
Local cAppDir$=""
AppTitle "test"
Global cIconStop$=cAppDir$+"stop.ico"
Global cIconStart$=cAppDir$+"usergrp.ico"
; set the graphics
Graphics 400,100,16,2
If FileType(cIconStop$)<>1
Cls
Text 110,10,"you must set the icon path",True
Else
; TODO: you will need to include the FindWindowUltimate() function and its requirements
; or something similar To get the main window handle
; show the initial icon
ggTrayCreate(api_FindWindow("Blitz Runtime Class", "test"))
; set the icon
ggTraySetIconFromFile(cIconStop$)
; set the tooltip
ggTraySetToolTip("Tray Example Stopped")
; show the icon with the updated text
ggTrayShowIcon()
; main loop to handle events
Repeat
; check for a right click
If ggTrayPeekRightClick()>0
; check the tooltip to see what status we are currently at
If Instr(ggTrayGetToolTip(),"Stopped")>0
; set the icon and a new tip
ggTraySetIconFromFile(cIconStart$)
ggTraySetToolTip("Tray Example Started")
Else
; set the icon and a new tip
ggTraySetIconFromFile(cIconStop$)
ggTraySetToolTip("Tray Example Stopped")
EndIf
; TODO: show your menu here at the event mousex,mousey
Cls
Text 110,10,"click occurred at: "+ggTrayEventMouseX(ggTrayPeekRightClick())+","+ggTrayEventMouseY(ggTrayPeekRightClick()),True
; clear out the events
ggTrayClearEvents()
EndIf
; check for a left doubleclick
If ggTrayPeekLeftDblClick()>0
Exit
EndIf
Forever
; clean up the tray
ggTrayDestroy()
EndIf
Somehow, it seems that only myself and the person who told me this actually know this...
To find the Blitz window handle:
Please try to pass this knowledge along. It's a very sad and lonely function.
http://www.blitzbasic.com/b3ddocs/command.php?name=SystemProperty&ref=2d_cat
To find the Blitz window handle:
SystemProperty$("apphWnd") ;This is a native Blitz function
Please try to pass this knowledge along. It's a very sad and lonely function.
http://www.blitzbasic.com/b3ddocs/command.php?name=SystemProperty&ref=2d_cat
Thanks. But now, in wich way could i keep the program icon only on the system tray as minimized but running?
Narr. Mr Picklesworth, See, I know it too :)
So?
Please, i need help.
Please, i need help.
Sorry SP, i posted a pointless post.
What you need to do with what Pickles just posted, is add it to the above code-
And in the code, instead of FindWindowUltimate, use this instead :)
What you need to do with what Pickles just posted, is add it to the above code-
And in the code, instead of FindWindowUltimate, use this instead :)
Do you know how to do it?
I'm not at a system where i can try. :/
Yes, but do you have any ideas wich i can try?
try what i wrote in the post before last...
Yes, applied. But the problem wasn't it.
The problem is that i don't want that the window is visible: if an user minimizes the window, on the bottom bar there is its icon and its name. I don't want them. I want that the program runs on the system tray: so, its minimized but running and don't disturb the user.
The problem is that i don't want that the window is visible: if an user minimizes the window, on the bottom bar there is its icon and its name. I don't want them. I want that the program runs on the system tray: so, its minimized but running and don't disturb the user.
Oh, I see. Sorry for wasting your time... There was a blitz hack to do that somewhere- Search isnt working though so godknows where.
Besides.. with that aspect, someone else should be able to help other than me.
Besides.. with that aspect, someone else should be able to help other than me.
If anyone would help me, please post.
I FOUND THE SOLUTION. It was in an old old old post.
Look at this code. It doesn't do anything, only store a number onto i, for 11 times(i did it to verify if the program was running) and make the windows invisible but active.
If you press ctrl-alt-del, you won't see anything. It's great!
api_ShowWindow(SystemProperty$("apphWnd"),0)
For i=0 To 10
Delay 1000
Next
WaitKey()
End
Look at this code. It doesn't do anything, only store a number onto i, for 11 times(i did it to verify if the program was running) and make the windows invisible but active.
If you press ctrl-alt-del, you won't see anything. It's great!
api_ShowWindow(SystemProperty$("apphWnd"),0)
For i=0 To 10
Delay 1000
Next
WaitKey()
End
You could use my CreateShortcut DLL and the take the .ink file and move it to the quicklauch which is located in an Internet Explorer folder.
i mean another thing, and the previous program is the best for what i want.
Why does it have delay 1000 in it every loop?
In this way i can, stopping the program from the debugger, see if the program works seeing the "i" value. I can't print because the window come visible...