-
May 30th, 2007, 02:30 AM
#1
TopMost and inputbox
Hi lets say i have a big form that i set it to be TopMost=true.
Now i want to call inputbox after a click on a button on my form.
the inputbox will not be shown cuz the form is on top of it.
How can i make the inputbox to be top most as well so i will be able to see it over the main form?
Thanks
-
May 30th, 2007, 02:49 AM
#2
Re: TopMost and inputbox
A quick fix would be to send your form to the back temporarily, have a look at this :
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.SendToBack()
Dim StrInput As String = InputBox("Enter Your Name", "Enter Name")
Me.Text = StrInput
End Sub
Once run, the form will move to the back, and the Inputbox will move to the front. Just remember to bring your form to the front again, once your finsihed You can use Me.TopMost = True
Last edited by HanneSThEGreaT; May 30th, 2007 at 03:32 AM.
-
May 30th, 2007, 03:20 AM
#3
Re: TopMost and inputbox
Thanks HanneSThEGreaT,
but this solution will not work for me.
My project is build this way:
Form (Top Most)
ChildForm(Top Most)
UserControl ActiveX in the Child form that call the inputbox.
I try and it still been hidden under the forms.
I guess i will have to create my own inputbox and set it TopMost flag to the parent TopMost flag.
I just hoped that there is a simple way to do that and to avoid the "longer" way.
-
May 30th, 2007, 03:44 AM
#4
Re: TopMost and inputbox
This :
Originally Posted by leeshadmi
My project is build this way:
Form (Top Most)
ChildForm(Top Most)
UserControl ActiveX in the Child form that call the inputbox.
was quite important information to include with your first post, agree ¿
Please ensure to always give the relevant details of your perticular problems. Help us help you!
-
May 30th, 2007, 03:55 AM
#5
-
May 31st, 2007, 04:26 AM
#6
Re: TopMost and inputbox
You can actually set The TopLevel Properties of the Forms to False before showing the InputBox and then again change that to True after the inputbox is closed.
The better way would be to have your own Form as InputBox.
-
May 23rd, 2022, 06:08 PM
#7
Re: TopMost and inputbox
I have problems same to yours,please help for me to do anything
-
May 24th, 2022, 01:14 AM
#8
Re: TopMost and inputbox
Originally Posted by xoqon2003
I have problems same to yours,please help for me to do anything
Did you try the "similar" solutions as suggested in the post#2 and post#6?
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|