Results 1 to 4 of 4

Thread: Run Time Objects

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Columbus Ohio
    Posts
    217
    W/o using an array, is there a way to load objects onto a form at runtime? I mean completely new objects. I am trying to load all my objects through dlls so I can patch a program bug easily in the future. thanks in advance
    Chris

    [email protected]
    Windows XP RC2 B2526
    Visual Studio.Net Beta 2
    C++, VB, VB.Net, ASP, PHP

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    yeah, there should be several ways, createobject, controls.add and more... YOu just need vb6 to make it work.
    Go search for it, there's hundreds of threads about this
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Columbus Ohio
    Posts
    217
    more specificly, with vb5
    Chris

    [email protected]
    Windows XP RC2 B2526
    Visual Studio.Net Beta 2
    C++, VB, VB.Net, ASP, PHP

  4. #4
    Guest
    Use CreateWindowEx for VB5.
    Code:
    Private Declare Function CreateWindowEx Lib "user32" Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long
    Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
    Const WS_CHILD = &H40000000
    Private WithEvents btn As CommandButton
    
    Private Sub Form_Load()
        retval = CreateWindowEx(0&, "Button", "Button1", WS_CHILD, 32, 32, 64, 64, Me.hwnd, 0, App.hInstance, ByVal 0&)
        ShowWindow retval, 1
    End Sub

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