Solved

vb.net change saving method

Posted on 2004-08-10
5
192 Views
Last Modified: 2010-04-17
Is there a way to make vb.net prompt for saves, everytime I close a program it seems to save changes and everytime I run the program it seems to save changes I rather be prompt. Also whn running the program it makes it read-only, is there a way to disable that to make it edittable like in vb6.



0
Comment
Question by:bear23
  • 2
  • 2
5 Comments
 
LVL 10

Expert Comment

by:fds_fatboy
ID: 11771290
The short answer is NO.

.net is requires the source code to be saved before compilation (unlike the VB6 debugger).

It is good practice to save source before any compilation anyway.

As for edit and continue, it is not supported in VB.NET.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxgrfeditcontinuevisualcvisualbasic.asp

Microsoft say it will be in a future release. Although this is irritating, it is not really good practice to be hacking round with code when you are in the middle of a debugging run (although we all do it at times).

I got the following q/a from:
http://msdn.microsoft.com/chats/vstudio/vstudio_061703.asp

        Moderator: Ed (Microsoft)
        Q: you know someone has to ask this, may as well be me. is edit and continue going to find its way back with the release after 2003?

        A: Yes, Edit and Continue will be back in a future release. I'm not sure I can say which one yet, but it will be "sooner" rather than "later".

But they've been saying that for the last 3 years or so.
0
 

Author Comment

by:bear23
ID: 11772134
yeah, it is coming back, in vb.net 2005. This is such bull, I should have waited to purchase vb.net 2003. I just purchased it last week and then seen that you were able to download vb.net 2005 beta. So I downloaded it and guess what some of the old things that u could do in vb6 but not in vb.net is back in vb.net 2005. That is bull...............
0
 

Author Comment

by:bear23
ID: 12005802
There is in fact a Edit and Continue. And it is called just that:

It's what I was looking for: Under - Tools-Options-Debugging-Put a check under the : allow me to edit VB files while debugging. All I wanted to do was edit and continue and this is exactly what I needed.

0
 
LVL 10

Accepted Solution

by:
fds_fatboy earned 25 total points
ID: 12034411
Except that it does not behave naything like the way it does in VB6.

It does not even do what it says on the tin. It says Edit and Continue. It actually restarts after editing (and re-saving).

Your original question was:
"Is there a way to make vb.net prompt for saves, everytime I close a program it seems to save changes and everytime I run the program it seems to save changes I rather be prompt."
My answer was
"The short answer is NO."

The answer was correct.

Your secondary question was:
 Also whn running the program it makes it read-only, is there a way to disable that to make it edittable like in vb6.
The answer as I have pointed out here again (and above - as Microsoft acknowledge) is also NO.
The answer is also correct.

Here: Try this

Create a new VB.Net Windows Application
Place this code in it

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim a As String
        MsgBox("Starting")

        a = "Bert"

        MsgBox(a)
    End Sub

Run it.

You get a message box with the message "Starting".
You get a message box with the message "Bert".

Put a breakpoint on the a = "Bert" line.

Run it again.

You get a message box with the message "Starting".
The program execution breaks on the break line.
Change the break line to read
    a = "'Arry"
Continue
The program execution breaks at the begining of code

Continue
The program execution breaks at the begining of code
You get a message box with the message "Starting".
The program execution breaks on the break line.
Continue
You get a message box with the message "'Arry".

Without explicitly saving close VS.Net and reopen the project.

The code has been saved (i.e. you have a line that reads    a = "'Arry".

0

Featured Post

What Security Threats Are You Missing?

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.

Join & Write a Comment

A short article about a problem I had getting the GPS LocationListener working.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

747 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

11 Experts available now in Live!

Get 1:1 Help Now