Announcement

Collapse
No announcement yet.

Graphic Inkey$ or WaitKey$

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Gösta H. Lovgren-2
    replied
    Originally posted by Gary Beene View Post
    Use

    Code:
    Graphic Attach hWin, 0
    Thanks Gary. That did the trick. Just what I was looking for.

    I see now that for it to work the way I had it (Attaching to a specific ID) I would have to trap it in a Callback.

    Leave a comment:


  • Dave Biggs
    replied
    Like Gary said but also..
    To handle the Graphic Window being closed 'manually'..
    Code:
        Graphic inkey$ To s$
        If IsFalse IsWin(hWin) Then Exit Function   ' exit loop if window closed
        ...

    Leave a comment:


  • Gary Beene
    replied
    Use

    Code:
    Graphic Attach hWin, 0
    The Help file can be confusing on what goes in the second position.

    Also, see a post I made "DDT vs Graphic Window". Your problem came up in that post.
    Last edited by Gary Beene; 21 Jan 2009, 01:19 AM.

    Leave a comment:


  • Gösta H. Lovgren-2
    started a topic Graphic Inkey$ or WaitKey$

    Graphic Inkey$ or WaitKey$

    I have to manually close this Graphic Window (Red X, Alt Tab) and then End it in Task Mgr as well. It never gets to the Msgbox.

    '
    Code:
    'PBWIN 9.00 - WinApi 05/2008 - XP Pro SP3
    #Compile Exe                                
    #Dim All 
    #Include "WIN32API.INC"
    #Include "COMDLG32.INC"
    %Id_Dial_Graphic = 1000
    Function PBMain             
      ErrClear
        Local hwin As Dword, s$
        Graphic Window "Testing", 100, 200, 200, 100 To hWin
        Graphic Attach hWin, %Id_Dial_Graphic
    g1:
        Graphic inkey$ To s$
        If Len(s$) = 0 Then GoTo g1 'no key pressed
        Graphic Window End
      
       ? "Wait key works" 'Never gets here
    End Function 'Applikation beenden
    '
Working...
X