05-20-2024, 07:01 PM
Const SWP_NOMOVE = &H0002 'ignores x and y position parameters
setting program to display always on top of other windows without having the focus?
|
05-20-2024, 07:01 PM
Const SWP_NOMOVE = &H0002 'ignores x and y position parameters
05-20-2024, 07:24 PM
Do both programs have to be in the same place on the monitor?
If not, you can change these lines. Code: (Select All)
und Code: (Select All)
This means that both programs would be next to each other, but only the one that is set to foreground remains in the foreground and the other one could then fade into the background. I don't know what you're trying to do, maybe you could also play around with the command (_SCREENICON). So that the program that is not in the foreground disappears from the monitor?
05-20-2024, 07:28 PM
Sorry. I didn't notice the need for _SCREENCLICK. What you're looking for is:
https://qb64phoenix.com/qb64wiki/index.php/SCREENX https://qb64phoenix.com/qb64wiki/index.php/SCREENY (05-20-2024, 07:24 PM)Steffan-68 Wrote: Do both programs have to be in the same place on the monitor?Yes, see below for why... (05-20-2024, 07:28 PM)SMcNeill Wrote: Sorry. I didn't notice the need for _SCREENCLICK. What you're looking for is: Thanks for the info. Now I'm going to switch gears and show you what this was all for: reading multiple mice from QB64PE Basically, I have 2 programs running, where program A is just for reading separate input from multiple mice plugged into the computer, but doesn't display anything to the screen. It needs to have the focus and be positioned directly under the other window, Program B, which is the main program gets the mouse coordinates from program A, and displays stuff on the screen. It needs to be on top, but can't have the focus, or else program A won't work. The two windows need to be sitting on top of each other so the user's mouse movements line up with the display. (I would like to get everything working in one program, but to do that Spriggsy thought that both would have to have the same window handle registered, but we never really figured that out. So I came up with this kludgey 2-program solution!)
05-21-2024, 02:50 AM
(05-20-2024, 07:28 PM)SMcNeill Wrote: Sorry. I didn't notice the need for _SCREENCLICK. What you're looking for is:I think I need the opposite of _SCREENCLICK - I need to make the program on top un-clickable, so that it doesn't steal the focus -and mouse click event- from the program underneath that has the focus, and reads all the mouse input. Is it possible to make a window not-clickable?
05-21-2024, 04:01 AM
(05-18-2024, 08:17 PM)SMcNeill Wrote:(05-18-2024, 04:20 PM)grymmjack Wrote: I wonder if it's possible to do this on Mac and Linux? If so, maybe we could add a $WINDOW_ONTOP:ON or something? Thanks @SMcNeill. I'll review this. This seems too easy (i kid)
05-21-2024, 04:04 AM
(05-20-2024, 07:39 PM)madscijr Wrote:(05-20-2024, 07:24 PM)Steffan-68 Wrote: Do both programs have to be in the same place on the monitor?Yes, see below for why... @madscijr I have to ask. Why are you using 2 mice at once? LOL! My brain can barely handle 1 mouse at a time. This sounds fascinating and I'm really curious why you'd want to do this. Your ingenious approach is fascinating as well. Goes to show where there is a will there is a way. (05-21-2024, 04:04 AM)grymmjack Wrote:Ha! OK this is going to sound ridiculous, but my initial motivation was simple:(05-20-2024, 07:39 PM)madscijr Wrote:@madscijr I have to ask. Why are you using 2 mice at once? LOL! My brain can barely handle 1 mouse at a time. This sounds fascinating and I'm really curious why you'd want to do this. Your ingenious approach is fascinating as well. Goes to show where there is a will there is a way.(05-20-2024, 07:24 PM)Steffan-68 Wrote: Do both programs have to be in the same place on the monitor?(05-20-2024, 07:28 PM)SMcNeill Wrote: Sorry. I didn't notice the need for _SCREENCLICK.Thanks for the info. Now I'm going to switch gears and show you what this was all for: I want to make 4-player or 8-player Pong games, that people can play on the same computer where everyone gets a mouse! Even a 2-player Pong game - why in the 40 years since PCs have had mouses, has no one ever done this? How many Pong games have you seen where the players have to use a keyboard? What is this crap?? LOL For paddle games to be playable you need a mouse! It's long overdue! USB optical mice are cheap and plentiful. Beyond that, multiple mice will be useful for games, or collaborative drawing, puzzles, etc. Anything that needs a pointer or a spinner. And racing games - it's super easy and cheap to turn an optical mouse into a racing wheel - all you need is a broom handle or wood dowel with a wheel at one end, and 6 or so inches of the other end stuck into a section of foam pool noodle. Then you just mount the mouse against that with duck tape or whatever, and voila! Instant racing wheel! It works great for games like Super Sprint in MAME, I've tried it. But to make multiplayer games like Indy 800, we need multiple mice! Taking the idea even further, did you know the Raw Input API can also do keyboards? What about a split-screen multiplayer text adventure or coding game, where each player has their own keyboard and can fully type? With the Raw Input API, we can do that!!
05-21-2024, 06:54 PM
Maybe you can do something with these programs.
The first always keeps the window in the foreground and also gives it focus. With the second you can make the window invisible. You just have to think about how you can shoot it again if you can't see it. Code: (Select All)
Code: (Select All)
05-21-2024, 07:36 PM
(05-21-2024, 06:54 PM)Steffan-68 Wrote: Maybe you can do something with these programs.Thank you - I'll give that a look! |
« Next Oldest | Next Newest »
|