Solved

icon tray question powerbuilder...

Posted on 2004-10-11
5
1,026 Views
Last Modified: 2013-12-26
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"
0
Comment
Question by:stefanosn
  • 3
  • 2
5 Comments
 
LVL 33

Expert Comment

by:sajuks
ID: 12274685
you will need to declare it as an INstance variable
n_icontray in_tray
0
 
LVL 33

Expert Comment

by:sajuks
ID: 12274721
n_icontray is a user object and contains the major external functions and declrns
0
 

Author Comment

by:stefanosn
ID: 12274779
// 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(this, "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(this, "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?
0
 
LVL 33

Accepted Solution

by:
sajuks earned 50 total points
ID: 12274809
in the example that you have check the instance variables yoiu must have somnething like
n_icontray in_tray
Integer ii_index
Boolean ib_timer
in the window w_main

Also the function that are defined in the window ( w_main) needsto be copied to your window.

0
 

Author Comment

by:stefanosn
ID: 12274817
ok found it at the same place global variables at the object...n_icontray

thank you!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now