Public Type aa                           
        a(2047) As Integer
        a1        As Byte
        a2       As String     ' a2       As String * 16393   就不好用了...
    End Type
    Public Type bb                         
        b(2047) As Integer
        b1        As Byte
        b2       As String    ' a2       As String * 16393   就不好用了...
    End Type
    Public Type cc                    
        c1 As Byte
        c2 As Byte
        c3 As Byte
        c4 As Integer
        c5 As String
    End Type
    Public Type dd
        d1 As Integer
        d2 As cc
        d3 As aa
    End Type
    Public Type ee
        e1 As dd
        e2 As dd
    End Type
    Public ff As ee
怎么修改能好呢?  可以实现同样的字节占用...........

解决方案 »

  1.   

    Public Type aa                           
            a(2047) As Integer
            a1        As Byte
            a2       As String     ' a2       As String * 16393   就不好用了...
        End Type
        Public Type bb                         
            b(2047) As Integer
            b1        As Byte
            b2       As String    ' a2       As String * 16393   就不好用了...
        End Type
        Public Type cc                    
            c1 As Byte
            c2 As Byte
            c3 As Byte
            c4 As Integer
            c5 As String
        End Type
        Public Type dd
            d1 As Integer
            d2 As cc
            d3 As aa
        End Type
        Public Type ee
            e1 As dd
            e2 As dd
            e3 As dd       '开始提示  模块过大  超出64K   好象....
            e4 As dd
        End Type
        Public ff As ee
    有好的解决方式吗 ?..................
      

  2.   

    如果确实要用这么大的区域而且VB确实提示你模块太大,那么把A2、B2定义成LONG,运算时向系统申请两块区域GLOBALALLOC,把句柄赋给这两个变量好了。