Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I`ve got at button btnSave.

when i push this button a messagewindow

messagebox.show("It`s all saved") should pop up for an amount of time i.e 5 sec. Could anybody give me an code example on how to achieve this?

Posted
That`s a good Idea. Thanks, but I still have a problem: to create a counter, timer or what can be used to make the window open for i.e. 5 sec and the close, by using a button to trigger the event.
  • *Experts*
Posted

If you want the open form to close itself, use a Timer on the form. The event would just call "Me.Close()" in VB or "this.Close();" in C#.

 

The button would do the same thing.

 

If you want a button on the opening form to close the popup, you can't, or shouldn't be able to. Hopefully your new form that mimics a messagebox is being shown modal so that the opening form won't accept any messages (like a button click).

 

There's also an article in MSDN mag (click here). It's a bit advanced, using Windows hooks, but does allow what you want using the built-in message box. It's not light reading!

 

-nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...