Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog Help again please.
#1
Hello Gin. I was wondering if there was a way to make an icon that I can use for my dialog. I would like to put it down where the clock is so its easy access for my dialog. Please help.
#2
Create and run function like this:

Code:
Copy      Help
AddTrayIcon "lightning.ico" "Click to show dialog.[]Ctrl+click to remove icon." "FunctionThatShowsDialog"
wait -1
#3
ok i tried this and it worked the first time but then after i rebooted qm it wouldnt make the icon? and also when i had it working the first time everytime i clicked it without control it made another one can this be avoided?
#4
The function does not run without a reason. Assign a trigger.
#5
ok but where do i place AddTrayIcon "lightning.ico" "Click to show dialog.[]Ctrl+click to remove icon." "FunctionThatShowsDialog"
wait -1
?
#6
make a new function and place the code in it.
then run the function.
each time QM restarts (ie system reboot) you'll need to have that function start.
An old blog on QM coding and automation.

The Macro Hook
#7
ok ty ill try
#8
ok ty it works one last question on this...can i set this up so that when i run the icon it opens the dialog and also can i change how to close the icon? i dont like the control click... if not its ok
#9
How would you like to close the icon?

Quote:can i set this up so that when i run the icon it opens the dialog

Start the dialog using mac in first line of function that adds tray icon.
#10
if possible by right clicking it?
#11
Create new function, eg RemoveTrayIcon

Code:
Copy      Help
shutdown -6 0 "FunctionThatAddsTrayIcon"

At the end of the AddTrayIcon line, add "RemoveTrayIcon"
#12
Gintaras Wrote:How would you like to close the icon?

Quote:can i set this up so that when i run the icon it opens the dialog

Start the dialog using mac in first line of function that adds tray icon.


i had tried this but it only created the icon and didnt open the dialog?
#13
post all your code for that icon function and let's take a look.
An old blog on QM coding and automation.

The Macro Hook
#14
its ok i got it now idk what i was thinking :!: Confusedhock:
#15
:lol:
'been there!
An old blog on QM coding and automation.

The Macro Hook
#16
I'm sorry to bring this up again... i accidentely deleted the old icon thing i was making :x but i was curious, if possible, how do i make the icon appear at the title of the dialog?
#17
ShowDialog now has an 'icon' argument. All arguments before it (hwndowner ... y) can be 0. If it doesn't, download newer QM version.
#18
ok thanks i got it to work but now this isnt workign right?

Code:
Copy      Help
GdiObject- brush=CreateSolidBrush(ColorFromRGB(50 75 125))
if(!ShowDialog("Project" 0 0 0 0 0 0 0 0 0 "mouse.ico")) ret


it makes my dialog have the icon i wanted but now it doesnt change the dialog to blue and none of my buttons and ids etc. work?
#19
Quote:All arguments before it (hwndowner ... y)

I mean only arguments starting from 4-th can be 0. Don't change the first three.
#20
ok i got ya i fixed it just the way i wanted it thanks for all the help gin


Forum Jump:


Users browsing this thread: 1 Guest(s)