[RESOLVED] [2008] problems with forms
HI
I am creating a project with 2 forms
the first form (the main) will appear un the taskbar
and the second one will not
I have a button in 'form1' that will show 'form2', now I want to make 'form2' "top of all" so if we select 'form1' 'form2' will be at the top , but if I minimize 'form1' 'form2' will minimize automaticly and also if I restore 'form1' 'form2' will restore
and how to keep the selected text in 'form1' highlighted while 'form2' is active
thanks
Re: [2008] problems with forms
hi,
See if this helps. I had found it on the internet but forgot the link, it might solve your problem
Re: [2008] problems with forms
Quote:
Originally Posted by mahammad()
HI
I have a button in 'form1' that will show 'form2', now I want to make 'form2' "top of all" so if we select 'form1' 'form2' will be at the top , but if I minimize 'form1' 'form2' will minimize automaticly and also if I restore 'form1' 'form2' will restore
if form2 is At the Top how do you expect to click on form1 (doesn't it mean your form1 should be able to get focus so user can click on minimize button)?
Re: [2008] problems with forms
oh I am sorry I don't know how to say it but just like Find dialog in the 'Windows Notepad'
thanks
Re: [2008] problems with forms
ok you should use ShowDialog method e.g
Code:
Dim objForm2 As New Form2()
objForm2.ShowInTaskbar = False
objForm2.ShowDialog()
Re: [2008] problems with forms
hmm just saw 'Windows Notepad's find form,above code will not let you focus on Form1 :(...let me see if i can find out something
Re: [2008] problems with forms
set form2's topmost property to true. also, set form2 showintaskbar property to false
Re: [2008] problems with forms
in your form1_resize event, resize form2 as necessary
Re: [2008] problems with forms
OK I will try them tomorrow I must go now
thank you all
Re: [2008] problems with forms
The First Problem has been resolved :check:
But I have another question.:confused:
just How to keep the selected text in textbox highlighted while another form or app. is active
I tried , the text is selected but not highlighted and when I select the form again the highlight appear?
help please
and thanks in advance :thumb: