Results 1 to 17 of 17

Thread: Making an executable file with the .vb extension?

  1. #1

    Thread Starter
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    685

    Making an executable file with the .vb extension?

    Apparently VB6 can make and use executable files with an intermediate file extension (.vb), because it shares compatibility features with eVB3. This intermediate file is a tokenized version of the program, that is CPU-independent. The .vb file appears to invoke an interpreter on Windows 10/11, running the tokenized executable file.

    Did this work on XP/Vista/7?
    Can anyone make and test a simple hello world application, by adding the .vb extension to the executable name, ie Project1.vb.


    Perhaps the most important point to be made is that eMbedded Visual Basic does not contain a compiler. Applications run in an interpreter that is summoned when PVBLOAD.EXE, the Pocket Visual Basic Loader program, is run.

    The eMbedded Visual Basic environment does not create an .EXE file, but rather a .VB file that contains a tokenized version of your program. Unlike regular Windows CE executable files, this is a CPU-independent file that can be copied to any Windows CE-based device. That fileâ"plus the runtime libraries and other support files, which are device-dependentâ"are what you need to run a Visual Basic-based program on Windows CE-based device.

    eMbedded Visual C++ is practically a clone of Visual C++ 6.0; you'll have to look very hard to find the few places where the two are not the same. Both environments feature familiar editors, menus, and settings windows. Both offer a starting point for building apps, although in this arena the eMbedded Visual C++ environment offers the richer collection.
    More details posted about eVB and VB6.

  2. #2
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Making an executable file with the .vb extension?

    Well there was a CE Toolkit for VB that allowed for writing programs for Windows CE/Mobile devices. I have a copy of it here somewhere but never really used it much and instead switched to eVB for Windows CE/Mobile or Pocket PC as it was called at the time. The output of eVB is indeed a .vb file but the .vb extension is to the best of my knowledge not an executable. Perhaps if you have some interpreter installed it might run and of course it can run in the CE emulator but I have several of those old apps in my code folder and the .vb file just shows up as a code file on the Win10 PC . I assume this is because I have VS installed and all of the .Net versions use *.vb for vb source code files.
    Last edited by DataMiser; Oct 18th, 2021 at 07:26 PM.

  3. #3

    Thread Starter
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    685

    Re: Making an executable file with the .vb extension?

    Quote Originally Posted by DataMiser View Post
    Well there was a CE Toolkit for VB that allowed for writing programs for Windows CE/Mobile devices. I have a copy of it here somewhere but never really used it much and instead switched to eVB for Windows CE/Mobile or Pocket PC as it was called at the time. The output of eVB is indeed a .vb file but the .vb extension is to the best of my knowledge not an executable. Perhaps it you have some interpreter installed it might run but I have several of those old apps in my code folder and the .vb file just shows up as a code file on the PC. I assume this is because I have VS installed and all of the .Net versions use *.vb for vb source code files.
    Yes, if you have VB.NET installed, or some other picking it up, that will open as a code file. I've tried it also here on fresh Windows 11 and it runs as an executable. The task manager displays Project.vb.exe.
    I'm just wondering if this is a Windows 8/10/11 behavior, or did previous OS also interpret this and run as executable.

  4. #4
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Making an executable file with the .vb extension?

    If it shows it as Project.vb.exe then that says to me the file in question is an actual exe with an actual exe extension that just happens to have the .vb in the filename.

    I seriously doubt they have added anything to Windows to allow it to run a .vb file that would have been created by a tool that predates XP and was dropped many moons ago. They even dropped support for CE in VS after 2008 and recently seemed to have also killed the mobile device manager.

  5. #5

    Thread Starter
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    685

    Re: Making an executable file with the .vb extension?

    Quote Originally Posted by DataMiser View Post
    If it shows it as Project.vb.exe then that says to me the file in question is an actual exe with an actual exe extension that just happens to have the .vb in the filename.

    I seriously doubt they have added anything to Windows to allow it to run a .vb file that would have been created by a tool that predates XP and was dropped many moons ago. They even dropped support for CE in VS after 2008 and recently seemed to have also killed the mobile device manager.
    The file is a tokenized version of the program, as documented. The task manager appears to be loading the image in memory by interpreting the file showing the appended exension. Although, you may still be right that these are basically the same file that are run/load slightly differently.

  6. #6

    Thread Starter
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    685

    Re: Making an executable file with the .vb extension?

    It is confirmed. This is a different file format (.vb) which is largely interchangeable with the .exe format.
    for example, if you start a .vb file made from eVB3, it will be interpreted/converted and run as an executable image.

    You may also recompile with VB6 and it will change the .vb file to the native exe format, although not an identical file, it is much closer to the format of a standard exe. The process of recompiling with VB6 is interpreting/converting the eVB format but saving to the old (.vb) extension.
    Test:
    1. Make Project1.vb.
    2. Make Project1.exe.
    3. Compare files.

  7. #7
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,064

    Re: Making an executable file with the .vb extension?

    Quote Originally Posted by TTn View Post
    The .vb file appears to invoke an interpreter on Windows 10/11, running the tokenized executable file.
    Quote Originally Posted by TTn View Post
    I'm just wondering if this is a Windows 8/10/11 behavior, or did previous OS also interpret this and run as executable.
    FYI, in my Windows 10 (21H1) the *.vb file extension is not recognized (it does not have a program associated with the file extension).

  8. #8

    Thread Starter
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    685

    Re: Making an executable file with the .vb extension?

    Quote Originally Posted by Eduardo- View Post
    FYI, in my Windows 10 (21H1) the *.vb file extension is not recognized (it does not have a program associated with the file extension).
    Thank you for testing. Maybe Visual basic is not installed on this machine? That could be relevant to how and why it works.

    I would attach the eVB Project files here to inspect, but the forum doesn't allow me to upload the .ebp or .ebf files (invalid).
    Github eVB project files here: https://github.com/WindowStations/eVB

  9. #9
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,064

    Re: Making an executable file with the .vb extension?

    Quote Originally Posted by TTn View Post
    Thank you for testing. Maybe Visual basic is not installed on this machine? That could be relevant to how and why it works.
    I have the VB6 IDE installed but not the .NET one.

    Quote Originally Posted by TTn View Post
    I would attach the eVB Project files here to inspect, but the forum doesn't allow me to upload the .ebp or .ebf files (invalid).
    Github eVB project files here: https://github.com/WindowStations/eVB
    None of the three extensions have a program assigned to open.

  10. #10
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,163

    Re: Making an executable file with the .vb extension?

    Quote Originally Posted by TTn View Post
    Test:
    1. Make Project1.vb.
    2. Make Project1.exe.
    3. Compare files.
    Both files are the same native portable executable here. Seems like target file extension does not matter.

    cheers,
    </wqw>

  11. #11

    Thread Starter
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    685

    Re: Making an executable file with the .vb extension?

    Quote Originally Posted by Eduardo- View Post
    I have the VB6 IDE installed but not the .NET one.



    None of the three extensions have a program assigned to open.
    If you have the files from Github, then try this:
    To open the project file change .ebp to .vbp first.
    You can open the .ebf file manually with VB6, ie right click the file, click open with...

    Recompile and make the file leaving the .vb extension.

  12. #12

    Thread Starter
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    685

    Re: Making an executable file with the .vb extension?

    Name:  New Bitmap Image (2).jpg
