Solved

form has disappeared... vb6

Posted on 2004-09-12
10
300 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +3
10 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 100 total points
ID: 12041432
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
ID: 12041440
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
ID: 12041480
Mind you, if your computer is anything like mine, you could have many Form1.frm files.
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 10

Assisted Solution

by:anv
anv earned 100 total points
ID: 12041550
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
ID: 12041609
You could also check in your recycle bin.
0
 
LVL 7

Assisted Solution

by:_agj_
_agj_ earned 100 total points
ID: 12041725
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
ID: 12043874
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 34

Author Comment

by:Mike Eghtebas
ID: 12045340
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
ID: 12051618
just curious . is this problem u r facing in vb.net or VB6?
0
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 12059618
Rejojohny,

vb 6.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

705 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