Reading Crystal Text from code window

By Slayer_ ·
In our older version of Crystal, there is no way to block comment out code. So me and co-worker wrote short program that would read what is on the clipboard, comment it out and SendKeys("^v") it back to the active window.

Everything on it works, except one thing, there seems to be no good way to automate the getting of the text. SendKeys("^c") and Sendkeys("^{Insert}") does not work. Nor does Getting the foreground window (GetForgroundWindow) and reading the first imbedded Window, which appears to be the Edit field. If I sendmessage(h1, WM_Copy,0,sTemp) I get nothing. I also get nothing from a straight up GetText or GetWindowText. I have slightly more luck using rich text box messages but what I get is gibberish.

To Sum it up, Using Send keys for the Copy command does not work, and I cannot seem to use the API Messaging system to get the text. What else can we do?

This thing is made in VB6.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Related Discussions

Related Forums