Views: 463
Size:  61.0 KB
    Once recompiled on VB6 the files are still different, but virtually the same.

  13. #13
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,064

    Re: Making an executable file with the .vb extension?

    Quote Originally Posted by TTn View Post
    If you have the files from Github, then try this:
    To open the project file change .ebp to .vbp first.
    You can open the .ebf file manually with VB6, ie right click the file, click open with...
    OK, I opened the .ebp file from VB6, I got several error messages, like:

    Name:  VBE msg1.jpg
Views: 406
Size:  19.1 KB

    and

    Name:  VBE msg2.jpg
Views: 452
Size:  19.0 KB

    I continued loading the project, then I got the message that VBCE.CommandButton was not a loaded control class, OK.

    This is the Form1.Log generated:

    Code:
    Line 10: Class VBCE.CommandButton of control Command1 was not a loaded control class.
    Line 16: The property name _cx in Command1 is invalid.
    Line 17: The property name _cy in Command1 is invalid.
    Line 20: The property name Caption in Command1 is invalid.
    Line 31: The property name Style in Command1 is invalid.
    (just FYI).

  14. #14
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Making an executable file with the .vb extension?

    Just for giggles I opened one of my ebp files in notepad and one of the ebf files there are lots of lines in both that VB6 would not know what to do with. No way it would ever run or compile in VB.
    Here is a snippet from the ebp file
    Type=Exe
    PlatformGUID={6D5C6210-E14B-11D2-B72A-0000F8026CEE}
    DeviceGUID={3CFA6F81-EB79-11D2-BAC5-006097BA8DF0}
    RemotePath=\Windows\Start Menu\Project1.vb
    UpdateType=1
    ForceRuntime=0
    ForceComponent=0
    Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\WINNT\system32\stdole2.tlb#OLE Automation
    Form=frmMain.ebf
    Object={23CE4CF5-25A1-11D1-9A72-00A0C986B84A}#1.0#0; mscewinsock.dll
    Object={25C953A7-5464-11D1-A714-00AA0044064C}#1.0#0; MSCEFILE.DLL
    Form=frmRF.ebf
    Module=Module1; Module1.bas
    Object={700AFAF6-D75E-11E2-84F5-00E098035C9E}#1.1#0; ActiveScan8100X3.dll
    IconForm="frmMain"
    And in the ebf are references to CELabel, CEFrame, CETextBox, CECommand Button and some other stuff that VB would not work with. Perhaps if I had the CE Toolkit installed it may recognize those items, can't say as the last time I had the Toolkit installed was on Windows NT with VB5.

    Also just for giggles I renamed the program from *.vb to *.exe and tried to execute it.
    The result was. This program can not run on your PC. Makes sense because evb programs are designed to run on Wndows CE and not a PC.
    Last edited by DataMiser; Oct 19th, 2021 at 09:00 AM.

  15. #15

    Thread Starter
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    685

    Re: Making an executable file with the .vb extension?

    Quote Originally Posted by DataMiser View Post
    Just for giggles I opened one of my ebp files in notepad and one of the ebf files there are lots of lines in both that VB6 would not know what to do with. No way it would ever run or compile in VB.
    Here is a snippet from the ebp file


    And in the ebf are references to CELabel, CEFrame, CETextBox, CECommand Button and some other stuff that VB would not work with. Perhaps if I had the CE Toolkit installed it may recognize those items, can't say as the last time I had the Toolkit installed was on Windows NT with VB5.

    Also just for giggles I renamed the program from *.vb to *.exe and tried to execute it.
    The result was. This program can not run on your PC. Makes sense because evb programs are designed to run on Wndows CE and not a PC.
    If you read the full documentation, you'll see that is of course. The controls are obviously different, so it mentions that you have to change progids to make the full conversion. However, there are several conversions mentioned, so pay attention to how it applies. The format is the most interesting, since it is not CPU dependent. VB6 will interpret and recompile this file in a format closer to an exe. It runs here. Converting the other way is possible too. We have some learning to do...

  16. #16
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Making an executable file with the .vb extension?

    If memory serves there was a RISC version of VB about the time of VB6. Pretty sure I have the disc for it around here somewhere. I never bothered to install it so have no idea what it supported.

    Not sure how this so called cpu independent thing is of any real use. The programs depend on the OS and the OS is restrictive as to which processors they will use.

  17. #17

    Thread Starter
    Fanatic Member TTn's Avatar
    Join Date
    Jul 2004
    Posts
    685

    Re: Making an executable file with the .vb extension?

    Quote Originally Posted by DataMiser View Post
    If memory serves there was a RISC version of VB about the time of VB6. Pretty sure I have the disc for it around here somewhere. I never bothered to install it so have no idea what it supported.

    Not sure how this so called cpu independent thing is of any real use. The programs depend on the OS and the OS is restrictive as to which processors they will use.
    The RISC ALPHA 64 bit edition needs specific hardware. I have a copy from the office developer tools 2000 cd, but no device to run it on. Although it was suggested that an emulator should work. Could not find a good emulator though. I do know that the template project files are basically the same. The suite files are different, but I don't know how much of the VB6 IDE is shared between 32/64 bit versions.
    If it is possible to make a 64 bit upgrade, then study of this may be helpful. Not guaranteed, but nice to know either way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width