Solved

vb.net change saving method

Posted on 2004-08-10
5
196 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
[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
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
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 …

738 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