Advertisement

09.11.2008 at 02:17AM PDT, ID: 23722189
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.3

'WindowFromPoint' (problem) & Sending the 'Copy' command via API to browsers

Asked by psyfect in Microsoft Visual Basic.Net, Visual Basic Programming

Tags: , ,

There's a problem, and a question.  Thanks in advance for your time!
Basics:
Windows Vista Ultimate, Microsoft Visual Basic 2008 (current build)

Problem:
I have the following, simple code, in a test program:
Public Class Form1

    Private Declare Function WindowFromPoint Lib "user32" (ByVal xpoint As Long, ByVal ypoint As Long) As Long

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Me.Text = WindowFromPoint(Cursor.Position.X.ToString, Cursor.Position.Y.ToString)
    End Sub

End Class

For sake of ease, let's say all I have open is Visual Basic and my form (running after pressing play).  Now, when I highlight my form (which is located in the middle of the screen) with the mouse, the caption displays the hWnd of Visual Basic (NOT the form).

If I click and drag the form to the top of my screen, once the forms top most edge touches the top of the screen, the caption changes to the applications hWnd.

Essentially, it's acting as though it's only searching the top most horizontal row of pixels for windows.  Once I move my form to the top, if I move the mouse horizontally between the two title bars, the caption changes appropriately.  Quite obviously this is not supposed to be the case.  What could be missing?

That's a lot of text for a simple question, but the reason for the hefty sum of points is largely focused on the following question:

Supposing I get the above issue resolved, I intend to send a copy message to miscellaneous browsers.  I have already tested the following code with Notepad, successfully:
Call PostMessage(hWnd&, &H301, 0&, 0&)

Assuming 'WindowFromPoint' works, if I get the hWnd of the editable section of notepad, I can easily copy any selected text.  Modern browsers, however, seem to fail.  I have tried everything from the ancestor window (firefox's hWnd, as a host), to the individual, tab based, hWnds (tab windows).

My absolute last resort is sendkeys (highly unwanted, unless you can sendkeys to hWnds), but I've already tried it and "^(C)" causes firefox to extract the current tab into it's own window (something seems wrong there, because manually performing this just copies selected text).

So, to surmise, I need to resolve my issue with WindowFromPoint so I can then get the hWnd of a window to send a copy command (via api or sendkeys) to either that window or it's parents window (basically whichever window is the command interpreter).

Also, you'd be a great help if you could assist in identifying which window for firefox interprets said command (or how to implement it via getting hWnd->getting hWnd's ancestor->getting title of the ancestor, then sendkeys via appactivate; which I could really figure out if the WindowFromPoint function worked).

Thank you for your time!Start Free Trial
[+][-]09.11.2008 at 02:38AM PDT, ID: 22447682

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual Basic.Net, Visual Basic Programming
Tags: Microsoft, Visual Basic.Net, 2008
Sign Up Now!
Solution Provided By: c0ldfyr3
Participating Experts: 2
Solution Grade: B
 
 
[+][-]09.11.2008 at 02:49AM PDT, ID: 22447738

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 02:50AM PDT, ID: 22447742

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 02:50AM PDT, ID: 22447744

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 02:55AM PDT, ID: 22447784

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 06:56AM PDT, ID: 22449882

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 07:09AM PDT, ID: 22450049

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 07:26AM PDT, ID: 22450227

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 05:42PM PDT, ID: 22456302

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 05:42PM PDT, ID: 22456307

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 05:52PM PDT, ID: 22456348

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 06:55PM PDT, ID: 22456569

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 07:33PM PDT, ID: 22456695

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 07:35PM PDT, ID: 22456705

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 07:50PM PDT, ID: 22456777

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 09:28PM PDT, ID: 22457158

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 09:36PM PDT, ID: 22457177

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2008 at 10:38PM PDT, ID: 22457372

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.12.2008 at 12:48AM PDT, ID: 22457802

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.12.2008 at 01:23AM PDT, ID: 22457934

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.12.2008 at 10:49AM PDT, ID: 22462204

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.12.2008 at 10:54AM PDT, ID: 22462266

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.12.2008 at 01:48PM PDT, ID: 22463758

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.12.2008 at 04:13PM PDT, ID: 22464662

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.17.2008 at 02:04PM PDT, ID: 22503676

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43 / EE_QW_2_20070628