(Ultimately I’m trying to change the title bar, but for a unity app running multiple instances on the same machine, and each app needs a title to match its purpose.)
I’m trying to get the windows Handle, so I can change the title.
All the posts I’ve found on this require 1 of two things. (neither work for me)
A) That the window will have focus.
- via [DllImport(“user32.dll”, EntryPoint = “GetActiveWindow”)]
- Cannot guarantee, I’m starting up to 4 instances at the same time. Only 1 will be in the fore front.
B) That you already know the title and will find the window by it.
- via [DllImport(“user32.dll”, EntryPoint = “FindWindow”)]
- Cannot guarantee. up to 4 windows will have the same title.
I’m looking for a solution to get the window handle for from the instance trying to get the handle.
- Thanks!