Results 1 to 11 of 11

Thread: VB without runtime

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242
    Hello!

    Somewhere I heard that if I create program in VB just with API, I don't need runtimes.
    I tried that (created messagebox through API) and it didn't work (I renamed MSVBVM60.DLL) - it requested that DLL.
    Is there any other way (besides C) for creating program without runtimes, 'cause I need it as CD Launcher? If it isn't can you suggest me some light tutorials for beginners in VC?

    Zvonko
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    [email protected]
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

  2. #2
    Junior Member
    Join Date
    Aug 2000
    Posts
    27
    it works if you only have a module in your project

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242
    Yes, I have just one module, but It still demands VB's DLL.
    Here's the code:
    Code:
    Private Declare Function MessageBoxIndirect Lib "user32" Alias "MessageBoxIndirectA" (lpMsgBoxParams As MSGBOXPARAMS) As Long
    Private Declare Sub PostQuitMessage Lib "user32" (ByVal nExitCode As Long)
    
    Const CDL_TITLE = "CD Setup Loader"
    
    Const SHGFI_ICONLOCATION = &H1000
    Const MB_ICONASTERISK = &H40&
    Const MB_ICONEXCLAMATION = &H30&
    Const MAX_PATH = 260
    
    Private Type MSGBOXPARAMS
        cbSize As Long
        hwndOwner As Long
        hInstance As Long
        lpszText As String
        lpszCaption As String
        dwStyle As Long
        lpszIcon As String
        dwContextHelpId As Long
        lpfnMsgBoxCallback As Long
        dwLanguageId As Long
    End Type
    
    
    Sub Main()
        Dim MBP As MSGBOXPARAMS
        
        MBP.cbSize = Len(MBP)
        MBP.dwStyle = MB_ICONASTERISK
        MBP.hInstance = App.hInstance
        MBP.lpszText = "KR nekej za probo, èe dela..."
        MBP.lpszCaption = CDL_TITLE
        MessageBoxIndirect MBP
        
        PostQuitMessage 0
    End Sub
    Can you help me?
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    [email protected]
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

  4. #4
    Junior Member
    Join Date
    Aug 2000
    Posts
    27
    have you removed Form1 from your project ?

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242
    Yes, I've removed Form1 from project.
    But maybe there are References that are causing problems.
    I'll try to remove all of them and let you know what happened.
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    [email protected]
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

  6. #6
    Hyperactive Member
    Join Date
    Aug 1999
    Location
    Ont, Canada, Earth
    Posts
    458
    Hi,
    I was wondering about that myself. Tried your code, it doesn't work for me either.
    Anyone know why?
    Thanks

    Tomexx.

  7. #7
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You cannot use a VB program without the runtimes. You can package them up using tools like Fusion, but it has to be there. Not griping here, but try reading other threads before you post - this question has been answered about 10 times already .
    For C, try http://www.programmingtutorials.com
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  8. #8
    Hyperactive Member
    Join Date
    May 2000
    Location
    Or
    Posts
    316
    If you are just looking for something that will run when your installation or program CD is installed, you should just make an autorun.inf file. A simple one would look like this:

    [autorun]
    open=Filename.exe
    icon=Filename.exe,1


    You can find out more from Microsoft at http://msdn.microsoft.com/library/ps...tm#autorun.inf

    Hope this helps.

  9. #9
    Hyperactive Member scuzymoto's Avatar
    Join Date
    Aug 1999
    Location
    Washington State
    Posts
    316
    Instead of trying to learn VC (unless you want to continue to do more and more programming in VC, then it might be worth it). I would suggest going the Delphi route. Its much easier then VC and very similar to VB in a lot of ways. But it is much more powerfull because it is not an interpreted language. Delphi is actually OO Pascal. The Delphi visual development environment is written in OO Pascal therefore no dependencies on anything microsoft unless you need it. (you might say Delphi was written in Delphi) Personally I do all my personal programming in Delphi. I only use VB here at work cause I HAVE too.

    PS.. if youre already familiar about Delphi sorry for wasting your time.
    SCUZ

  10. #10
    Guest
    Static linking can be done in VB. THere is a program which I think is called Crunch that will do it. Alternastively, it is possible to intercept the Link.exe section of the compilation and force static linking when compiling. But, to be honset, i've yet to try it out, so I don't know how well it works. Theoretically, it is possible though

    - gaffa

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242
    And does anyone know where can I get this program (Crunch)?
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    [email protected]
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

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