tmyroadctfig / twaindotnet

MIT License
179 stars 117 forks source link

Window immediately pops behind other windows on launch. #15

Open b-levitt opened 10 years ago

b-levitt commented 10 years ago

The instant I add "new Twain(new WinFormsWindowMessageHook(this));" to my winform, that form falls out of the foreground when it starts up. It ends up jumping behind other windows and I have to click on it or its start bar icon to bring it forward again. I'm not sure what the issue since the message prefilter isn't called until a scan, but it is definatly related to this line of code.

norbert-olah commented 6 years ago

Yes, the same happens with me. Workarund until better solution found: calling this.Focus(); in the ScanningComplete event handler to bring back the window to the front. Not the best, but less annoying than having to get back my app from the taskbar.