bugs >> Windows 7 and VB6

by Bruno Patrio » Thu, 14 Jan 2010 07:40:28 GMT

Hi there,

I have some vb6 programs, bigger than 5MB, that i can't build using IDE,
only running vb /make.
Does anyone have this problem too?



bugs >> Windows 7 and VB6

by Ralph » Thu, 14 Jan 2010 09:23:41 GMT





It is possible to create a project that is too large to compile in the IDE.
It is also possible to eventually create a project too large to compile on
the command line.

You will have to make the project smaller. What strategy you might employ to
accomplish this depends on the project.

Is it erroring on a specific file/form?
What is the exact error/problem? "Can't build" isn't very informative.

-ralph





bugs >> Windows 7 and VB6

by Dee Earley » Thu, 14 Jan 2010 22:05:45 GMT




I had similar on 2K/XP many years ago.

Trying again, or right click compile normally sorted it.
If not, deleting the existing EXE and trying again helped.

--
Dee Earley ( XXXX@XXXXX.COM )
i-Catcher Development Team

iCode Systems


Windows 7 and VB6

by MikeD » Thu, 14 Jan 2010 22:32:40 GMT







I doubt it has anything to do with Win7 or the final file size of the EXE
you're creating (if that's what you're were referring to as not quite sure
exactly what you meant by "bigger than 5MB"). Most likely, you've hit a
limitation in VB6 itself, perhaps the one on the amount of code that can be
in any single source code module file (seems like the most likely one to
me).

Go here: http://msdn.microsoft.com/en-us/library/aa716295 (VS.60).aspx

Browse through the various limitations described to see if you are hitting
any of them, or even getting close to any of them. Of particular interest
would probably be the project limitations and code limitations.

--
Mike




Windows 7 and VB6

by argusy » Fri, 15 Jan 2010 15:18:15 GMT




I once had a program that compiled to about 6MB, (admittedly with the IDE, so
this is not the same as your problem), but once I removed embedded pictures (or
reduced piccies to thumbnails, or referenced them instead), the size reduced
dramatically, and the IDE compile was a lot, lot faster

It's just a thought - I might be completely off-track suggesting this, but you
never know!!

argusy


Similar Threads

1. Creating Menu Bitmaps with alpha channel for Windows Vista in VB6

I am trying to create a simple icon at runtime with an alpha channel that I 
can apply to the menu.  I have been somewhat successful at this using 
CreateIcon and DrawIconEx as well as one or two other ways, but my problems 
is that if the user's machine is not set to 32 bit colors in display 
settings, then it doesn't work.  The following is the code that I used to do 
this.  Please help me fix this problem.
As you can see I have tried setting the menu image several ways all with the 
same result.  As long it is 32 bit in display settings, everything works, 
otherwise it fails to draw anything.

Private Sub cmdTestBmp_Click()
    SetMenuImage Array(0, 1), CreateOverrideBitmap
End Sub

Private Sub SetMenuImage(ByVal MenuTree As Variant, ByVal Bmp As Long) 
'MenuTree is an array that holds a zero based menu index path to the desired 
menu
    Dim MainMenuHandle As Long
    Dim MenuHandle As Long
    Dim i As Integer
    Dim mii As MENUITEMINFO
    Dim mi As MENUINFO

    ' Get the menu handle.
    MainMenuHandle = GetMenu(Me.hwnd)
    MenuHandle = MainMenuHandle

    For i = LBound(MenuTree) To UBound(MenuTree) - 1
        MenuHandle = GetSubMenu(MenuHandle, MenuTree(i))
    Next i

    With mi
        .cbSize = Len(mi)
        .fMask = MIM_STYLE
        .dwStyle = MNS_NOCHECK
    End With

    SetMenuInfo GetSubMenu(MenuHandle, MenuTree(UBound(MenuTree))), mi

    With mii
        .cbSize = Len(mii)
        '.fMask = MIIM_CHECKMARKS
        '.fMask = MIIM_CHECKMARKS Or MIIM_BITMAP
        .fMask = MIIM_BITMAP
        .hbmpItem = Bmp
        '.hbmpChecked = Bmp
        '.hbmpUnchecked = Bmp
    End With

    ' Assign the picture.
    SetMenuItemInfo MainMenuHandle, GetMenuItemID(MenuHandle, 
MenuTree(UBound(MenuTree))), 0, mii
    'SetMenuItemBitmaps MainMenuHandle, GetMenuItemID(MenuHandle, 
MenuTree(UBound(MenuTree))), 0, Bmp, Bmp
End Sub

Public Function CreateOverrideBitmap() As Long
    Dim pixels(15, 15) As Long
    Dim maskArray(255) As Long
    Dim hIcon As Long
    Dim nWidth As Long
    Dim nHeight As Long
    Dim hBmp As Long
    Dim hOrigBmp As Long
    Dim m_hDC As Long
    Dim m_hDIb As Long
    Dim m_hBmpOld As Long
    Dim m_lPtr As Long
    Dim m_tBI As BITMAPINFO
    Dim bCreated As Boolean

    m_hDC = CreateCompatibleDC(0)

    If (m_hDC <> 0) Then
        With m_tBI.bmiHeader
            .biSize = Len(m_tBI.bmiHeader)
            .biWidth = nWidth
            .biHeight = nHeight
            .biPlanes = 1
            .biBitCount = 32
            .biCompression = BI_RGB
            .biSizeImage = .biWidth * 4 * .biHeight
        End With

        m_hDIb = CreateDIBSection(m_hDC, m_tBI, DIB_RGB_COLORS, m_lPtr, 0, 0)

        If m_hDIb <> 0 Then
            m_hBmpOld = SelectObject(m_hDC, m_hDIb)
            bCreated = True
        Else
            DeleteObject m_hDC
            m_hDC = 0
        End If
    End If

    hBmp = CreateCompatibleBitmap(m_hDC, nWidth, nHeight)
    'hBmp = CreateCompatibleBitmap(m_hDC, 16, 16)

    hOrigBmp = SelectObject(m_hDC, hBmp)

    hIcon = CreateIcon(0, nWidth, nHeight, 1, 32, VarPtr(maskArray(0)), 
VarPtr(pixels(0, 0)))

    DrawIconEx m_hDC, 0, 0, hIcon, nWidth, nHeight, 0, 0, DI_NORMAL 'DI_MASK

    DestroyIcon hIcon
    hBmp = SelectObject(m_hDC, hOrigBmp)

    If (m_hDC <> 0) Then
        If (m_hDIb <> 0) Then
            SelectObject m_hDC, m_hBmpOld
            DeleteObject m_hDIb
        End If

        DeleteObject m_hDC
    End If

    DeleteDC m_hDC

    m_hDC = 0
    m_hDIb = 0
    m_hBmpOld = 0
    m_lPtr = 0

    CreateOverrideBitmap = hBmp
End Function

2. use a .NET Windows Control in VB6.0 ??? - .NET Windows Forms

3. Windows Forms under VB6

Hi,

I've written a Client under VB6 that can load dlls an 
show forms from it. ok. It's simple, I know. But now I 
have .NET C# Window Forms and it still work, but when I 
minimize a form and than maximize, I cant write in the 
text boxes, I wrote in before minimized. Without minimize 
I can. Crazy!!! An Ideas?

Hope so, Tom ;o)

4. use a .NET Windows Control in VB6.0 ??? - VB.Net

5. Starting and Stopping Windows Services using VB6

Does anyone know how to start and stop already-installed Windows
Services using Visual Basic 6? I don't need to do anything else with
the services other than start and stop them. I'm using Windows 2000
Professional.

Any help here would be greatly appreciated!

Many thanks

Andy

6. Java GUI(Swing) VS Windows forms in VB6/VB.NET - Java GUI Programming

7. Windows 2003 - debugging VB6-DLL

 need to debug a COM component written in VB 6.
The .DLL is called from asp.
All runs well under Windows 2000 (I remember, I had to ad 
a lot of rights to the user doing the debugging)
I just run the dll (F5) in VB, the browser opens the .asp-
page where the DLL is called and I see the request in the 
VB-Debugger. Very nice!

It does not run under Windows 2003.
Any Ideas? 

I tried to give the Application pool running the 
application admin rights. but it does not work.
I can not find any errormessage in the event log.

your help is very much appreciated.
Beat
.


8. viewing folders in Windows XP using VB6.0