[Originally posted by Philip Zachariah]
Dear Friends, I have a problem with forms and command buttons, How far i can able to explain , i am not sure, I will try my best to explain the problem,
I Have Three forms, Frm1,Frm2 and Frm3, In Frm1 i have Textbox, when the keydown event at this text box, Frm2 opened as Show 1. Which contain a Listview with Records, When i double clik the list item in listview, it will be place at Frm1 Text box. This part no problem, i have one more command button in this Frm2, This i use when i dont find the name in this listview, clk this button' unload frm2, brings Frm3 ,and in this form i have 6 command buttons Add DEletl Edit Cancel , like that, when i clk Exit button on this form˙ this form will be unloaded and frm2 will appear,(as Show 1) till now no problem, but if repeat the action, that is, clk the button in frm2, when this time frm3 appears, but, i see the Exit commanbutton only as a Gray Block, doest have any caption or nothing, and sometimes disappears.(all other cmdbuttons are appears correctly in frm3)
Why sometimes when unloadsome forms, its not unloading correctly, all details can seen behind the form
Can any one help me please...........
Thanks in Advance
[Originally posted by Nick Dawkes]
I don't exactly follow what you are trying to do. But as a general principle, in a smaller project like this do not load and unload forms as this take a lot of time and hassle. Instead of unload, use the hide method. The show method will then make it visible again.
So I would create a bas module with a sub main and amend my project so that sub main is the start up.
Public sub main
'load the forms
'show first form
change your unload statements to form3.hide etc.
create another sub in the bas module
Public sub closedown
'close all database connections
'unload all forms
and call this from your exit option on form1 or wherever it is
Hope this helps
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL