locked
Is it possible to write a SMALL program in VB2010 express? RRS feed

  • Question

  • I write small utility programs in VB6 for obsolete hardware.

    But VB6 appears to be going away, so I installed VB2010 express.

    Simple one-line program to change the text on a button when clicked.

    16KB exectuable.

    This program, compiled in VB6 executes on a win95 machine.

    Program compiled in VB2010 won't run on XP without installing dotnet4.

    41MB download.

    Impossible if the machine is not web connected.

    Impossible if the OS doesn't support dotnet4.

    Unacceptable if it's not my machine.

    Undesirable in any case.

    IIRC, if I use something "fancy" in vb6 the installer copies the required

    dlls as part of the installation.

    Is there a way to get vb2010 to do something similar so I don't

    need 41MB of stuff to run a trivial program?

     

    Are there any viable free alternatives to write small gui basic programs

    without having to learn/use the windows API?

    Sunday, March 20, 2011 10:00 PM

Answers

  • Hi,

    at the moment I don't know a real solution for you.

    Maybe a little better could be to target an older framework. You could write your applications using .Net Framework 2.0. But it is still a big download for all people who don't have it so far but it is much less than 41 MB if I remember correctly.

    But you mentioned a win 95 system? Your application will not work on such old systems ...

    I hope this was helpfull.

    With kind regards,

    Konrad

    • Marked as answer by Liliane Teng Wednesday, March 30, 2011 2:48 AM
    Monday, March 21, 2011 6:32 AM
  • You cannot run VB6 without RunTime, the difference wity .Net is only that Net programs have in fact a more quicker runtime which is also usable for C++, F#, and C#.

    The created applications with .Net are normally far much smaller then the VB6 applications.

    But you cannot use it on Win95 like you cannot use VB6 on MS Dos.

    You say it uses to much MB's, it only runs on computers which have huge OS systems, the Net framework is just a Windows Version independent part of that. Currently many telephones are connected to Internet and .Net programs are used on those, don't do if we life in the time of the steam engine.

    Be aware you can also create programs with VB2010 for framework 2.0

    However, Intel Assembler has none of these runtime issues from any VB version and are used for all kind of hardware (driver) programs.

    http://software.intel.com/en-us/articles/introduction-to-x64-assembly/

     

     

     


    Success
    Cor


    • Marked as answer by Liliane Teng Wednesday, March 30, 2011 2:48 AM
    Monday, March 21, 2011 9:04 AM
  • As noted, you are going to need the appropriate framework to run your application. However, I think you are seeing a problem where none exists, or is fairly easy to overcome. If you find that unacceptable, then at this point, you do not need to upgrade.

    This issue (size) has been noted ever since the framework was required, but really hasn't been a hurdle except in the very beginning. the latest operating system(s) have the framework installed, and if they are kept up to date will have the framework (generally).

    Additionally, how are you distributing your application? The framework redistributables fit on the smallest of thumb drives, and CD of course. If they are obtaining it through a network then bandwidth is not really limited. If it's an internet download then, of course, bandwidth may be an issue.

    Regardless, windows 95 is not supported (by the framework). If you are targeting this application platform then why do you need to upgrade to .NET? You can continue to produce VB6 applications. If you want to be compatible with the latest OSs then it is true that you are going to make a compromise. VB6 still runs on windows 7, though.

    Your only other options are C++ or perhaps Delphi, but may require API knowledge. As they say, there's no such thing as a free lunch.


    Stephen J Whiteley
    • Marked as answer by Liliane Teng Wednesday, March 30, 2011 2:48 AM
    Monday, March 21, 2011 11:52 AM
  • The answers to your questions in order are:

    Yes - but you do need the CLR to run them (oh and the compiler to compile them).

    No - as others have explained.

    Possibly - try google and make sure you mention the platform you want this to work with.

    Also VB6 is not going away it's already pretty much gone in terms of support. I'd love to see a one-line program that changes text on a button - how do you create the window and button and change the text all in one line. Is it really an entry in the Obfuscated C competition? :)


    Regards David R --------------------------------------------------------------- "Every program eventually becomes rococo, and then rubble." - Alan Perlis The only valid measurement of code quality: WTFs/minute.
    • Edited by Riced Monday, March 21, 2011 4:54 PM Corrected typo
    • Marked as answer by Liliane Teng Wednesday, March 30, 2011 2:48 AM
    Monday, March 21, 2011 4:53 PM

