Solved

form has disappeared... vb6

Posted on 2004-09-12
10
293 Views
Last Modified: 2010-05-02
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
Comment
Question by:Mike Eghtebas
  • 3
  • 2
  • 2
  • +3
10 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 100 total points
Comment Utility
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
 
LVL 26

Assisted Solution

by:Rejojohny
Rejojohny earned 100 total points
Comment Utility
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
 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
Mind you, if your computer is anything like mine, you could have many Form1.frm files.
0
 
LVL 10

Assisted Solution

by:anv
anv earned 100 total points
Comment Utility
did u add any code to the timer event of the timer??

check if ur forms AutoRedraw Property..

set it to True
0
 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
You could also check in your recycle bin.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 7

Assisted Solution

by:_agj_
_agj_ earned 100 total points
Comment Utility
more detls pls.

wat is frmFormat?

is it a function that returns a form?
0
 
LVL 32

Assisted Solution

by:Erick37
Erick37 earned 100 total points
Comment Utility
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
 
LVL 33

Author Comment

by:Mike Eghtebas
Comment Utility
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
 
LVL 26

Expert Comment

by:Rejojohny
Comment Utility
just curious . is this problem u r facing in vb.net or VB6?
0
 
LVL 33

Author Comment

by:Mike Eghtebas
Comment Utility
Rejojohny,

vb 6.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now