[WD20] Custom Toast Display [SOLVED]

Startbeitrag von Curtis am 15.06.2016 15:37

I created my own window and procedure for a cleaner looking Toast. It works great, but in a couple places I need my window to behave more like the system ToastDisplay in that I need it to not steal the focus from the calling window.

Right now I use OpenChild(WIN_MyToast,sMessage,nColor,nDisplayLength,hPos,vPos). I have tried all of the Open functions with no success. Every time I open my Toast window it steals the focus from the calling window which is still trying to read and parse input data.

Is there a way to open a window that does not get the focus?


Re: [WD20] Custom Toast Display

Hi Curtis,

I haven't tested, but did you try to:

1. Just after the openchild, do a setstatus of your current window?

2. Do your openChild from within an invisible window started first? I'm using this technique for complex UI: all windows opening and closing are done from the first and invisible window, and it knows to do it from a message (postmessage) sent to it by whoever needs it...

Best regards

von Fabrice Harari - am 15.06.2016 15:51

Re: [WD20] Custom Toast Display

1. This won't work for me. What I am doing is scanning a driver's license barcode and filling a form with the parsed information. So I want to scan and start reading in data and then show the Toast without taking focus off of the control that is reading in the data.

2. Still need to try this way.

von Curtis - am 15.06.2016 17:34

Re: [WD20] Custom Toast Display

Hi Curtis,

I think that a simple returntocapture after your openchild should do the trick...

at least, with the information you gave me, I don't see why it wouldn't

Best regards

von Fabrice Harari - am 15.06.2016 21:07

Re: [WD20] Custom Toast Display

My problem is that I have the user focus on an edit control, then scan the barcode. It begins reading in all the data separated by "|". Once it begins reading in the data I can't open my custom Toast window because it steals the focus and the edit control does not get all of the data from the license.

It looks like I've got it working with a variation of your second idea. When the edit field gains focus I open my custom Toast window, but I make it invisible. Then once the scan begins I make it visible. This way the focus stays on the edit control and all the data is parsed correctly.


von Curtis - am 16.06.2016 15:26
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.