Visual Studio and Me: a Sad Story

  • (2 Pages)
  • +
  • 1
  • 2

24 Replies - 1575 Views - Last Post: 18 July 2020 - 12:07 PM Rate Topic: -----

#1 Parodocs   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 05-July 20

Visual Studio and Me: a Sad Story

Posted 07 July 2020 - 02:33 PM

Hello,
I don't think I'm meant to use Visual Studio.
Three years ago, I downloaded VS so I could learn VB.net (yes, my first mistake). Everything went well, until it came time to build and test. I don't remember the errors but they involved .dll's and missing variables.
Not much point in using an IDE that won't let you run the app.
I left it alone until earlier this year when I downloaded Visual Studio 2019 Community. Back to VB.net - back to errors and crashes.
I am not a complete idiot. I have programmed - baby steps - in VB6 and I've read more book and tutorials on VB, VB.net, C++, PHP, HTML . . . Anyway. I quit that nightmare and returned to VB 6.
Recently - maybe it's all the time I have to myself - I have focussed on C#: books, tutorials, StackOverflow and Git. I thoroughly worked myself into a frenzy - I could now transfer my VB 6 project to C#. Bigger boy shoes.
Apparently too big.
I created a C# Windows Forms (.net core) project. To accustomise myself, I copied an exercise from a book: add a form; create a button, a text box; when the form runs, enter text in the text box and click the button. A message box appears with the textbox text.
Seriously. NOT only did the program crash, it !@%$&*^ froze everything.
Sigh. Back to VB 6.
For the record: Win 10 home, 64; Visual Studio Community 2019.
If anyone has any recommendations (an IDE that runs C# and has a form builder?).
Thank you for your time,
Happy day,
Shawn

Is This A Good Question/Topic? 0
  • +

Replies To: Visual Studio and Me: a Sad Story

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15800
  • View blog
  • Posts: 63,300
  • Joined: 12-June 08

Re: Visual Studio and Me: a Sad Story

Posted 07 July 2020 - 02:45 PM

It's a large possibility the C# example crashed because it was supposed to be a .NET and not DOTNET Core. Hard to guess as I don't know what you were actually doing or the example.
Was This Post Helpful? 1
  • +
  • -

#3 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 7456
  • View blog
  • Posts: 25,098
  • Joined: 05-May 12

Re: Visual Studio and Me: a Sad Story

Posted 07 July 2020 - 08:41 PM

Out of curiosity, what Antivirus are you using? Some AV software is not developer friendly.

Are you downloading and installing the official Visual Studio 2019 Community Edition, or are you download a warez or BitTorrent version of it? Which tutorial did you try todo?

How much memory do you have available on your system?

Anyway, you aren't really providing a lot of details like when you program crashed what was the error message? After you recovered was there anything in the Windows Event log?
Was This Post Helpful? 1
  • +
  • -

#4 Parodocs   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 05-July 20

Re: Visual Studio and Me: a Sad Story

Posted 08 July 2020 - 09:02 AM

Hi, Thank you for the responses.
I could include the code, but there really isn't much there. It was avery quick exercise on how to use a MessageBox with a Command Button.
Aside: Is Visual Studio always so slow to open projects?
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string FirstName;

            FirstName = textBox1.Text;

            MessageBox.Show(FirstName);
        }
    }



That's it for the code.
I downloaded Visual from the site, maybe four months ago. That's when VB.Net blew up. (I don't have the exact error messages from that, only what I remember.)
I am have (not sure which mem you mean) I have a 50GB SSD, 1TB Hard Drive and 16GB ddr3 Ram.
ANd there weren't any error codes this time. I do watch for those (vb6 can be notorious for errors). The form loaded; there was a textbox and a command button on the form - they were both white rectangles. The mouse pointer was frozen on 'working' - hourglass. Break didn't work (ctrl brk); break within the IDE didn't work. I used Task Manager to end VS and a message popped up, reminding me that a program was still running, though nothing had changed. I couldn't end it that way, so I killed it in the Task manager and gave myself a timeout and a beer - neither fixed the problem, but I felt a little better.
That's all.
If that makes any sense, my day is starting off better than I thought.
Thank you again, I really appreciate the input.
Happy Day,
Shawn

