Results 1 to 4 of 4

Thread: VB6 - Console Project Template

  1. #1

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,950

    VB6 - Console Project Template

    heres my class and a standard\template project.... for be added on VB6 type projects..
    add these project on: C:\Program Files (x86)\Microsoft Visual Studio\VB98\Template\Projects (where the VS98 was installed)
    Console.zip
    do we need VBW and VBF files?
    heres a sample:
    Code:
    Option Explicit
    
    Dim Console As New CConsole
    
    Sub Main()
        'your code goes here:
    
        Console.Writes "Hello World!!!" 
        Console.Read 'pauses here until enter
        Set Console = Nothing 'clear object
    End Sub
    VB6 2D Sprite control

    To live is difficult, but we do it.

  2. #2
    Frenzied Member
    Join Date
    Jun 2015
    Posts
    1,294

    Re: VB6 - Console Project Template

    Console is always fun (and mandatory for some stuff)

    The Trick found an undocumented VBP section that allows you to add extra linker switches to have it start a console automatically:

    [VBCompiler]
    LinkSwitches=/SUBSYSTEM:CONSOLE

    You can also change the PE header field after the fact:

    link.exe /edit /subsystem:console [exePath]


    Also theres a bunch of the references still included. Couple nonstandard ones gave errors when opening the project

    Code:
    Object={F6125AB1-8AB1-11CE-A77F-08002B2F4E98}#2.0#0; msrdc20.ocx
    Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TabCtl32.Ocx
    Object={5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0; msflxgrd.ocx
    Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; comdlg32.ocx
    Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
    Object={86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCT2.OCX
    Object={48E59290-9880-11CF-9754-00AA00C00908}#1.0#0; MSINET.Ocx
    Object={3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0; richtx32.ocx
    Object={65E121D4-0C60-11D2-A9FC-0000F8754DA1}#2.0#0; mschrt20.ocx
    Object={248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0; MSWINSCK.ocx
    Object={20C62CAE-15DA-101B-B9A8-444553540000}#1.1#0; msmapi32.Ocx
    Object={C1A8AF28-1257-101B-8FB0-0020AF039CA3}#1.1#0; mci32.ocx
    Object={27395F88-0C0C-101B-A3C9-08002B2F49FB}#1.1#0; PicClp32.Ocx
    Object={6FBA474E-43AC-11CE-9A0E-00AA0062BB4C}#1.0#0; sysinfo.Ocx
    Object={648A5603-2C6E-101B-82B6-000000000014}#1.1#0; MSComm32.Ocx
    Object={C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0; msmask32.ocx
    Object={CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0; MSDatGrd.ocx
    Object={F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0; MSDatLst.Ocx
    Object={38911DA0-E448-11D0-84A3-00DD01104159}#1.1#0; ComCt332.ocx
    Object={67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0; MSAdoDc.ocx
    Object={0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0; MShflxgd.ocx

  3. #3

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,950

    Re: VB6 - Console Project Template

    even so, you will need a Console class or do it on hard way
    and more: my CConsole have HDC for use GDI(Plus)
    VB6 2D Sprite control

    To live is difficult, but we do it.

  4. #4

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,950

    Re: VB6 - Console Project Template

    when i add it on template\projects folder, the project is showed on projects types list!!!
    but can i do changes:
    1 - the modulemain.bas been opened and maximized?
    2 - can i add description on project type?
    VB6 2D Sprite control

    To live is difficult, but we do it.

Tags for this Thread

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