Yes, it is definitely possible. Even when you display a menu or dialogue, this menu / dialogue is a separate action that runs on top of yours. However, you should avoid this as much as possible. It is useful to simultaneously display two actions if one of the actions does not apply to your application (which is the case in menus / dialogs). If both actions come from your own application, you must find a way to combine them into one. Thus, you use less memory and less CPU (since there is no overhead to start a new process).
Felix
source share