Sorry - I would have added this to my earlier post but - that's why I am posting this:
how do I edit previous posts? I do like to correct my grammatical mistakes - they kinda irritate me.
Thanks,
Shawn
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15800
  • View blog
  • Posts: 63,300
  • Joined: 12-June 08

Re: Visual Studio and Me: a Sad Story

Posted 08 July 2020 - 09:08 AM

Quote

Aside: Is Visual Studio always so slow to open projects?
No it shouldn't. I have a fairly average work computer and it's fine. Assuming you don't have your ram being eaten up by Chrome,FF, etc.

As I suspected - your code works fine, but you created the wrong project type. It should have been a .NET framework and not DOTNET Core. I dropped that in and it worked right off the bat.


Quote

how do I edit previous posts? I do like to correct my grammatical mistakes

New folk don't have that option immediately available. Checks against people clearing out posts after they get help.
Was This Post Helpful? 1
  • +
  • -

#6 ScottinTexas   User is offline

  • D.I.C Regular

Reputation: 15
  • View blog
  • Posts: 333
  • Joined: 13-March 12

Re: Visual Studio and Me: a Sad Story

Posted 08 July 2020 - 09:16 AM

If you are going to be going to C# (which is a good idea) then you should also get away from Windows Forms. I think you will find it a lot easier to learn C#, XAML, etc. than trying to deal with VB. I personally hate VB and I am having to work in it today so I am replying from a very biased point of view.
Was This Post Helpful? 1
  • +
  • -

#7 Parodocs   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 05-July 20

Re: Visual Studio and Me: a Sad Story

Posted 08 July 2020 - 12:13 PM

Hi,
Thank you, I will switch the project type and try again. If it is that easy, I'm very happy to continue.
If there is an alternative to win forms that allows the easy construction of GUI's, I'm interested. If it is a matter of writing code for everything - C++, Python - without a designer, I will wait until I have more patience. I'm of the opinion that IDE's should simplify the job, not complicate it.
In the future I will look at other options.
For now, I'm off for a cold beer, a backyard and a beer - my first social excursion since isolating in March.
Happy Day,
Shawn
Was This Post Helpful? 0
  • +
  • -

#8 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15800
  • View blog
  • Posts: 63,300
  • Joined: 12-June 08

Re: Visual Studio and Me: a Sad Story

Posted 08 July 2020 - 12:23 PM

Sure, VS does that for Winforms, and I haven't built a UI by hand in so an long long long time. (Mostly though b/c the whole 'designer file' makes it nigh but improbable to just go hog on the fly.)
Was This Post Helpful? 0
  • +
  • -

#9 KeyWiz   User is offline

  • D.I.C Regular
  • member icon

Reputation: 14
  • View blog
  • Posts: 454
  • Joined: 26-October 06

Re: Visual Studio and Me: a Sad Story

Posted 08 July 2020 - 04:24 PM

View PostParodocs, on 08 July 2020 - 01:13 PM, said:

Hi,
Thank you, I will switch the project type and try again. If it is that easy, I'm very happy to continue.
If there is an alternative to win forms that allows the easy construction of GUI's, I'm interested. If it is a matter of writing code for everything - C++, Python - without a designer, I will wait until I have more patience. I'm of the opinion that IDE's should simplify the job, not complicate it.
In the future I will look at other options.
For now, I'm off for a cold beer, a backyard and a beer - my first social excursion since isolating in March.
Happy Day,
Shawn

With VB6 as long as you keep to MS Best Practices, your applications will run no problem on Windows 10, and according to MS will continue to run in the near future. There are many features in VB6 that were much more cumbersome than they needed to be, causing memory bottlenecks and slowing the end application as a result. So, VB.Net was rebuilt from the ground up, streamlining the code and further encapsulating functions so a lot of code no longer needed to be duplicated in different routines. So, where in VB6 the code to record the location of an element was included in each element, in VB.Net the Location Code is created once, and pointed to as a parent element of all other elements that need positioning information. If an element does not need positioning, then positioning is not inherited. Color information is also created once, and pointed to from all other elements that need it. There are many other examples, but, that is the main reason you should move on from VB6 to Visual Studio .Net. Also VB.Net takes advantage of multi-core processors in a more efficient manner.

