By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,326 Members | 881 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,326 IT Pros & Developers. It's quick & easy.

Msgbox problem

P: n/a
Hello,
I'm trying get a message box to show useing messagebox.show
(...) and then checking what they chose. The only problem
is that when it pops up it is locking all other windows
until it the messagebox has been answered. I need it to
not look its parent form that is calling it. How can do
this?

Thanks

Sebastian
Nov 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Sebastian,
Unfortunately both MsgBox & MessgeBox are modal, as normally the info they
are presented needs to be taken care of.

If you need a modeless messagebox, I would suggest designing a new form that
is designed to be used Modeless (Show instead of ShowDialog) that looks &
feels like MessageBox. You can use the System.Drawing.SystemIcons class to
get the icons that the MessageBox class displays...

Hope this helps
Jay

"Sebastian Santacroce" <se*******@ilogic.com> wrote in message
news:0b****************************@phx.gbl...
Hello,
I'm trying get a message box to show useing messagebox.show
(...) and then checking what they chose. The only problem
is that when it pops up it is locking all other windows
until it the messagebox has been answered. I need it to
not look its parent form that is calling it. How can do
this?

Thanks

Sebastian

Nov 20 '05 #2

P: n/a
Sebastion,

if I understood you correctly, you want to display a dialog without locking
the windows underneath it. If you want to do that, you can't use MessageBox.
Instead, create a new dialog and display it with "show", not with
"showdialog" - that should work. Of course, in that case, you need a little
bit more effort to put the text into the form.

Klaus

"Sebastian Santacroce" <se*******@ilogic.com> schrieb im Newsbeitrag
news:0b****************************@phx.gbl...
Hello,
I'm trying get a message box to show useing messagebox.show
(...) and then checking what they chose. The only problem
is that when it pops up it is locking all other windows
until it the messagebox has been answered. I need it to
not look its parent form that is calling it. How can do
this?

Thanks

Sebastian

Nov 20 '05 #3

P: n/a
Cor
Hi Sebastian,

A little addition to Klaus and Jay,

Throw an event when the checking is done and then put it somewhere in the
logic of your project.

And also put somewhere in your logic that the checking is done in time.

Those two things seems to me more a problem than show the form.

That is why dialogboxes and messagboxes are mostly waiting on an answer.

This is a kind of in my eyes difficult remote processing.

But just a thought maybe you have already the solution for that.

Cor
Nov 20 '05 #4

P: n/a
* "Sebastian Santacroce" <se*******@ilogic.com> scripsit:
I'm trying get a message box to show useing messagebox.show
(...) and then checking what they chose. The only problem
is that when it pops up it is locking all other windows
until it the messagebox has been answered. I need it to
not look its parent form that is calling it. How can do
this?


You will have to create your own messagebox. Some hints and tips on
doing that can be found here:

<http://groups.google.de/groups?selm=bu22nn%24ar8b7%242%40ID-208219.news.uni-berlin.de>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #5

P: n/a
Hi,
You can use a new thread.
Make a class
Public Class threaded
Public mstrQuestion As String
Public Sub New(ByVal strQuestion As String)
mstrQuestion = strQuestion
End Sub

Public Sub Doit()
if MsgBox(mstrQuestion, vbYesNo Or vbQuestion) = vbyes then
DoSomething
end if
End Sub
End Class

In the main form where you want the message box you need

Dim d As New threaded("My Question")
Dim ts As New ThreadStart(AddressOf d.Doit)
Dim t As New Thread(ts)
t.Start() '
'rest of main form code here


HTH
Bob
Sebastian Santacroce wrote:
Hello,
I'm trying get a message box to show useing messagebox.show
(...) and then checking what they chose. The only problem
is that when it pops up it is locking all other windows
until it the messagebox has been answered. I need it to
not look its parent form that is calling it. How can do
this?

Thanks

Sebastian


Nov 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.