Why is vb6 bad




















NET code just sends IntPtr, and works fine. The actual return value of the function is not documented; I assume it's probably an error code. Thanks for the help Disiance. If you ever need a hand with some Java code, maybe I can return the favor.

So that's good well, you know Technically, you could create bitmap object through Windows with Program1, pass the pointer to Program2, and let Program2 do things with it. Not the smartest or cleanest, but possible. Let's see VB now thinks you're passing things right, but it's not sending something correctly. I'm not convinced that I was using the correct types yet; I think the crashing was caused by something else not sure what.

In VB. NET code seems to work fine whether I use the "shared" keyword or not. I'm not at all used to any. I've translated from. What does VB. NET have in the way of pointers? Do you know how they relate to variables and such? Actually, what is an IntPtr It's your second idea that prompted all this, so I blame you and bear with me Could you throw a messagebox in the.

NET code and see what values the two IntPtr hold? Probably won't avail to anything, but it might. Using an Integer data type just doesn't seem right for anything pointer related. Just copy memory a couple times and you should be fine.

Regardless, once the. It works in. NET because you are getting a pointer variable. In VB6 you get the raw pointer in a long. I had tried using Long types for the pointers and the return value , since I agree, that's the version which should work according to the documentation. NET version in the OP. I did display the IntPtr values in the. NET version when I was coding that; they were indeed big negative numbers memory addresses which eventually dereferenced fine using the Marhal calls.

The VarPtr looks interesting. I'll research VarPtr and see if I can learn more about it though; it does sound promising, thanks. Forget VB6. It's a dead system. No support, no future. Use the Visual Basic Express Edition, as suggested above. It's free, useful, and about as "generic" as it gets anymore. Or, you could use something even better: Python www. Or IronPython. Much better system. If you are approaching the programming world, and you want to do some programs, Visual Basic is more than sufficient.

Once you learned it, you will keep to use it. NET is given free from Microsoft, maybe you could be interested in that. Visual Basic is old and no longer supported by Microsoft, sounds like you may just have access to a copy. Yes you certainly can create generic programs with it, but where do you go from there? Is this hobby programming? I'd say VB6 is still ok for throw away prototyping and probably better than VB. NET in that regard. A larger problem is the lack of true inheritance and being able to use the idioms available in.

As such it makes writing clean and maintainable code more difficult. So now dont go and start a new project in a dead language. Like others have said, Microsoft's support for VB6 has been discontinued. But no company "supports" C, so I would say that's not really a reason inherent to the language. Another reason is support for objected oriented programming, which may or may not be important to you. To me, it is. VB6 is handicapped in this area. It doesn't really support interfaces. Also, arrays are some pain to work with.

Checking whether an array has been properly intialized a fairely trivial task, imho involves some workarounds. It's not as simple as. If you already know some Visual Basic syntax, then switching to VB. NET shouldn't be hard. You'll just have learn your way around the framework class library. If someone tell you for any language the it's " not good " then just erase this person from your contact list.

If you understand one language you CAN know the other. Is not important only the programm language, but the FLOW of data. Check out Xojo as a modern replacement for Visual Basic. It is as easy to use as VB6, but also build cross-platform desktop apps, web apps and iOS apps. I myself start coding using VB6. Because we know if we get people to avoid it they won't consider the other options that are worse and the option that someone will actually consider will be better.

So that's why we get that way; not because it's actually that bad of a language. In reality Visual Basic is not a horrible language it's simply that it's not a good choice and we have an opportunity to protect you from making that bad choice. Real quick let's give some history. Programming languages go back to roughly Now technically there were languages before there would have to be because computers had to run, but the first real popular high-level language was Fortran from IBM in believe it or not.

Very few people use it, but it is a good language with some benefits - especially in scientific computing. Which is what it was meant for Fortran is held up very well. COBOL was really meant for accounting and financial systems and generally is an awful language; it's design is terrible. By people who wanted to do something better and didn't want the scientific kind of mathematical complexities of Fortran started proposing a new language that was designed to make it easier to do other tasks.

All the things that weren't scientific computing or accounting go for the big low-hanging fruit in the early computing. But by we wanted to do a lot of other things including work on smaller computers and different types of environments that we hadn't considered previously because, I mean, computers were new - we were doing new things. And that big language and it's the number three language of the early years unless you include Algol which was kind of important but really fell by the wayside pretty early so okay we could maybe include that in one of the granddaddy languages, but by we had our third really big language and that was basic beginners all-purpose symbolic instruction code basic was designed not to actually be so much of a beginner language but to be a more versatile language but it was intended to be used in university for learning programming.

So it did have a bit of that beginners connotation in it for for real, but mostly I think they put that in just because they wanted to have a cool acronym. BASIC was developed at Dartmouth in , as I said, so it's been around for a long time and it's gone through a lot of iterations since then.

So has Fortran. Fortran today is very dissimilar to Fortran when it originally came out. BASIC in the s it became the language for the personal computer space.

There were other languages out there but very few got the acceptance that basic did. You couldn't share applications between them - their basics were not all the same, but in this sounds terrible.

But the basics were basically the same. BASIC is not a bad language coming from that era Microsoft Windows kind of grew up with this 8-bit and bit and bit and eventually bit history behind it, and unlike other operating systems, for some reason, partially because Bill Gates personally was involved in early basic programming language interpreters for these platforms so there's a real tie from actual founders so that Microsoft started before they made operating systems they were a BASIC company.

They made BASIC interpreters so they have a lot of emotional and historical ties to the language, and there's nothing wrong there, that's great that was a great place for them to start and it did really well for them.

Now as Windows grew up they needed more and more power from basic to do the things that they needed to do to compete with new languages and new paradigms that are coming out on other platforms eventually BASIC gave way to Visual Basic which was still BASIC just with a lot more stuff added to it and it was compiled instead of being interpreted and made it more powerful that ran its course up to Visual Basic 6.

And by the end of the Visual Basic era of the VB was as we called it was actually a pretty solid language and pretty popular and very useful, as long as you worked in the Window space and mostly if you wanted to build desktop style applications, but a lot of people wanted to do that so it was a great language for that.

VB also branched off into the VBA family Visual Basic for Applications which is used by things like Microsoft Office for automation and VB Script which was used for things like operating system automation tasks as a replacement script for a shell language and VB Script also became one of the first languages used in the ASP frameworks for building server-side web applications. So VB was really important up through the later 90s coming into the s.

NET and became one of a number of languages that shared the common. NET runtime. It's really big and infamous sibling is C. Now BASIC does just fine and can do more or less everything the C can, but a bunch of things have changed over the years.

So it starts around to , we started to diverge from where basic makes sense for a lot of internal bespoke software development projects. This is not, you know, the IT industry is not trying to leave Microsoft behind. Microsoft is with us here: they want VB to go away. They [Microsoft] don't hate it and they are kind of emotionally tied to it and they kind of wish it would drag along, but they also know it's expensive for them to support.

And if they could get rid of it their lives would be a little bit easier. VB is no longer providing any real benefits to Microsoft as a company, or to their customers so Microsoft would like it if it just went away and they could focus on C and some of the other languages that they have like F , which is also an excellent language that runs on the common.

One of those big things is that when it was originally designed it was based off of Fortran. Fortran had an early syntax that's a little bit on the weak side and didn't have the benefit of years and decades of language research to make something that was a lot smarter and easier to use. Fortran syntax tends to be a little bit archaic: it's great for its era. It was the best of its era it led the charge in making modern software and operating systems and programming languages. So we can't fault Fortran in any way.

Fortran did an amazing job. COBOL came after it and didn't learn from it. They didn't learn anything from it. COBOL is a train wreck of syntax. BASIC, when they came out said well let's go back and look at Fortran and make something that mostly mimics Fortran when it can and when it makes sense, and they did and that worked. They share a common background syntax in a lot of ways. Now over time that entire syntax family, the Fortran - BASIC family is now considered "archaic", and it's really clunky in the modern world.

The big thing that replaced it was the C family in the late s. C is a programming language takes a completely different approach to syntax and uses a lot of parentheses and brackets and it's a little bit more programming language looking, but it's a lot more modern and if you spend time actually programming it tends to be a lot more readable and useful - you're spending less time staring at the screen trying to figure out what it does and a lot less time scrolling around because of just a lot of text sprawling on the screen.

The C family of syntax ended up, over time, waiting it out; it took a long time the 70s and 80s still had the Fortran basic world with heavy influence, but C just became more and more popular. Especially as more other languages began to grow off of it. That general modernization of the language of programming languages took over and we now see basic as a throwback.

It's a bit of a vestige. It has just hung on. That's kind of the basics. That's why C is seen as so much better than Visual Basic, even though they both run on the common. NET framework and have the opportunity to use the same modules. C is not technically more powerful than VB, but it is more expressive, and easier to pass on to someone else to maintain than VB.

And that's where things get really important; so the reasons that VB are not considered great is that it no longer has any benefits with up until VB6. VB was unique in what it offered so basic was really really important you just couldn't turn to someone else and get to the VB advantages.

You could use some tools like Delphi and thing which is based on Pascal and get a lot of the VB advantages, but it never got to the same level. VB was the king of making desktop applications in the Windows world for a very long time, but once C was brought in. And so C wasn't just brought in to potentially replace VB and run alongside it.



0コメント

  • 1000 / 1000