Problems Selecting With Mouse
I am trying to create a screen capture program. Thanks to a post on this site, I've found that one can use the window shape object with a transparent background and capture what is in the transparent area.
Now I'm trying to have the user select the portion of the screen to capture. When they click a button, I'm tring to store the starting x,y and ending x,y when they click and drag the mouse and unclick.
No matter what I've tried, clicking the original button trips the colecting of the xys. I've tried an inactive group, limiting all action, setting a flag, setting a time delay. No matter what I've tried it still reacts to the clicking the original button.
Any suggestions on how to get around this appreciated.
Steve
Re: Problems Selecting With Mouse
try this, think it might work:
http://lembi2001.googlepages.com/Application.mfa
Re: Problems Selecting With Mouse
Thanks lembi2001, that solved one problem. I think the error was coming from my using the negate repeat while left mouse is pressed condition to get the 2nd set of xy values. This was always true and therefore no matter what I did to delay it, it was still always true. Your example gets around the use of that condition.
Now what I've found out, is that the application does not pick up the mouse click when the mouse is clicked in the transparent area of the window shape object. The whole point was to be able to have the user see and choose what is not on the application screen, but what is on the real screen.
Step by step.
Steve
Re: Problems Selecting With Mouse
Can you upload the file and i can have a look??
Re: Problems Selecting With Mouse
Re: Problems Selecting With Mouse
Sorry
can't open this as it uses the dev version and i only have standard.
Re: Problems Selecting With Mouse
I've uploaded a new file and removed the kernel object which I think was causing the problem.
Steve
Re: Problems Selecting With Mouse
I think i know what the problem is.
you are misunderstanding the use of the window shap control object.
The black area you have in the image is ignored. The red border is not a border but the window itself.
let me try and explain it like this
http://lembi2001.googlepages.com/untitled.PNG
The image above shows the setup you have.
What ever is in behind the black square is not part of your application. What you need it to do is "grab" the desktop instead.
try this:
Example
Hope that helps
Re: Problems Selecting With Mouse
Lembi,
Thanks for the suggestions. What I am trying to do is exactly that - capture the desktop. I don't want to capture the application. That is how I've done it in the past - captured the screen and placed it in the application. Then I've captured the portion that I really wanted from the application screen. But the final resolution of the captured image stinks.
I have a working app which will capture the screen behind the application screen using the method that you took a look at. which I would be glad to share a copy of the file with you, but it uses the Kernel extension and would require MMF 2 dev.
Let me know if you would be interested.
Steve