Click here to Skip to main content
16,004,727 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a windows form Form1. During the load of Form1 I am displaying form in maximized state. There is a condition within Form1 and if that is satisfied another form Form2 should be visible simumtaneously but Form2 should be in front and Form1 should be behind that. I cannot use showdialog() as there are code after showing Form2 which needs to be executed. I am using .BringToFront() but its not working for me. I cannot use Topmost=true;
as it now remains on top so If now I try to open any Form3 it opens but remains in background.
Can any1 help me with a better approach?
Posted

1 solution

You've ignored and used all available ways to do this. OK, JUST ONE MORE...
VB
use form2.Focus()
 
Share this answer
 
Comments
VipinKumar Maurya 5-Dec-15 5:20am    
This did not worked in my case
VipinKumar Maurya 5-Dec-15 5:21am    
Thanks! I got a workaround

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