PC Review Forums Newsgroups Windows XP Windows XP Embedded Windows popup message boxes

Reply

Windows popup message boxes

 
Thread Tools Rate Thread
Old 31-01-2007, 06:14 PM   #1
jcavo
Guest
 
Posts: n/a
Default Windows popup message boxes


Hi,

I develop applications with .NET #C for our XPe devices. When I plug a USB
memory stick or printer into the USB connectors on a device, I will get a
popup message box on top of my application as it happens on the PCs. Is
there a way that I can capture the moment and have control over what to do
instead of the default popup message box?

Thanks a lot in advance.

Xiaozu


  Reply With Quote
Old 01-02-2007, 12:27 AM   #2
KM
Guest
 
Posts: n/a
Default Re: Windows popup message boxes

Xiaozu,

What you are asking about is very hard to implement in general case. You basically want to reverse engineer some other app(s)
(system components) on fly to change the app logic. It may be much easier to work around particular popups.

I couldn't understand what popup you are referring to. Only popup that shows up when you plug in a USB mass storage device (memory
stick, e.g.) is AutoPlay window - feature of Explorer shell. Also, you may get a serious of notifications in system notification
area notifying you about the driver/application events that are going on in the system when you plugged in the device.
Probably the best way to handle such events is to have your own shell instead of Explorer shell. Otherwise you can specify a custom
Autoplay handler for USB devices or etc.

If you meant by popup a message box and you just want to suppress the popup, you can use the "Message Box Default Reply" component
of FP2007. Or, a little bit different, you can use this registry keys to get rid of the system popups:
http://msdn.microsoft.com/embedded/...ps/default.aspx.


If the above doesn't asnwer your quesiton, could you post the info about what exactly popup you are seeing? A screenshot of the
window would probably help.
--
=========
Regards,
KM

> Hi,
>
> I develop applications with .NET #C for our XPe devices. When I plug a USB memory stick or printer into the USB connectors on a
> device, I will get a popup message box on top of my application as it happens on the PCs. Is there a way that I can capture the
> moment and have control over what to do instead of the default popup message box?
>
> Thanks a lot in advance.
>
> Xiaozu



  Reply With Quote
Old 01-02-2007, 12:46 AM   #3
Sean Liming \(eMVP\)
Guest
 
Posts: n/a
Default Re: Windows popup message boxes


Message Box Default Reply is the FP2007 component you want to use to
suppress teh system pop-ups.

For 3rd party applications messages, you could write a service that scans
the desktop looking for the title of the message box and just close it / log
it.

Regards,

Sean Liming
www.sjjmicro.com / www.seanliming.com
XP Embedded Book Author - XP Embedded Advanced, XP Embedded Supplemental
Toolkit



"KM" <konstmor@nospam_yahoo.com> wrote in message
news:uF2p%23eZRHHA.996@TK2MSFTNGP02.phx.gbl...
> Xiaozu,
>
> What you are asking about is very hard to implement in general case. You
> basically want to reverse engineer some other app(s) (system components)
> on fly to change the app logic. It may be much easier to work around
> particular popups.
>
> I couldn't understand what popup you are referring to. Only popup that
> shows up when you plug in a USB mass storage device (memory stick, e.g.)
> is AutoPlay window - feature of Explorer shell. Also, you may get a
> serious of notifications in system notification area notifying you about
> the driver/application events that are going on in the system when you
> plugged in the device.
> Probably the best way to handle such events is to have your own shell
> instead of Explorer shell. Otherwise you can specify a custom Autoplay
> handler for USB devices or etc.
>
> If you meant by popup a message box and you just want to suppress the
> popup, you can use the "Message Box Default Reply" component of FP2007.
> Or, a little bit different, you can use this registry keys to get rid of
> the system popups:
> http://msdn.microsoft.com/embedded/...ps/default.aspx.
>
>
> If the above doesn't asnwer your quesiton, could you post the info about
> what exactly popup you are seeing? A screenshot of the window would
> probably help.
> --
> =========
> Regards,
> KM
>
>> Hi,
>>
>> I develop applications with .NET #C for our XPe devices. When I plug a
>> USB memory stick or printer into the USB connectors on a device, I will
>> get a popup message box on top of my application as it happens on the
>> PCs. Is there a way that I can capture the moment and have control over
>> what to do instead of the default popup message box?
>>
>> Thanks a lot in advance.
>>
>> Xiaozu

>
>



  Reply With Quote
