We have a large chunk of legacy code in VB that I want to unit test, so step one if building interfaces. In C#, visual studio has the cool little Refactor -> Extract Interface function. VB Doesn't, though?
Is there a good way to do this in VB?
Extract Interface function. VB Doesn't, though?
Yes. Unfortunately, Microsoft Visual Studio does not support refactor functionality for VB.NET.
You can install third party tools such as ReSharper, though.
For more information, also have a look at this question on SO: Refactoring options in Visual Studio 2010 differ between C# and VB
Related
Is it possible to develop forms in Visual Studio Express, and copy the VB.NET code to Microsoft Access 2013? Because I'm not familiar with Visual Basic code in Microsoft Access.
No, it is not possible. Microsoft Access uses VBA (Visual Basic for Application) and VBA is a different Language than VB.NET.
Sure, you could write your DLL in a NET Language of your choice and call that DLL from Microsoft Access VBA code, but it is not an easy task.
Here there is a project that explain how to build a COM visible NET library that is callable from a VBA code. It is in C# but the principles are the same, just search for different syntax if really want to do it
I Thing if you know vb.net you should be able to learn "VBA" in no time is almost the same
I'm very disappointed with c++ builder intellisense, so I'm wonder is there any good intellisense that can be used in c++ builder? Something like visual studio have "Visual assist". My current version of builder is 2010, is the x2 have better intellisense?
I doubt if there is a good C++ compiler...
Code Blocks allows the user to hide all the text within an opening brace and a closing brace.
DevC++ can only give colors to different stuff. And it's really old. I used to use it when I was learning C++ at school.
MS Visual C++ allows the user to hide all the text within a function or class and comments that are longer than one line. This is my personal favorite. But it's a bit heavy for old systems (like my 5 year-old laptop).
If I were you, I'd start testing any compiler I find for some time. This way you can see which one mostly suits you.
Is it possible to have visual studio 2010 automatically add namespaces to classes within folders just like c#?
No this is not possible with the VB.Net project system. I would encourage you to share this opinion with the Visual Basic IDE team. They closely monitor suggestions and I know this has come up in the past (although I don't know if there is a current outstanding request for it).
http://connect.microsoft.com
We are in the process of creating active-x controls used within our application.
Since Microsoft stopped supporting classic Visual Basic, is it wise to use Visual Basic to develop the Active X control or the latest VC++/ATL/MFC libraries provide more feature where we can create controls faster by leaving Visual Basic flexibility?
We will not be able to use .NET/VB.NET/C# since the application is supposed to work inside containers and containers may not support latest .NET runtime.
Any other language is best fit for Active X control development other than VB and VC++?
I, personally, would recommend using Delphi for this. It is still actively developed, and has the control you get with C++, but a rapid development environment more like VB.NET.
#nobugz: If you are really interested what is ActiveX in Delphi, look at docwiki. Normally it is 100% source code (yours + VCL, VCL is also available as sources) with autogenerated COM wrappers. So all potential security problems are also in source code. If you find a security problem in VCL, please send a bug report to Quality Central.
Here is a good example on how to create ActiveX Controls with C# .NET
http://www.codeproject.com/KB/cs/CreateActiveXDotNet.aspx
By all means VB6 is the best language. After reading your question I feel that you are a VB6 developer. If you know VB6 and use it then why hesitate using it for producing ActiveX controls.
I program in Delphi as well as VB6 along with VB.NET and C# but creating ActiveX controls is the easiest in VB6 compares to all other development tools.
If you are hell bent on not using VB and if you are looking for an alternative then try out PowerBasic (commercial - very costly) or PureBasic (commercial but affordable) Get it from here or better still MinGW (a GNU C++ compiler).
I have to say that VB6 with a good book like Developing COM/ActiveX Components with VB6: A Guide to the Perplexed you will be up and running faster.
I am less than a week into my Visual Basic education. I have downloaded Visual Studio 2008 and am teaching myself Visual Basic 2008 in hopes of landing a particular contract position.
In the meantime, a friend of mine told me that it is not recommended to write a Windows Service with Visual Basic. Is that true? Could he be referring to some much older version than 2008? Does the .NET version come into play?
What is at stake is that the company that my friend works for is going to completely re-write a component of their flagship product at great cost and expense and simply abandon their existing VB code. If the only hang-up is getting it to run as a service then they could save a lot of money if Visual Basic could, in fact, run reliably as a service.
You can write .NET services in any CLR language, including VB.NET --- your friend was thinking of VB6 and earlier.
(I do recall some fairly crazy kludges that allowed services to be written in VB6, but for all practical purposes, services written in VB6 weren't really a viable solution...)
There is no reason that Visual Basic .Net can't write a windows service. You can select a project which will create a windows service under the "Windows" projects in the Visual Basic section.
Writing a Windows Service in VB.NET (using any version of Visual Studio >= 2003) is just as effective as writing a Windows service in any other language.
Your friend may have been thinking of Visual Basic 6...or he's partial to another .NET language.
In either case...you should be fine to keep going on your path the way you are.
Your friend may be referring to Visual Basic, not VB.NET.
While VB.NET has syntax that is similar to Visual Basic and some convenience functions are still present, they are two entirely different languages and environments.
Your friend is correct in stating that Visual Basic (meaning 6 and earlier, not VB.NET) is a poor choice of a language for a service (or any new application), but VB.NET is every bit as legitimate as C# or any other CLR language.
It may be useful to refer to what you're learning as "VB.NET" or "Visual Basic .NET", rather than just "Visual Basic".
.NET certainly allows you to use Visual Basic to write a Windows Service. I believe there is even a default project template to do so. Here is an tutorial as such: http://www.vbdotnetheaven.com/UploadFile/mahesh/Winservvb11172005233242PM/Winservvb.aspx
All .NET code is converted to an intermediary language that is executed, thus all .NET languages can be used to write a windows service.