torg Posted January 18, 2003 Posted January 18, 2003 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? Quote
Moderators Robby Posted January 18, 2003 Moderators Posted January 18, 2003 Instead of a MesaageBox, use a regular form. Quote Visit...Bassic Software
torg Posted January 18, 2003 Author Posted January 18, 2003 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. Quote
*Experts* Nerseus Posted January 18, 2003 *Experts* Posted January 18, 2003 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 Quote "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
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.