Old 01-02-2007, 04:26 PM   #4
jcavo
Guest
 
Posts: n/a
Default Re: Windows popup message boxes

Thank you for the reply and I'm looking into the areas you suggested.

To clearify myself, the popup I was referring to is something like the
AutoPlay window for a USB memory stick. We have several USB connectors on
the instruments that we're developing. In gerenal I'd would to to suppress
any popup whenever a user plug something into a USB connector, whether it's
supported or not by our instruments.

I was looking at a Win32 API called RegisterDeviceNotification(). From what
I read this function will direct the system attention to my handler when a
new device is plugged in. Does that mean my handler will take the place of
these window popups and prevent them from showing up? If this is the case,
I can have my handler future exame the new device and put out my own
appropriate messages.

Since we're on the topic, is there a way to prevent any popups for
UnhandledException from showing up? Will the MSDN article you referenced do
that by using the registry keys?

Thank you very much,

Xiaozu

"KM" <konstmor@nospam_yahoo.com> wrote in message
news:uF2p%23eZRHHA.996@TK2MSFTNGP02.phx.gbl...
> Xiaozu,
>
> What you are asking about is very hard to implement in general case. You
> basically want to reverse engineer some other app(s) (system components)
> on fly to change the app logic. It may be much easier to work around
> particular popups.
>
> I couldn't understand what popup you are referring to. Only popup that
> shows up when you plug in a USB mass storage device (memory stick, e.g.)
> is AutoPlay window - feature of Explorer shell. Also, you may get a
> serious of notifications in system notification area notifying you about
> the driver/application events that are going on in the system when you
> plugged in the device.
> Probably the best way to handle such events is to have your own shell
> instead of Explorer shell. Otherwise you can specify a custom Autoplay
> handler for USB devices or etc.
>
> If you meant by popup a message box and you just want to suppress the
> popup, you can use the "Message Box Default Reply" component of FP2007.
> Or, a little bit different, you can use this registry keys to get rid of
> the system popups:
> http://msdn.microsoft.com/embedded/...ps/default.aspx.
>
>
> If the above doesn't asnwer your quesiton, could you post the info about
> what exactly popup you are seeing? A screenshot of the window would
> probably help.
> --
> =========
> Regards,
> KM
>
>> Hi,
>>
>> I develop applications with .NET #C for our XPe devices. When I plug a
>> USB memory stick or printer into the USB connectors on a device, I will
>> get a popup message box on top of my application as it happens on the
>> PCs. Is there a way that I can capture the moment and have control over
>> what to do instead of the default popup message box?
>>
>> Thanks a lot in advance.
>>
>> Xiaozu

>
>



  Reply With Quote
Old 01-02-2007, 04:28 PM   #5
jcavo
Guest
 
Posts: n/a
Default Re: Windows popup message boxes

Thank you. It's nice to get online help like this. -- Xiaozu
"Sean Liming (eMVP)" <sean_liming@sjjmicro.com> wrote in message
news:uGQ7UpZRHHA.4448@TK2MSFTNGP04.phx.gbl...
>
> Message Box Default Reply is the FP2007 component you want to use to
> suppress teh system pop-ups.
>
> For 3rd party applications messages, you could write a service that scans
> the desktop looking for the title of the message box and just close it /
> log it.
>
> Regards,
>
> Sean Liming
> www.sjjmicro.com / www.seanliming.com
> XP Embedded Book Author - XP Embedded Advanced, XP Embedded Supplemental
> Toolkit
>
>
>
> "KM" <konstmor@nospam_yahoo.com> wrote in message
> news:uF2p%23eZRHHA.996@TK2MSFTNGP02.phx.gbl...
>> Xiaozu,
>>
>> What you are asking about is very hard to implement in general case. You
>> basically want to reverse engineer some other app(s) (system components)
>> on fly to change the app logic. It may be much easier to work around
>> particular popups.
>>
>> I couldn't understand what popup you are referring to. Only popup that
>> shows up when you plug in a USB mass storage device (memory stick, e.g.)
>> is AutoPlay window - feature of Explorer shell. Also, you may get a
>> serious of notifications in system notification area notifying you about
>> the driver/application events that are going on in the system when you
>> plugged in the device.
>> Probably the best way to handle such events is to have your own shell
>> instead of Explorer shell. Otherwise you can specify a custom Autoplay
>> handler for USB devices or etc.
>>
>> If you meant by popup a message box and you just want to suppress the
>> popup, you can use the "Message Box Default Reply" component of FP2007.
>> Or, a little bit different, you can use this registry keys to get rid of
>> the system popups:
>> http://msdn.microsoft.com/embedded/...ps/default.aspx.
>>
>>
>> If the above doesn't asnwer your quesiton, could you post the info about
>> what exactly popup you are seeing? A screenshot of the window would
>> probably help.
>> --
>> =========
>> Regards,
>> KM
>>
>>> Hi,
>>>
>>> I develop applications with .NET #C for our XPe devices. When I plug a
>>> USB memory stick or printer into the USB connectors on a device, I will
>>> get a popup message box on top of my application as it happens on the
>>> PCs. Is there a way that I can capture the moment and have control over
>>> what to do instead of the default popup message box?
>>>
>>> Thanks a lot in advance.
>>>
>>> Xiaozu

