Click here to Skip to main content
14,713,662 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello everyone again I'm so sorry I'm asked many questions in here I think next time admin will block me hhhh :'(

anyway my question this time how I can keep my form always on top but the problem is not how I can do it because I do it by Property ( TopMost = true ) .... the problem is how I can keep it always on top and not on top hhhh I don't know how I can explain what I need ( look at image to understand my question ) ... the form is on top but when I focus on any other TextBox outside my form I can write in it ... please anyone knows what property can do this ??

1 : image what I want

https://i.postimg.cc/rwMRgVH7/1-1.png[^]

2 : image my form

https://i.postimg.cc/Zn5DrzSN/1-2.png[^]

What I have tried:

I tried search in the web and found nothing because I don't know what event exactly I should search for it !!
Posted
Updated 3hrs 5mins ago
v2
Comments
   
"how I can keep it always on top and not on top"
Sorry, that does not make sense, and the images do not help to make it clearer.
hamza mostakim 7hrs 20mins ago
   
Thank you sir for paying attention many times ??
so what about I want when focus on TextBox outside my form I can write in it when click on button ?? what events can do this ??
Richard MacCutchan 7hrs 15mins ago
   
As soon as you click a button in your form the focus moves back to that form, so I don't think that would work. The only way for your application to write into another Window (e.g. TextBox) is to get a handle to that control. But I do not think you can do that just by clicking it.
hamza mostakim 7hrs 5mins ago
   
Yes this exactly what happened " As soon as you click a button in your form the focus moves back to that form " ... anyway Thank you very much for your information sir I will try search again :)
Richard MacCutchan 6hrs 15mins ago
   
In order to get the handle to the TextBox you are looking for, you need to use the EnumWindows function. But there is no easy way to identify which Window matches the handle.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900
亚洲日韩欧美国产专区_一本二本三本道不卡日本_在线不卡日本v二区三区18