• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 304
  • Last Modified:

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?

0
Mike Eghtebas
Asked:
Mike Eghtebas
  • 3
  • 2
  • 2
  • +3
5 Solutions
 
GrahamSkanCommented:
Don't know what happened, but is it that Form1.frm still on your computer, but not included in your project? If so you should be able to load it back into your project. (Project/Add File)
0
 
RejojohnyCommented:
search for the Form1.frm in ur computer .. then as "GrahamSkan" suggested .. add it to ur project .. do u see the form in the design-view?
0
 
GrahamSkanCommented:
Mind you, if your computer is anything like mine, you could have many Form1.frm files.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

check if ur forms AutoRedraw Property..

set it to True
0
 
GrahamSkanCommented:
You could also check in your recycle bin.
0
 
_agj_Commented:
more detls pls.

wat is frmFormat?

is it a function that returns a form?
0
 
Erick37Commented:
If you ran the application without first saving your work and the application crashes the VB IDE, then all your work done after your last save may be lost.

Check your settings in:

Tools->Options->[Environment]

There is an option to automatically save your project before running the application, or prompt to save, or don't save.


Are you running any 3rd party backup tools or add-ins for VB?

0
 
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
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
0
 
RejojohnyCommented:
just curious . is this problem u r facing in vb.net or VB6?
0
 
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
Rejojohny,

vb 6.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 3
  • 2
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now