VB6 and VB.Net are nothing alike in so many ways that what I have listed here is just a small portion. I understand your frustration as .Net has a large learning curve from VB6.

C# is a joining of many of the great things VB can do (But not all) and C++. Therefore if you have used either you will see similarities but also a lot of differences. But, C# is nearly as easy to learn as VB, and I recommend you move to C# rather than learning VB.Net. C# is becoming much more common than VB.Net and there is a mental break from trying to correlate the differences between VB and VB.Net when you move to C#. C# is a new language, it is more efficient than older languages. It has a different format and syntactic layout. But it still uses elements like boxes, labels, grids, etc. It uses loops, comparators, lists and graphics. But it is directly applicable to HTML pages. You can embed C# into your HTML pages directly or as a link.

As for using Windows Forms, I see no problem with them, but if you learn to use the HTML interfacing and build your pages using the HTML standard, including the issues of spacing in different browsers and displays, you can easily produce applications that run on the web, cell phones, tablets, an internal network, or the desktop. The only real difference being where the data is stored. You still use textboxes, image-boxes, labels, etc., but you have to learn not to try to place elements in a specific location, although that is still an option, it just takes more understanding of the HTML and how to place the elements.
Think of your page elements, even groupings of elements as a single element that gets placed within the end page. You have a section that shows a ticker tape of information, that is a single element that you place on the page. You add a section that shows photos, that is a separate element that gets placed within the desired page. You have a section that allows the user to play, fast forward, reverse, pause and stop a video, you build the player and controls as a single element and place it within the page.
So, abandoning the traditional IDE application model is not needed if building just a desktop app, but if you want to expand your skill level, learn to use the HTML so your work carries through to each environment as needed.

.Net CORE is for developing applications that run specifically on either IOS, Windows Phone 10, or Android. Because of this, it is a reduced version of .Net. So, not all .Net features are available in .Net CORE. If you want to develop for IOS you have to use a Macbook. Applications developed on a Macbook can be compiled for use in IOS (phone and tablet as well) or Windows 10. If you want to develop for Android you have to use Windows or Linux. An application developed in .Net Core on a Windows System can be compiled to run on either Windows 10 or Android. Either way the same code is used, it is only when you compile your code that you choose to target a particular OS. Then, that app will run on that system without the need to connect to the Internet.

One more thing, if you are having trouble, I recommend a programming instructor named Mosh Hamadami. I am 61 years old and have been programming since 1977. I have taken a number of his classes this year, I purchased the year subscription for all his courses. I highly recommend his C# courses. You can visit him at programmingwithmosh.com if you are interested.

This post has been edited by KeyWiz: 08 July 2020 - 06:33 PM

Was This Post Helpful? 1
  • +
  • -

#10 Parodocs   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 05-July 20

Re: Visual Studio and Me: a Sad Story

Posted 15 July 2020 - 02:51 PM

Hello,
First: thank you for all of the replies, assistance and corrections, and advice.
I tried a new project - a test - in C# using .net framework. Again, as a test I added a button and label to a form. Click on the button and the label's text changes. I figured if I broke that, something was wrong and it was less likely it was my fault.
Something went wrong. I ran the project - Start with Debug - and VS froze again. I closed the program with Task Manager.
I opened VS, double checked the project type and tried again, but this time I ran without debug: the form, button and label appeared and, when the button was pressed, the label text changed.
I figure I will, eventually, have to Debug, so my solution isn't much of one.
Is this VS related? Maybe I should download an earlier version. Hopefully this isn't "VS Community" related.
I'm fishing.
Well, I'll leave it alone for now. My patience with Microsoft is thin these days, but I may attempt to contact them if I feel the need for more frustration.
Thank you all again.
Happy Day,
Shawn
Was This Post Helpful? 0
  • +
  • -