>>
>>

>
>



  Reply With Quote
Old 01-02-2007, 06:53 PM   #6
KM
Guest
 
Posts: n/a
Default Re: Windows popup message boxes

Xiaozu,

Here is some general and technical info on the Autoplay feature of XP:
http://msdn.microsoft.com/library/d...lay2k_using.asp
http://msdn2.microsoft.com/en-us/library/aa969686.aspx

As I mentioned earlier, you can implement your own Autoplay handler. It is rather a COM object you have to register in the system.
Here is a sample project that can get you started: http://www.codeproject.com/cs/system/AutoplayDemo.asp
Or, better, here: http://msdn.microsoft.com/msdnmag/i...ay/default.aspx

You can also remove other autoplay handlers for USB device and/or make your own as default with no system prompt appearing. Here is
documented all about AutoPlay registry entries:
http://msdn.microsoft.com/library/d...2k_cookbook.asp

> Thank you for the reply and I'm looking into the areas you suggested.
>
> To clearify myself, the popup I was referring to is something like the AutoPlay window for a USB memory stick. We have several
> USB connectors on the instruments that we're developing. In gerenal I'd would to to suppress any popup whenever a user plug
> something into a USB connector, whether it's supported or not by our instruments.
>
> I was looking at a Win32 API called RegisterDeviceNotification(). From what I read this function will direct the system attention
> to my handler when a new device is plugged in. Does that mean my handler will take the place of these window popups and prevent
> them from showing up? If this is the case, I can have my handler future exame the new device and put out my own appropriate
> messages.
>
> Since we're on the topic, is there a way to prevent any popups for UnhandledException from showing up? Will the MSDN article you
> referenced do that by using the registry keys?


http://msdn.microsoft.com/embedded/...ps/default.aspx
Hopefully you don't include Error Reporting or Dr.Watson component in to your config.

--
=========
Regards,
KM

> Thank you very much,
>
> Xiaozu
>
> "KM" <konstmor@nospam_yahoo.com> wrote in message news:uF2p%23eZRHHA.996@TK2MSFTNGP02.phx.gbl...
>> Xiaozu,
>>
>> What you are asking about is very hard to implement in general case. You basically want to reverse engineer some other app(s)
>> (system components) on fly to change the app logic. It may be much easier to work around particular popups.
>>
>> I couldn't understand what popup you are referring to. Only popup that shows up when you plug in a USB mass storage device
>> (memory stick, e.g.) is AutoPlay window - feature of Explorer shell. Also, you may get a serious of notifications in system
>> notification area notifying you about the driver/application events that are going on in the system when you plugged in the
>> device.
>> Probably the best way to handle such events is to have your own shell instead of Explorer shell. Otherwise you can specify a
>> custom Autoplay handler for USB devices or etc.
>>
>> If you meant by popup a message box and you just want to suppress the popup, you can use the "Message Box Default Reply"
>> component of FP2007. Or, a little bit different, you can use this registry keys to get rid of the system popups:
>> http://msdn.microsoft.com/embedded/...ps/default.aspx.
>>
>>
>> If the above doesn't asnwer your quesiton, could you post the info about what exactly popup you are seeing? A screenshot of the
>> window would probably help.
>> --
>> =========
>> Regards,
>> KM
>>
>>> Hi,
>>>
>>> I develop applications with .NET #C for our XPe devices. When I plug a USB memory stick or printer into the USB connectors on a
>>> device, I will get a popup message box on top of my application as it happens on the PCs. Is there a way that I can capture the
>>> moment and have control over what to do instead of the default popup message box?
>>>
>>> Thanks a lot in advance.
>>>
>>> Xiaozu

>>
>>

>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off