how close the window " Room Statistics " auto after get own

This topic contains 2 replies, has 2 voices, and was last updated by  light 2012 7 years, 2 months ago.

  • Author
    Posts
    1 Star2 Stars3 Stars4 Stars5 Stars Rate it First!
  • #15174
    Member
    Posts: 62

    Hi,
    In attachment example to get owner name bby String
    wonderful work
    Thanks String
    Last question of how close the window ” Room Statistics ” auto after get owner name ?
    🙂

    Attachments:
    1. examptyle.zip

    #38104
    Administrator
    Posts: 419

    You can close a window by sending it the WM_CLOSE command.
    To send the message to the window, use SendMessage like what is used to send messages to other windows used in the Command5 button.

    Call SendMessageLong(Handle of Window to Close, WM_CLOSE, 0, 0)

    Notice, that the call requires the handle of the window to be closed. So, get the handle using FindWindow. FindWindow requires the windows Class Name and its Title in order to return the handel. We already know the class name from other code in the example and the windows title.

    'Close the room stats window
    ihnd = FindWindow("#32770", "Room Statistics")
    Call SendMessageLong(ihnd, WM_CLOSE, 0, 0)
    #38105
    Member
    Posts: 62

    well it working thank you

You must be logged in to reply to this topic.