Hey there I was wondering if anyone had a solution to the problem I am having when programming in Microsoft Visual Studio with VB.NET.
Basically I want to know how to load images on a form faster. I am creating a 1 form design of a program and whenever I use too many images, it takes >20 seconds to load and becomes really slow. I was looking to see if anyone has managed to find a work around around this however I can't seem to find one.
Any help would be greatly appreciated :)
Related
So I'm a bit of a self-taught programmer. I learned VB6 in college and used it sporadically for several years. A few years ago I got back into it and switched over to vb.net. I'm currently using Visual Studio Community 2019. I've been learning as I go and have been getting by pretty well. Lately, though, I'm having an issue that I can't seem to figure out. Here's the problem:
I have a program I'm writing that is fairly graphic heavy. It's a game so there are a lot of image assets that I've added to the resources (1752 items currently and most are images). Everything has been fine, but lately I'm having a lot of issues adding additional images. I'll get compile failures that won't tell me what the errors are. I'll get "Out Of Memory" exceptions that say certain images can't be initiated. I've had to revert to backups several times because I just couldn't undo whatever had gone wrong even if I removed the images I added.
I still have several new images I want to add as part of an update. I've tried simply dragging and dropping the images to add them and I've tried adding them through the "add resource" button but the results are the same. I've tried adding the images in smaller batches but I still run into issues. I tried adding different images to see if the ones I was using were somehow the problem but that didn't help either.
This is one of those things that I accept I may just not know best practices on. Is there a better way to add images to my program other than putting them into the resources? Is there something I can do with my resources to prevent these issues? Any advice would be really appreciated!
Thanks.
I switched to Visual Studio 2022 and that helped with the issue to some degree. One big change was that the compile failures without any reported errors went away. That was a huge help because it pointed me in the direction of the underlying problem.
I was able to track down a couple of the 1500 new images that were causing the issue. I'm still not positive what was wrong with them (they appeared to be no different than any of the others) but I rerendered them and now everything is great! Thanks to everyone for the advice!
I'm converting a project which started life as a PHP application to a Windows Forms Application in VB.Net, and am not sure how to go about formatting my output. The original, of course, simply outputs in HTML, and I've thought of using a WebBrowser control, but is there a better/more standard/any other way to display formatted output?
I'm new to Visual Studio, and Windows application programming in general. I've done a fair amount of work with VBA, so I'm familiar with the basics of the language, but still trying to figure out a lot of things. I think my question is beyond asking how to display output in VB.NET, as I'm familiar with the various form controls, such as label and textbox, but I googled extensively before posting here, and could not find what I was looking for. VB tutorials I've found are along the lines of "A variable is...." which I don't need. This site, while pretty basic, does have some interesting stuff, and is where I came across the WebBrowser control, but I'm just wondering if that's the best or only way to do what I want.
The VS2013 XAMLX designer is very slow with medium sized xaml workflows.
About 10 to 40 seconds for each small change we make.
We don't want to disable the designer and work in xaml directly.
This is what we have done and tried so far (without success)
Disable Resharper
SSD Drive to speed up I.O.
Make sure the machine has enough memory and cpu...
Has anyone got more ideas on how to speed this up?
UPDATE (23-11)
This is a little convoluted, though it might shed some light.
I installed VS2015, which made a huge difference, though the workflows wouldnt work in IIS. The problem was due to a windows update which caused an error. Check this link https://support.microsoft.com/en-us/kb/3118750
I was getting errors like this:
FileLoadException: A procedure imported by 'Microsoft.VisualBasic.Activities.Compiler.dll' could not be loaded
So, I am guessing that validation was turned off while the compiler had issues.
It seems like VS2010 had a setting to turn off validation, though I cant find how to do that in 2013
Does this help at all, can anyone suggest a solution?
Here's a dialog box which runs for approximately 16 projects and takes over 5 minutes to complete (in total).
Can anyone tell me what it's doing and how to make it stop?
I discovered the answer, thanks to Alexandre DeFalque.
VB is converting old VB6 modules(modulename.vb) into static classes for use by .NET. This can take quite a while.
I had previously scoured the Internet looking for an answer to this; hopefully someone else has now been saved that bother.
Anyone know of a way to speed up the Visual Studio IDE when you have Telerik RadControls (either windows or web) and JetBrains ReSharper installed? If I disable ReSharper it runs rocking fast, but I love ReSharper a bit too much to drop it. I know it would perform better without the RadControls. Anyone know a way to speed it up?
I switched from DevExpress CodeRush/Refactor! to Resharper (not by choice) and found the IDE became almost unusable. I managed to persuade my boss to let me switch back (on my own personal licence) and now it's like walking back into the sunshine after months in a cold, damp cave.
I guess what I'm trying to say is that maybe you should consider switching to CodeRush and Refactor!
for me this is the same.
I'm Working with a Dell XPS 4gb Ram Quad Core Extreme Stripped disks...
And I also had that problem with telerik controls (mainly aspx - winform not so much).
Anyhow - I had to do a project using a different suite of web controls - and it was as bad as with telerik - or even worse...
What I found (maybe it helps a bit):
a.) Switching to design view slows down the things a lot
--so after doing this I restart VS
b.) Small Solutions (Projects) help also (like mika wrote) --if possible split your solution to several projects (some class libs instead of one big thing)
c.) Use as litte VS addins as possible --I used some nice tools - but at the moment most of them are turned of, because I made the expirience that the things are better the less addins I use.
d.) Run special "resharping sessions" -- what I mean is: turn resharper off, do you normal coding - and from time to time turn it on and "resharp" your code.
This problem (as well as some others) is well knwon (I guess) and I would say that neither resharper (although this tool seems to be somewhat special) nor telerik are gulty.
It is VS which makes the problems - and I did a lot of searches about solutions - but finally I found nothing which really helps.
Notice: I work on a pretty large project at the moment - and the use of respharper is almost impossible. I turned it off - instead I have a lot of nice snippets and macros which help me to do some of the common things.
Conclusion: if telerik + reshaper is to slow for you I guess you have to decide which helps you more :)
I use the telerik controls (ASPX, WPF and Silverlight) in almost every project I make. These tools fasten the things so much - I simply "need them to survive"
This is not much help, but at least the issue is not on your machine only...
Try to work with small solutions. In my machine this means solutions with less than 100k lines of code. Background compilation makes IDE sluggish with large solutions. VB has background compilation on by default, and even without add-ins it gets slower as the solution size grows.
I haven't been able to use ReSharper or CodeRush/Refactor! with VB & RadControls with over 100k line solutions, things just slow down too much. I'm using a Core 2 Duo, 2.4GHz, 4GB machine.
See also: Visual Studio performance and add-ins
Taken from Telerik`s forums:
We are incompatible with JetBrains Resharper indeed. We are competing for the same Visual Studio resources which could potentially create a ton of trouble if you run both of the add-ins together. I doubt that anybody managed to run them together but if you know somebody that did that I'd be really interested in all the details.
So you have to disable Resharper to check out on JustCode. You could always re-enable it later, however, as long as one of them is disabled they coexist happily.
Kind regards,
Tsviatko
the Telerik team
And I am pretty sure you will be way better using only JustCode