Hi Rick,

    This is a tree view item but I think all key processes are the same but may 
be wrong.

    I capture the event change, store the data of the event which submitted the 
data. Waited until the key processed event to insure that the data may or 
should be related to the key in question. 

    This is what I did inside the Trek game. I have extra stuff there from the 
Uninstall program because in the future I may allow people to store information 
in the game...

        Bruce

 MainDialogProc = False
 If dEvent = treeviewKeyDown Then
  TV_KeyDown = True
  myTV_KeyConnection = ConnectEvent( Keyboard, "OnKeyProcessedUp", 
"OnKeyProcessedUp")
 End If
 If dEvent = treeviewClicked Then
  TV_MouseDown = True
  myTV_MouseConnection = ConnectEvent( Mouse, "OnButtonUp", "OnButtonUp")
 End If
 If dEvent = treeviewSelectionChange Or dEvent = treeviewClicked Then 'Or 
dEvent = treeviewItemExpanded Then
  Set TV_Obj = dControl.selected
  Set TV_ObjControl = dControl
  TV_Name = TV_Obj.Text
  TV_Data = TV_Obj.Data
  TV_Array(1) = TV_Data
...
End Function

Sub OnKeyProcessedUp( ky, md)
 Disconnect myTV_KeyConnection
 myTV_KeyConnection = 0
 If TV_KeyDown and ky = vk_Space and md = 0 Then
  Silence
'  Speak " Name Is: " & TV_Name & " Item " & TV_Data & " Whose Item Was Space 
Barred "
  If treeNamesDict.Exists( TV_Name) Then Speak treeNamesDict( TV_Name)
  Queue "LaunchURLEmail"
 End If
 TV_KeyDown = False
End Sub

Sub OnButtonUp( button)
 Disconnect myTV_MouseConnection
 myTV_MouseConnection = 0
 If TV_MouseDown and button = 0 Then
'  Speak " Name Is: " & TV_Name & " Item " & TV_Data & " Whose Item Was Mouse 
Clicked "
  If treeNamesDict.Exists( TV_Name) Then Speak treeNamesDict( TV_Name), 2
  Queue "LaunchURLEmail"
 End If
 TV_MouseDown = False
End Sub

Reply via email to