Forum  Core :: SDK (Vi...   Let's Chat Abo...  MessageBox bugs
Previous Previous
 
Next Next
New Post 12/12/2008 6:48 AM
  palli
11824 posts
1st Level Poster




Re: MessageBox bugs 

Hi !

Ok, like I said, I'll do some testing over the weekend and see how it works for me.

Just to get it straight, then your goal is to be able to display a messagebox right after (or at the same time) the childform closes and that should show on screen without the childform being visible. Is that correctly understood ?

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 12/12/2008 7:29 AM
  wjar
49 posts
No Ranking


Re: MessageBox bugs 

That's right

 
New Post 12/12/2008 9:53 AM
  palli
11824 posts
1st Level Poster




Re: MessageBox bugs 

Hi !

Well, did a small test and this works just find. To just test the basics of what you are trying to accomplish, I created a new project (and I'm sorry, it's in vb) and just tested that one problem of having a messagebox displaying after childform has been closed, without childform being visible on screen.

So, I have two forms, ParentForm and ChildForm. Each has one button similar to yours. ParentForm is the startup form.

ParentForm has the following code:

    Private Sub btnShowChild_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShowChild.Click
        Dim cf As ChildForm = New ChildForm
        AddHandler cf.Closed, AddressOf CloseHandler
        cf.ShowDialog()
    End Sub

    Public Sub CloseHandler(ByVal sender As Object, ByVal e As EventArgs)
        MessageBox.Show("Child form has now been closed")
    End Sub
 

ChildForm has the following code:

    Private Sub btnDoIt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDoIt.Click
        MessageBox.Show("After this is closed, form closes and another message shows", _
                        New EventHandler(AddressOf MessageBox_Close))
    End Sub

    Private Sub MessageBox_Close(ByVal sender As Object, ByVal e As EventArgs)
        Me.Close()
    End Sub

By clicking ParentForm's button, the ChildForm is shown. By clicking ChildForm's button you get it's messagebox, and when you click OK there, the ChildForm closes and then you get the second messagebox from CloseHandler in Parentform.

This was tested both in IE7 and FF3 and works perfectly.

Is this different from what you were trying to do?

Palli

 

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 12/12/2008 10:39 AM
  wjar
49 posts
No Ranking


Re: MessageBox bugs 

Thanks, that works. Of course, there are some forms that need to be called from different forms in different times and I don't like the idea of repeating code, but it will have to do. What I would like to know is if Gizmox considers this a bug or not.

 
New Post 12/14/2008 5:14 AM
  dror.shahak
302 posts
3rd Level Poster




Re: MessageBox bugs 

Hi,

What palli said is essentially correct.

The behavior you described in by design so and not a bug (it's just the design logic).

What you can also do is give your msg box a differant owner (parent form) and try it that way as well.

 

Good Luck and Thanks,
Dror Shahak
The Visual WebGui Team
 


Dror Shahak, The Visual WebGui Team
 
Previous Previous
 
Next Next
  Forum  Core :: SDK (Vi...   Let's Chat Abo...  MessageBox bugs
CompanionKit Bottom
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS