Staredit Network

Staredit Network -> Computers and Technical -> Visual Basics
Report, edit, etc...Posted by Mp)Blu on 2007-01-18 at 23:55:13
Does any1 know where I can dl it? I want to learn VB.
Report, edit, etc...Posted by O)FaRTy1billion on 2007-01-19 at 00:07:54
I got mine for free from a teacher, but I think you can download a trial at MSDN...
Or you can learn C/C++ and find free compilers all over the web. tongue.gif
Report, edit, etc...Posted by Xx.Doom.xX on 2007-01-19 at 09:15:10
VB6 and VBExpress (Trial) are way different. Believe me, I use Express, and there are tons of differences. Most programmers here that make StarCraft programs in VB6, so it's hard for me to look at sources, etc. Like .frm is not the form file, it's .vb, like others (Class1.vb, etc.)

I really need to get VB6. But it does cost alot.
Report, edit, etc...Posted by chuiu on 2007-01-19 at 10:15:16
Microsoft owns VB so its next to impossible to get a free copy of it. You would be better off learning C++ and downloading Dev-C++ to compile with.
Report, edit, etc...Posted by green_meklar on 2007-01-19 at 19:31:44
Actually, I've heard that C++ is really an all-round better language than Visual Basic. Note that this isn't my personal opinion; as worthless scripter scum, my opinion on programming languages is subl33t and unimportant. However, I have seen other, l33ter people saying that C++ is better than Visual Basic (a few of them even stooped to the level of talking to my useless, pathetic self in order to tell me so too).
Report, edit, etc...Posted by chuiu on 2007-01-19 at 22:18:02
Theres like levels of programming languages. If you wanted to show the levels it would look something like this (though this isn't an exact representation):

Machine language
Assembler/Assembly language (directly translates to Machine language)
C++ (directly translates to assemly language)
Visual Basic (even more simplified than C++)

And the further you get away from Machine language the less efficient your code gets. Thats why a lot of companies that make high end C++ programs also do a lot of assembly coding to speed up certain operations in the program that get repeated a lot ... like search or sorting algorithms.
Report, edit, etc...Posted by Doodle77(MM) on 2007-01-19 at 23:05:59
C++ comes nowhere near translating directly into assembly. C maybe but definitely not C++.
Report, edit, etc...Posted by chuiu on 2007-01-20 at 00:56:44
What I mean is it generates assembly code. EDIT: And C does as well.
Report, edit, etc...Posted by Doodle77(MM) on 2007-01-20 at 11:08:13
So does VB, its just that the assembly code is mostly calls to functions in the vb runtime dlls
Report, edit, etc...Posted by DiscipleOfAdun on 2007-01-20 at 11:09:37
To be honest, if it ends up running on a Intel processor, it's got to be converted into assembly at some point. Even if you have something like Java, the JVM converts the bytecode into asm when the program runs.

I do know that C/C++ allow for directly putting assembly into your program, which is a good thing at times. However, it's comparatively easier in C/C++ to get pretty bad errors than other languages.
Report, edit, etc...Posted by chuiu on 2007-01-20 at 12:35:13
QUOTE(Doodle77(MM) @ Jan 20 2007, 10:08 AM)
So does VB, its just that the assembly code is mostly calls to functions in the vb runtime dlls
[right][snapback]615853[/snapback][/right]

I know it does, its just VB is much less efficient than C++ do to its further simplification of a lot of things. You can still make efficient code for VB but its much more difficult. Do you know if you can make inline assembly code or link to assembly function in VB? If you can then its got that going for it at least, but I haven't heard of it being capable of doing that.
Report, edit, etc...Posted by ShadowFlare on 2007-01-20 at 17:18:55
QUOTE(chuiu @ Jan 20 2007, 11:35 AM)
Do you know if you can make inline assembly code or link to assembly function in VB?  If you can then its got that going for it at least, but I haven't heard of it being capable of doing that.
[right][snapback]615888[/snapback][/right]

No, it isn't possible to use inline assembly code in a VB program. However, there are two ways you can use code that was in assembly language in a VB program.

1) Include it in a DLL file in an exported function. (easiest way)

or

2) Make a function that takes the same parameters as a window procedure, but you can use the parameters for whatever you want. Use an assembler (or compiler, if the code isn't ASM) to get the actual binary code for it. Code the binary data into a byte array or include it in a resource; which is done doesn't matter, as long as the program can get it into a byte array somehow. Use VirtualAlloc to allocate memory with execute permissions, enough memory to store the code (be sure to call VirtualFree to free the memory when the program is closing). Use RtlMoveMemory to copy the byte array with the code to the allocated memory. Use the Windows API function for calling a window procedure to call the function (might have been CallWindowProc?). Besides the parameter for the function address, the rest of the parameters can be used for whatever you need to pass to your function.

Either of those ways you can only access variables that you pass to the function. Obviously, #2 is significantly harder to set up; but it does give the benefit of not needing to include it in a separate DLL; however, it may also be slightly slower. I've only tested these in VB4, but either method should work in any VB version from at least version 4. Some parts of the second one should be a little easier if on a version higher than 4, since 5+ include the AddressOf operator.
Report, edit, etc...Posted by Cole on 2007-01-21 at 18:33:11
QUOTE
To be honest, if it ends up running on a Intel processor, it's got to be converted into assembly at some point.

It's not that it is converted into assembly but how well it gets converted into assembly.
Report, edit, etc...Posted by Pyro-Fire on 2007-01-22 at 01:40:07
vbexpress... dont get it, 70% of the time the user trying to run your program doesnt have the framework to run it.
Next Page (1)