#11 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15800
  • View blog
  • Posts: 63,300
  • Joined: 12-June 08

Re: Visual Studio and Me: a Sad Story

Posted 15 July 2020 - 02:55 PM

That sounds system related.

What your 'event viewer' say about the hangup?

What is your PC specs?

Would you have a weird instance of two monitors in play where the form would popup somewhere else?

Are you using breakpoints that would stop it all?

Anything in the 'output' window?
Was This Post Helpful? 0
  • +
  • -

#12 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 7456
  • View blog
  • Posts: 25,098
  • Joined: 05-May 12

Re: Visual Studio and Me: a Sad Story

Posted 15 July 2020 - 04:41 PM

View PostParodocs, on 15 July 2020 - 05:51 PM, said:

I tried a new project - a test - in C# using .net framework. Again, as a test I added a button and label to a form. Click on the button and the label's text changes. I figured if I broke that, something was wrong and it was less likely it was my fault.
Something went wrong. I ran the project - Start with Debug - and VS froze again. I closed the program with Task Manager.
I opened VS, double checked the project type and tried again, but this time I ran without debug: the form, button and label appeared and, when the button was pressed, the label text changed.

The new default for VS2019 is to turn on CPU/memory diagnostics when you press F5 to debug. To be able to do some of that, symbols need to by downloaded. That freezing you may seeing maybe either the symbols being downloaded, and or the CPU/memory diagnostics doing it's instrumentation of your code and your antivirus software thinking that something malicious is happening since normal programs don't go around debugging and instrumenting other programs.

Try enabling the "Debug Just My Code" option, so that the number of symbols that are download is minimized.
Try disabling your AV software, or add Visual Studio's devenv.exe to the AV's exception list.
Try disabling the CPU/Memory diagnostics feature of the VS debugger. That or just be more patient about waiting for the app to start up.
Was This Post Helpful? 1
  • +
  • -

#13 Parodocs   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 05-July 20

Re: Visual Studio and Me: a Sad Story

Posted 16 July 2020 - 02:34 PM

Hello,
Thanks for your response.
I did as you suggested - also created a rule for VS in Comodo and, as well, tested with Comodo off - but the result was the same.
I waited 6 minutes for VS to catch up and download symbols before killing the app.
Again, if I run without debug there isn't a problem.
I'll come back to it when I'm less likely to start throwing things.
All of this for a little program to keep a timeline for writing.
Happy Day,
Shawn
Was This Post Helpful? 0
  • +
  • -

#14 KeyWiz   User is offline

  • D.I.C Regular
  • member icon

Reputation: 14
  • View blog
  • Posts: 454
  • Joined: 26-October 06

Re: Visual Studio and Me: a Sad Story

Posted 16 July 2020 - 05:03 PM

View PostParodocs, on 16 July 2020 - 03:34 PM, said:

Hello,
Thanks for your response.
I did as you suggested - also created a rule for VS in Comodo and, as well, tested with Comodo off - but the result was the same.
I waited 6 minutes for VS to catch up and download symbols before killing the app.
Again, if I run without debug there isn't a problem.
I'll come back to it when I'm less likely to start throwing things.
All of this for a little program to keep a timeline for writing.
Happy Day,
Shawn

Sorry you are having so many problems. Have you tried uninstalling all installed VS files and then reinstalling? I would recommend trying that if turning off the Anti-Virus doesn't help. Use this process: Uninstall all Visual Studio versions and add-ons. Restart the computer to allow reloading of the Registry. Download latest version of VS. Test program.
Was This Post Helpful? 0
  • +
  • -

#15 Parodocs   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 05-July 20

Re: Visual Studio and Me: a Sad Story

Posted 16 July 2020 - 05:07 PM

Hi,
I installed 2017 and tried again with the same results.
Is there another IDE for C# with forms available for free?
My patience with Microsoft just ended.
Thank you, though, for the responses.
Happy eve',
Shawn
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2