stefanosn
asked on
icon tray question powerbuilder...
i download an example that puts an icon to the tray of windows bar. I checked it and it works.
I insert the menu (called m_icontray) and the connection (called n_icontray) (dont know exacly what it is or how to create this connection). So i import them to one project i created and i tried to call this code:
// add window icon to tray
in_tray.of_add_icon(this)
// register hotkey
If Not in_tray.of_RegisterHotKey( this, 1, in_tray.MOD_WIN, in_tray.KeyF8) Then
MessageBox(this.title, "RegisterHotKey failed, hotkey already in use!")
End If
this code exists at the open event of the form. But when i save it i have an error saying that the in_tray variable is undefined. I search to find this variable on the prototype project but couldn't found it. Where this variable might be? help please...the project is from the examples page of sybase(you have to login) and is called "icontray.zip"
I insert the menu (called m_icontray) and the connection (called n_icontray) (dont know exacly what it is or how to create this connection). So i import them to one project i created and i tried to call this code:
// add window icon to tray
in_tray.of_add_icon(this)
// register hotkey
If Not in_tray.of_RegisterHotKey(
MessageBox(this.title, "RegisterHotKey failed, hotkey already in use!")
End If
this code exists at the open event of the form. But when i save it i have an error saying that the in_tray variable is undefined. I search to find this variable on the prototype project but couldn't found it. Where this variable might be? help please...the project is from the examples page of sybase(you have to login) and is called "icontray.zip"
n_icontray is a user object and contains the major external functions and declrns
ASKER
// toggle timer event on/off
If ib_timer Then
Timer(0)
Else
Timer(1)
End If
-------------------------- --------
// change icon in the tray
If in_tray.of_modify_icon(thi s, "shell32.dll", ii_index) Then
ii_index = ii_index + 1
Else
// first call failed so go back to icon #0
in_tray.of_modify_icon(thi s, "shell32.dll", 0)
ii_index = 1
End If
What about these two?
ib_timer undefined variable
ii_index undefined variable
where should i put these and what might be integer,long?
If ib_timer Then
Timer(0)
Else
Timer(1)
End If
--------------------------
// change icon in the tray
If in_tray.of_modify_icon(thi
ii_index = ii_index + 1
Else
// first call failed so go back to icon #0
in_tray.of_modify_icon(thi
ii_index = 1
End If
What about these two?
ib_timer undefined variable
ii_index undefined variable
where should i put these and what might be integer,long?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok found it at the same place global variables at the object...n_icontray
thank you!
thank you!
n_icontray in_tray