All replies

  • Hi,

    at the moment I don't know a real solution for you.

    Maybe a little better could be to target an older framework. You could write your applications using .Net Framework 2.0. But it is still a big download for all people who don't have it so far but it is much less than 41 MB if I remember correctly.

    But you mentioned a win 95 system? Your application will not work on such old systems ...

    I hope this was helpfull.

    With kind regards,

    Konrad

    • Marked as answer by Liliane Teng Wednesday, March 30, 2011 2:48 AM
    Monday, March 21, 2011 6:32 AM
  • You cannot run VB6 without RunTime, the difference wity .Net is only that Net programs have in fact a more quicker runtime which is also usable for C++, F#, and C#.

    The created applications with .Net are normally far much smaller then the VB6 applications.

    But you cannot use it on Win95 like you cannot use VB6 on MS Dos.

    You say it uses to much MB's, it only runs on computers which have huge OS systems, the Net framework is just a Windows Version independent part of that. Currently many telephones are connected to Internet and .Net programs are used on those, don't do if we life in the time of the steam engine.

    Be aware you can also create programs with VB2010 for framework 2.0

    However, Intel Assembler has none of these runtime issues from any VB version and are used for all kind of hardware (driver) programs.

    http://software.intel.com/en-us/articles/introduction-to-x64-assembly/

     

     

     


    Success
    Cor


    • Marked as answer by Liliane Teng Wednesday, March 30, 2011 2:48 AM
    Monday, March 21, 2011 9:04 AM
  • As noted, you are going to need the appropriate framework to run your application. However, I think you are seeing a problem where none exists, or is fairly easy to overcome. If you find that unacceptable, then at this point, you do not need to upgrade.

    This issue (size) has been noted ever since the framework was required, but really hasn't been a hurdle except in the very beginning. the latest operating system(s) have the framework installed, and if they are kept up to date will have the framework (generally).

    Additionally, how are you distributing your application? The framework redistributables fit on the smallest of thumb drives, and CD of course. If they are obtaining it through a network then bandwidth is not really limited. If it's an internet download then, of course, bandwidth may be an issue.

    Regardless, windows 95 is not supported (by the framework). If you are targeting this application platform then why do you need to upgrade to .NET? You can continue to produce VB6 applications. If you want to be compatible with the latest OSs then it is true that you are going to make a compromise. VB6 still runs on windows 7, though.

    Your only other options are C++ or perhaps Delphi, but may require API knowledge. As they say, there's no such thing as a free lunch.


    Stephen J Whiteley
    • Marked as answer by Liliane Teng Wednesday, March 30, 2011 2:48 AM
    Monday, March 21, 2011 11:52 AM
  • The answers to your questions in order are:

    Yes - but you do need the CLR to run them (oh and the compiler to compile them).

    No - as others have explained.

    Possibly - try google and make sure you mention the platform you want this to work with.

    Also VB6 is not going away it's already pretty much gone in terms of support. I'd love to see a one-line program that changes text on a button - how do you create the window and button and change the text all in one line. Is it really an entry in the Obfuscated C competition? :)


    Regards David R --------------------------------------------------------------- "Every program eventually becomes rococo, and then rubble." - Alan Perlis The only valid measurement of code quality: WTFs/minute.
    • Edited by Riced Monday, March 21, 2011 4:54 PM Corrected typo
    • Marked as answer by Liliane Teng Wednesday, March 30, 2011 2:48 AM
    Monday, March 21, 2011 4:53 PM
  • The answers to your questions in order are:

    Yes - but you do need the CLR to run them (oh and the compiler to compile them).

    No - as others have explained.

    Possibly - try google and make sure you mention the platform you want this to work with.

    Also VB6 is not going away it's already pretty much gone in terms of support. I'd love to see a one-line program that changes text on a button - how do you create the window and button and change the text all in one line. Is it really an entry in the Obfuscated Here you go: Command1.Caption = "ouch!" You open the project, drag a button to the form. Type "Command1.Caption = "ouch2"" into the command1_click subroutine that is automagically presented. Click make and you have a working executable that runs in win95,98,2k,xp,win7 without any prerequisites. That is the WHOLE POINT of VB6. You don't have to know anything about windows messaging to write a gui program. You don't have to instantiate a class member (whatever that means) just to interface a button. Drag it, drop it, the IDE tells you what options you have and puts up a prototype subroutine with all the parameters defined... and even gives you context sensitive help with options at each dot when typing the command. I don't have any problems with adding functionality...Make it as complex and confusing as you like...as long as you don't delete the easy way of doing simple stuff. I was pleasantly surprised that VB2010 let me do simple stuff simply. If only the executable would run on the systems I have available. Requiring 40MB of bloat to run a simple utility is not acceptable. If nothing can be done about it, that's ok...just askin' Maintaining an XP computer with VB6 forever works for me.

    Monday, March 21, 2011 9:17 PM
  • That tells me you are not a programmer or at least not an experienced one.

    The program does not consist of one line - there's a whole lot of code generated by the IDE. And it does have prerequisites - you must have the VB run time dll on the machine. You apparently do not know that, hence my deduction that you are not a programmer.

    You don't have to know anything about Windows messaging to write a GUI program in VB or C# or any other .Net language. In fact you can exactly replicate the steps you say produces a one line VB6 program and get the same result. However, as with VB6, you need the appropriate run time to run it. You also need an appropriate IDE to do it (usually Visual Studio or Mono).

    That of course assumes you are not compiling to native code in VB6 - if you are then the run time is rolled into the exe (just compare the sizes of exes produced using VB pcode and native code). The very nature of .Net (as with the Java platform) precludes native code compilation (I believe it it can be done but requires a non .Net compiler).

     

     

     

     

     

     

     

     

     


    Regards David R --------------------------------------------------------------- "Every program eventually becomes rococo, and then rubble." - Alan Perlis The only valid measurement of code quality: WTFs/minute.
    Monday, March 21, 2011 10:20 PM
  • That tells me you are not a programmer or at least not an experienced one.

    Never said I was. But that IS the point. I do not want to be an experienced programmer. I wanna make the hardware dance.

    The program does not consist of one line - there's a whole lot of code generated by the IDE.

    EXACTLY!! By the IDE. I have to know enough to write ONE line. And I can compile it with a few clicks. It's all automagic.

    There's a whole lotta code generated by the include files that I never see and the assembler that I never see and the linker that I never see. VB is IMMENSELY easier than anything else I can think of. Stated another way, VB gets in my WAY less than alternatives.

    That of course assumes you are not compiling to native code in VB6 -

    Why would you assume that?

    I always compile to native code. Again, the whole idea is to have the fewest requirements on the target system.

    And I mis-spoke. MSVBVM60.dll and related stuff doesn't come stock with the OS until win2K. You only get native support for VB5 on win95.

    I don't expect us to ever see eye to eye. That's ok. But I'm tired of beating the dead horse. VB2010 epxress is not gonna do what I need. Glad I didn't pay for it.

    Tuesday, March 22, 2011 1:30 AM
  • Unfortunately, your requirements are at odds with one another:

    1. you want the fewest requirements on the target system; and

    2. You want to write 'one line'.

     

    For point 1. you will need to write a C program - this has the lowest 'overhead', but even so, there is a C runtime that is required. as you have noted, VB has a runtime but it is transparent to you (the programmer) on the newer operating systems.

    For point 2. you are going to need a higher level language. VB6, VB, C# are all options. You can rapidly get something working with minimal effort on your part.

     

    Really, you are only arguing with yourself. If you feel the latest tools don't do the job, then that is your decision based on your requirements. You have to weigh up the pros and cons. You also have to appreciate that this 'horse' was beaten nearly 10 years ago, now. weather you are a professional developer or not, using the tools which are made available requires the same decision making base on a criteria to be met. Most all developers - professional and amateur - use some version of the .NET framework. additionally, since VB6 development environment is (and was never) a free product, it is most likely that amateur developers will be using a .NET framework development environment - which can be free.

    You can continue to use VB6, and use it on up to and including Windows 7. The support for running VB6 executables beyond that is undetermined. I would suspect that VB6 has the widest platform compatibility, if that is a restriction that you must accommodate. Be aware that support for VB6 through Microsoft ended some time ago.

     


    Stephen J Whiteley
    Tuesday, March 22, 2011 12:30 PM
  • That tells me you are not a programmer or at least not an experienced one.

    Never said I was. But that IS the point. I do not want to be an experienced programmer. I wanna make the hardware dance.

    The program does not consist of one line - there's a whole lot of code generated by the IDE.

    EXACTLY!! By the IDE. I have to know enough to write ONE line. And I can compile it with a few clicks. It's all automagic.

    There's a whole lotta code generated by the include files that I never see and the assembler that I never see and the linker that I never see. VB is IMMENSELY easier than anything else I can think of. Stated another way, VB gets in my WAY less than alternatives.

     

    That of course assumes you are not compiling to native code in VB6 -

    Why would you assume that?

    I always compile to native code. Again, the whole idea is to have the fewest requirements on the target system.

    And I mis-spoke. MSVBVM60.dll and related stuff doesn't come stock with the OS until win2K. You only get native support for VB5 on win95.

    I don't expect us to ever see eye to eye. That's ok. But I'm tired of beating the dead horse. VB2010 epxress is not gonna do what I need. Glad I didn't pay for it.

    First of all VB is not compiled to native code but to VB native runtime code.

    Secondly in my opinion is all what you told about an easy way of doing, 100 times easier to do with the current VB than that 6 versions old one.

    However, if you are still driving a bicycle and never something else, you will find that probably also easier to use than driving a car. But you will see the advantage of a car if you take a little bit longer ride than only in your own street.

     


    Success
    Cor
    Wednesday, March 23, 2011 9:15 AM