Link to home
Start Free TrialLog in
Avatar of Mike Eghtebas
Mike EghtebasFlag for United States of America

asked on

form has disappeared... vb6

After adding a timer control as Timer1, when I ran the application.  All of the controls on the form (there was only one form) was gone.  frmFormat(Form1.frm) was changed to frmFormat(Form1Backup.frm).  frmFormat(Form1Backup.frm) is a blank form.

Did I loose the form for good?  How this can happen?

ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Mind you, if your computer is anything like mine, you could have many Form1.frm files.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You could also check in your recycle bin.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike Eghtebas

ASKER

Correction...

1. frmFormat(Form1Backup.frm) was there and still it is there.  I compared it with a backup copy (5 days old).
---------------
2. Code behind is still there butt all controls are gone.  In propertysheet or form's code window, none of the controls' name showing in controls/objects drop box.
----------
3. GrahamSkan,        Project/Add File just adds the same form on top of existing identical form.

Re:> You could also check in your recycle bin

It is not there.
---------
4. Rejojohny,          Sorry, Form1.frm is not missing.  See line 1 above.

Re:> do u see the form in the design-view      No, the controls are gone, also see line 2 above
---------
4. anv ,      

Re:> did u add any code to the timer event of the timer , per question Q_21128127, I was adding timer control when all these happened.  Affter adding the control it stop working (form disapeared.  Maybe not related to it at all).

Re:> check if ur forms AutoRedraw Property…  Yes it is True

did u add any code to the timer event of the timer??

check if ur forms AutoRedraw Property..

set it to True

5. agj,

RE:> is it a function that returns a form?      It is a typical form.
6. Erick37
Ihaven’t lost the unsaved portion but all of the controls.  No, I am not using any backup software.  Once in a while, I copy the entire folder under a different name.
----------
Sorry for the delay in my response.  I had lost my internet connection.

This form in Form Load event has a routine like:

Me.Width=lstNames.Left+lstNames.Width +600
Me.Height=...

But, when I added the timer control, it was put on the form beyond this width.  And, when I ran the form, it errored on the above lines and after that I lost my controls.  Meaning, the timer control should have been within me.width and me.height, possibly.

I have caoppied and pasted the 5-days old form and its .frx to the new project foder and running okay for now (not loosing the code behind the corrups form was helpful to restore all).

It is nice to know if putting a timer in a wrong place could cause all these.

Regards,

Mike
just curious . is this problem u r facing in vb.net or VB6?
Rejojohny,

vb 6.