Archived

This topic is now archived and is closed to further replies.

dr_slash_uh

Visual Basic vs C#

Recommended Posts

I am a pretty good programmer with visual c++. My problem is it takes way to long to make a GUI with c++ compared to VIsual Basic. I never used visual basic but I watched my firend make a gui so fast in less than 5 minutes, while it would take me an hour or so to do the same thing with Visual C. Would one of you all recommend me to learn visual basic or the new C#. I always make fun of my friend because I have more control over my programs, yet he completes his programs MUCH faster. I wanted to know if C# can compete with visual basic on gui building and is it as fast as c++ with directx games.

Share this post


Link to post
Share on other sites
I''ve been using VB for years. I started real coding with VB. I can do almost anything possible with VB (databases excepted, I hate those suckers).

I discovered C# a couple months ago. It''s like VB, but with many more advantages and (nearly) all the disadvantages removed. I am slowly working my way learning it, some day to replace VB entirely. The interface designer is mroe powerful than even VB''s. (in VS.NET and C# Builder, anyway).

C# is better than VB at GUI building. It loses some speed compared with C++ (10%-20% average is what I''ve heard) but is way faster than VB. Basically, when you need that fine control but not so much interface, use C++, and when you need a really nice interface and speed/low level control aren''t that big a deal, use C#.

Share this post


Link to post
Share on other sites
Is there anyway to intergrate c++ in visual basic or c++ in c## simliar to how inline assembly works. ex


cout<<"this";
cout<<"that";
asm {
mov ax, bx
....
}
cout<<"some more this and that";

Share this post


Link to post
Share on other sites
Visual Basic in C#? No, AFAIK.

C++ in C#? Just write it. In most cases it will be fine. There''s some weird stuff with pointers and managed code and stuff, but I haven''t looked at it too throughly. But in short, yes, without any special syntax at all.

Share this post


Link to post
Share on other sites
In .NET it doesn''t matter what (managed) language you use. A C# can use VB.NET classes. I don''t know if you can use different languages in the same assembly. But one assembly in C# and the other one in VB.NET could be a solution for you.

Share this post


Link to post
Share on other sites
If you don''t already know VB, I don''t see any reason to learn it over C#.

I would say that for really, really small quick and dirty apps, VB6, with its pretty bare IDE, still has an edge. But for everything else GUI in Windows, I would use C#.

Cédric

Share this post


Link to post
Share on other sites
If you use MFC, you can draw out the GUI in 5 minutes flat, much like in VB, except you can use all of C++. This works under VC 6.

If you use .NET, you can use any managed language and the .NET framework (which is basically the Windows Forms API from VB) and the same GUI builder. However, managed C++ doesn''t have quite the full power of native C++; some things are restricted.

Share this post


Link to post
Share on other sites
- serious - Just use C# - while I still think that the IDE is more heplfull in VB and can cause you to code slightly faster than in C#, it's definitely not worth learning a whole new syntax over it. In the end the C#'s syntax familiarity will ease your learning of it. - /serious -

And this way, you can still unjustifiably make fun of vb users and I can justifiably make fun of your.

"I woke up sweating and clutching my pillow. Thankfully the powerful and reassuring visage of Optimus Prime staring back at me from my pillow case served to ease my frayed nerves. Like the giant robotic father I never had he always knows just what to say" - Gabe, Penny-Arcade

Alexandre Moura

[edited by - alexmoura on October 10, 2003 11:16:35 PM]

[edited by - alexmoura on October 10, 2003 11:17:11 PM]

Share this post


Link to post
Share on other sites
::If you use MFC, you can draw out the GUI in 5 minutes flat,
::much like in VB, except you can use all of C++. This works
::under VC 6.

Sorry, what are you smoking?

The MVC / VC6 designer is a toy compared with wha you can do with the .NET designer (VB.NET, C#, Managed C++), and especially once you get some third party controls involed. You should have a look at sites like Infragistics (http://www.infragistics.com/) to see what is avialable as building blocks befoer making such ridiculous statements.


Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

Share this post


Link to post
Share on other sites
quote:
Original post by hplus0603
However, managed C++ doesn''t have quite the full power of native C++; some things are restricted.

This is just bull. *ANY* legal C++ program(unless they use some of the MC++ keywords as identifiers) will compile under MC++. Not all of it will compile to CIL(inline asm, etc...), but most of it will.

--
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
[Project site] [Blog] [RSS] [Browse the source] [IRC channel]

Share this post


Link to post
Share on other sites
Just to clarify something, all of you people saying that the VB GUI designer is better than the C# one must be talking about VB6. Since VB.Net and C# (along with every other managed language) use the exact same GUI designer. And VB6 is no longer available to buy, you can still probably find it on eBay but its getting harder and harder.

Share this post


Link to post
Share on other sites
quote:
Original post by thona
The MVC / VC6 designer is a toy compared with wha you can do with the .NET designer (VB.NET, C#, Managed C++), and especially once you get some third party controls involed.

BUT it''s much less buggy. The .NET 2003 WinForms designer has some real doozies, especially when designing for the Compact framework. Then again, MFC probably wouldn''t run at all on most compact platforms...

ld

Share this post


Link to post
Share on other sites