Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 19th, 2005, 12:12 PM
Authorized User
 
Join Date: Aug 2003
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Kaustav Send a message via Yahoo to Kaustav
Default Synchronize a command button's click event

Sir, what i want is:
when i click a command button in form1 i want to view another form. But as soon as I close form2 i must get a msg saying i am in form1 again. But all this i want is to be done through code from form1's command click event and no other form's code.
But what i found was that as soon the new form (form2) opens the message gets diplayed. It doesnot wait for form2 to be unloaded.
Plz suggest.

------------------
Kaustav
__________________
------------------
Kaustav
 
Old September 20th, 2005, 02:20 PM
Registered User
 
Join Date: Sep 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to HexKrak Send a message via AIM to HexKrak Send a message via MSN to HexKrak Send a message via Yahoo to HexKrak
Default

How bout setting a boolean variable when you click the command button, then setup an onfocus event or even an onmouseover, to check that for that variable, and if it = true then display message.

 
Old September 20th, 2005, 02:25 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there..

what about displaying form2 modal??

that way the code will stop until you unload or hide form2...

HTH

Gonzalo





Similar Threads
Thread Thread Starter Forum Replies Last Post
DataList Command event not firing on first click nikkk ASP.NET 3.5 Basics 0 September 2nd, 2008 04:15 AM
Call a Button's click event sams ASP.NET 1.0 and 1.1 Professional 3 July 24th, 2007 03:32 AM
call button's click event explicitly sansircar ASP.NET 1.0 and 1.1 Professional 1 January 25th, 2006 01:07 AM
sYNCHRONIZE COMMAND_CLICK EVENT Kaustav Pro VB 6 1 September 19th, 2005 01:12 PM
Click Event dkr72 C# 3 December 8th, 2004 06:23 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.