Click here to Skip to main content
14,741,152 members

Comments by Ayub Kokabi (Top 12 by date)

Ayub Kokabi 4-Aug-19 1:06am View
   
If I change shortcut to double pressing shift, your problem resolved? :)
Ayub Kokabi 3-Aug-19 14:52pm View
   
What about double pressing shift? It can be done with one finger :)
Ayub Kokabi 3-Aug-19 6:25am View
   
Almost all dictionaries like babylon and Qtranslate use this technique to copy text. I don't need formatting. I realized that in my scenario this technique will result better feedback.
Ayub Kokabi 3-Aug-19 4:39am View
   
Which one is simpler?
1. Hold Ctrl and select text -> See the result
2. Copy text, Open app, Past text to the textbox -> see the result.
Ayub Kokabi 3-Aug-19 4:03am View
   
Simplicity.
Good developer bears pain for the comfort of the users.
Ayub Kokabi 3-Aug-19 1:00am View
   
Qtranslate is an example. Download and test.
https://quest-app.appspot.com/
Ayub Kokabi 2-Aug-19 11:40am View
   
Oh Dave, you are absolutely right. My English is not very good. Excuse me.
I think I found the problem. Before getting handle of the window I should have some delay. I've update code, But the new question is: How many second for delaying. For me it only works if I have 1500 ms not less. How about for end users? This make me worry. Do you have another solutions?
Ayub Kokabi 2-Aug-19 9:37am View
   
I intentionally make the code simpler. I'll handle another problems later. I want you to focus on the main problem.

Follow these steps:
1- Run the app,
2- Make it minimize,
3- Open Google Chrome,
4- Hold Ctrl key,
5- Drag some text in a web page,
6- Now, release drag (LeftMouseButtonUp),
Result: It shows a MessageBox contains your selected text properly.
Again, run these steps in notepad, But now It doesn't show correct selected text.

This is my main problem.
please focus on it.
Ayub Kokabi 2-Aug-19 6:19am View
   
No! not yet.
Ayub Kokabi 2-Aug-19 3:12am View
   
Deleted
I've improved code. please note, my application is minimized when started. Before sending Ctrl + C I get handle of windows which cursor is on it. (GetWinowUnderCursor()). this windows may be notepad or chrome or edge, etc. Then setforgroundwindow() set focus on previous hWnd (handle of window).
Ayub Kokabi 2-Aug-19 3:11am View
   
I've improved my code. I've used this library for sendinput:
https://archive.codeplex.com/?p=inputsimulator
Ayub Kokabi 2-Aug-19 3:10am View
   
I've improved code. please note, my application is minimized when started. Before sending Ctrl + C I get handle of windows which cursor is on it. (GetWinowUnderCursor()). this windows may be notepad or chrome or edge, etc. Then setforgroundwindow() set focus on previous hWnd (handle of window).