Solved

How to save all windows positions in VB6 using VSS6 ?

Posted on 2001-06-19
12
212 Views
Last Modified: 2010-08-05
DESCRIPTION:
I'm using VB6 with Visual source safe v6.0a and have this problem:
  If I configure (in VB6) my own window sizes and positions for windows with code for forms, modules, classes ... in a project which was added to VSS and save then this project and also do the check in to VSS, I get again the older windows sizes and positions which where before my change.

QUESTION:
HOW can I save my last windows sizes and positiones in VB6
(for projects which are added to VSS) and where is this information stored?

Thanks!

0
Comment
Question by:robyx
12 Comments
 
LVL 2

Accepted Solution

by:
agriggs earned 75 total points
ID: 6206677
That informatin is stored in the VBW file of the same name as your project.  The VBW file does not need to be checked into VSS.  

TIP (From VB Programmer's journal, I believe): Adjust your windows to be all the right positions, then save your project and exit VB.  Then go into Windows Explorer, and set the VBW file to be read-only.  Now VB will not be able to save the new positions of the windows, but it will not complain.  Now every time you open the project, the windows will be in your favorite layout.
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 6206805
Yes, the problem is the .vbw and I just fixed that problem on my machine yesterday.  If the above comment still doesn't work, simply delete the .vbw (with the .vbp checked out) and it will get rebuilt by vb.  When you check in the .vbp, I think the .vbw goes with it automatically.
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6207076
you may want to be sure you are checking in the vbw, and that you are not overwriting your vbw from an old version is SS.

Cheers
0
 
LVL 6

Expert Comment

by:andyclap
ID: 6207880
I have a little batch file which deletes all vbws through my development directory which I run at startup. Personally I like everything to start up clean, with no open windows.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7139505
Hi robyx,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept Dave_Greene's comment(s) as an answer.

robyx, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7141032
This whole issue of VB not properly remembering the last windows' positions is problematic.  In my experience, my answer works best: delete the .vbw file and VB will always start fresh.  Since robyx states that he is checking IN the files, it's unlikely that he's getting old stuff from the database as Dave's comment offers.

I would go with agriggs's suggestion since he indicated the vbw issue first.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 49

Expert Comment

by:DanRollins
ID: 7141295
Can you be certain that the problem is unrelated to SS checkin?  It had a ring of pure insight to me.  

Do you have experience with SS when the VBW is not in the checkin list?  Can you verify that Dave_Greene is wrong?  He sounded pretty confident.

-- Dan
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7141453
Dan,

I did a test.  I created a new project with a single form.
It seems that the .vbw is not included in a Source Safe project's chcek-in by default.  In theory, this should mean that every time you check out the vbp, you would get your previous settings (as stored in the vbw.)  In fact this did not happen.

However, I also tried the same test on a project not in Source Safe and got the same results.

This showed my that the problem is really a VB problem and not related to Source Safe.

When I manually put the vbw into Source Safe, and told it to get latest, it claimed to retrieve the vbw but didn't seem to overwrite it.

Although Dave's suggestion is a good idea, I think the real answer is what agriggs indicated.

--
Since this whole vbw issue has caused me problems (trying to get persistence of windows), especially when related to Source Safe (which may not have the file checked out so it certainly won't allow the persistence to be saved) I'd welcome the comments from other experts on this matter.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7141717
Thanks for the input rspahitz.  You might get more input by posting a new Q.  I'm changing my suggested disposition to:  
   Accept agriggs's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7141773
I'll do just that.
Thanks.
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7141801
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7166774
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

759 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

20 Experts available now in Live!

Get 1:1 Help Now