cancel
Showing results for 
Search instead for 
Did you mean: 

Help Recover project, Vista Problums

BenG
Grafter
Posts: 202
Registered: 22-08-2007

Help Recover project, Vista Problums

hi all
Last night very late I desided I wanted to do a Project in Microsoft Visual Basic 6, Yes you can all stop laughing now.
anyway it was a small icon editor I was working on as I said it was late, so I decided to save the project and get some sleep. in normal cases I save to my VB Projects, but as it was late I just saved to the default folder:
C:\Program Files\Microsoft Visual Studio\VB98
So today I get up and fire up VB6 and carry on with my project. anyway as it was starting to look good, so I decided to save to my project folder C:\VBProjects, so with that in mind I right click on the project explorer in VB and select the form1.frm and go Save As, Ok I like to say in normal cases of doing that you are promted with a Save As dialog and you can save
In this case no Save Dialog.
Ok no problum I thought maybe the IDE has crashed, so I reload VB and try and same agian Still no dialog, what the hell is going on I thought, Well ok VB do what you want I thought I just goto C:\Program Files\Microsoft Visual Studio\VB98 and copy the project that way,
OK so I goto the folder C:\Program Files\Microsoft Visual Studio\VB98 and look in the folder umm No Form1.frm, No Project1.vbp hum odd, I thought well it not been deleted, So back in VB Open Project and there is the project. bareing in mind that it still the same path C:\Program Files\Microsoft Visual Studio\VB98
So I decide ok I just right click on each file and go Copy the paste, in normal cases this will work so I do that and then I get the message
Could not find this item
This is no longer located in C:\Program Files\Microsoft Visual Studio\VB98
Project1.vbp
Now that's odd cos when I click the open button it opens up.
if anyone can help me fix this problum I be happy, cos I do not fancy writeing the project agian if I can copy it some how.
9 REPLIES
Community Veteran
Posts: 1,574
Thanks: 3
Registered: 13-04-2007

Re: Help Recover project, Vista Problums

If I read it right you can still open vb and the project is there but you cant find it on the disk. If its opening it then it must be somewhere the best bet is to search the drive  for  *.frm, and *.vbp by opening a cmd box going to c:\ and typing dir *.frm /s then dir *.vbp /s and you should find them maybe they are in the temp dir or saved as another name.
BenG
Grafter
Posts: 202
Registered: 22-08-2007

Re: Help Recover project, Vista Problums

hi, samuria Yes you did read it right Smiley
It is one of the most oddest things to ever happen, tho I seen quite my fare share this and last week, after upgradeing to Vista and no dout many more to come.
I did try and serach as well *.frm to the main Program Files folder yet it pulled nothing out.
and I know the project was saved in C:\Program Files\Microsoft Visual Studio\VB98, becuase that is the defaut one for VB6 when you first start a project, I used VB for over 6 years and have never came across anything so weired, so a am guessing it 100% Vista
Yet in VB when the open dialog is open there is the project smileing at you, yet from the folder it not there. it like it only shows in the dialog when VB is open, ace sercurity like Smiley
As a test I done it now, First I open vb then I click save and I saved the new form and project to the default folder.
C:\Program Files\Microsoft Visual Studio\VB98
close vb switch to the folder, and its not there. Yet open VB, use project open and it there. and the open dialog path is pointing right to
C:\Program Files\Microsoft Visual Studio\VB98
Tho if I save to somewere like c:\somefolder no problums, so I am guessing it has something to do with the folder premissions, but since I do not know much about them, I am guessing I just will not save anything in there from now on.
anyway I sort of got my project back, I ended up copying the controls and code from one VB IDE to the other.
Community Veteran
Posts: 38,460
Thanks: 1,027
Fixes: 62
Registered: 15-06-2007

Re: Help Recover project, Vista Problums

it might seem very odd but have you tried changing the view permissions for that folder. In Vista there is one called hide protected operating files.
BenG
Grafter
Posts: 202
Registered: 22-08-2007

Re: Help Recover project, Vista Problums

hi, Oldjim
Yes that was my fist thought at first to do that, but even unhideing them all nothing was shown, as by default VB whould never set project files as system files anyway.  Not sure unless Vista has some sort of problum with VB6 as it is sort of old now. I decided to upgrade anyway to VB.NET 2008 now cos I was seeing other problums to with VB6,
Thanks all for your help anyway,
Rich
Grafter
Posts: 184
Registered: 30-07-2007

Re: Help Recover project, Vista Problums

Hi BenG
Are you running VB as administrator?  Navigate in 'Computer' to c:\Program Files\Microsoft Visual Studio\VB98 and right-click VB6.exe.  Choose the 'Compatibilty' tab and make sure that 'Run this program as an administrator' is ticked.
Regards
Richard
Community Veteran
Posts: 1,574
Thanks: 3
Registered: 13-04-2007

Re: Help Recover project, Vista Problums

Did you do the search dir *.vb from c:\ so you can see if its anywhere on the disk?
You dont say which version of VB you are running in the enterprise version there is the option to use source safe and you have to book out the code which is then booked back in. Its a long time since I used it but I seem to remember that it destroys the code after its booked it back in
BenG
Grafter
Posts: 202
Registered: 22-08-2007

Re: Help Recover project, Vista Problums

ar Thanks Rich
Run as admin works and I can save to the folder now and see them after I saved, but if I go tho the start menu it does not work, anyway I am still glad you shown me the admin thing, I know now for next time Smiley
Thanks agian.
pjemmanuel
Grafter
Posts: 349
Registered: 05-04-2007

Re: Help Recover project, Vista Problums

I think I may be able to shed some light on this for you, it is Vista's security that is causing the 'problem'.
As a normal user, and any program that runs under normal privileges you are not permitted to really save anything in the Program Files directory structure. However, Vista will let you do it, or at least appears to let you do it. What is really going on is that Vista creates a 'shadow copy' of the directory that you are trying to save into. It does this in an attempt to allow older programs to run on the new, more secure operating system.
In the past, many programs used .ini files in their own directory (under program files) to save settings into. With Vista's new security features, programs which did this would stop working because they would be unable to save the settings. Vista creates the 'shadow' in the directory structure
C:\Users\username\AppData\Local\VirtualStore\Program Files\........
By doing this, Vista allows some older programs to run whilst retaining the rules about not allowing write access to the Program Files directory structure to all users.
In the OP's case, it's likely that the 'missing' files will be found under
C:\Users\username\AppData\Local\VirtualStore\Program Files\Microsoft Visual Studio\VB98
BenG
Grafter
Posts: 202
Registered: 22-08-2007

Re: Help Recover project, Vista Problums

Thanks Phil_E
Yes just tryed that now and as you say they do show up. I am still not yet used to this new vista yet, so it like trying to learn evenything i used to do in XP to do in Vista now. well thanks for the help of others on the forums I am starting to get this. I leart more on here, that I have from the help that came with the system Smiley
Thanks agian to all.