Results 1 to 10 of 10

Thread: How to send a key to a minimized window

Hybrid View

  1. #1
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,255

    Re: How to send a key to a minimized window

    Quote Originally Posted by killerrj8 View Post
    hmm i dont know it doesnt work fine ...
    i just want to make a project that refreshes the website after 9 seconds also if it is minimized
    But now it doesnt send keys at all
    Then you're probably using the wrong handle in that code. If it is a web browser control on a VB form you are trying to send the F5 key to then you need to use the web browser control handle, not the forms handle.

    If you just need to refresh after 9 seconds then why not just add a timer that runs once, set timer to 9000 and start it when that certain URL is detected in the browser or something.

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Feb 2011
    Posts
    28

    Re: How to send a key to a minimized window

    Quote Originally Posted by Edgemeal View Post
    Then you're probably using the wrong handle in that code. If it is a web browser control on a VB form you are trying to send the F5 key to then you need to use the web browser control handle, not the forms handle.

    If you just need to refresh after 9 seconds then why not just add a timer that runs once, set timer to 9000 and start it when that certain URL is detected in the browser or something.


    And how can i focuse on the webbrowser ?
    Im not that good in programming sry

  3. #3
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,255

    Re: How to send a key to a minimized window

    Quote Originally Posted by killerrj8 View Post
    And how can i focuse on the webbrowser ?
    Im not that good in programming sry
    When you post/send a message to a control handle the control normally doesn't need to have focus, it only needs to accept/support the messages sent to it.

    If you made both apps then a simple way around it is to just have your browser app save the web browser control handle when it starts up somewhere, like the registry, or a file, etc,. Now your other VB apps just need to retrieve that handle value from where the browser app saved it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width