-2

I'm developing an application in which, if I press a combination of keys shows me a popup inside the form of another external application, I mean something like the "windows game menu", but I have no idea how to show the popup in the external application. I leave you an image to make you understand what I mean as a popup. sorry for my english but I do not speak. Thanks in advance

image

  • The picture looks a bit consufisng to me. So just to clarify you made 2 VB.net applications and you want that once you detect a key combination on application1 the application2 will show a messagebox ? That will require a deep knowledge of programming and will involve WM_SENDMESSAGE interaction , you can find some details about the method here: https://learn.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-sendmessage Both application must be designed to allow this kind of interaction, the one which is sending the command request (message) and the one which is getting it. – A. Lion Aug 29 '18 at 16:11
  • no, i have only one vb.net application, and i'd like to show a popup similar to the one i send before in a non vb.net application (type as chrome, steam, and some more) – Michela Tabacchi Aug 29 '18 at 16:23
  • Perhaps there's a language barrier here. Did you mean to say that you want the pop-up to be _on top of_ the other application? – 41686d6564 stands w. Palestine Aug 29 '18 at 16:31
  • yes, it can work too, but i need it to work in fullscreen too – Michela Tabacchi Aug 29 '18 at 16:34
  • but it would be better inside the application – Michela Tabacchi Aug 29 '18 at 17:04

1 Answers1

0

You cannot control one application form of another application without having access to its code or knowing if a queue messaging command has been set for doing it. It is possible to program a window of your application to be shown over any other , likely this will not be working over a Directx - OpenGL full-area, i.e. when you are playing a videogame that is using the same functionality because the last one is winning. In this case your popup will be visible barely as a flick, but considering standard form application you can make it to stand over by working with userd32.dll method "SetWindowPos" with the flag HWND_TOPMOST. You will need first to detect the position of the application window, or if it is a fullscreen one you can simply detect the size of the screen and consider to place it in the center, then you can set the position of your application form "pop-up".

Details about the SetWindowPos , which is among windwows base dll but can be invoked from .net here below:

https://learn.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-setwindowpos Make a window topmost using a window handle

A. Lion
  • 673
  • 5
  • 12