• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

vb.net change saving method

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
bear23
Asked:
bear23
  • 2
  • 2
1 Solution
 
fds_fatboyCommented:
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
 
bear23Author Commented:
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
 
bear23Author Commented:
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
 
fds_fatboyCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now