Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. VB 6.0 from VC++ 6.0, .dlls, pointers, etc

VB 6.0 from VC++ 6.0, .dlls, pointers, etc

Scheduled Pinned Locked Moved Visual Basic
c++helpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tym
    wrote on last edited by
    #1

    Did this easily in VC++, now I'm trying to learn VBasic 6.0... ClassA ClassB - includes pointer to an ordered list of ClassA's ClassC - inherits from ClassB, includes pointer to one ordered list of both ClassA's and ClassB's All classes created and destroyed dynamically, multiple instances On form: Custom ListBoxA - with pointer to list of ClassA's whose member variable "name" determines items in ListBox Custom ListboxB - same as above, but ClassB's Custom ListBoxC - same, but both ClassA and ClassB as items the problem: Drag items from ListBoxes A and B and drop onto ListBox C. Want to create custom dragndrop mousepointers which consist of the text from the listbox being dragged (can I create an icon/cursor on a device context and assign that to the pointer??) VBasic doesn't seem "pointer-friendly." Can I dynamically create a List of ClassA objects, then point to it from one or more of the listboxes?? I'm still new to VB's data types. Is this the kind of thing I would use a Collection class for? One more thing, sorry for being so needy. I want to be able to re-order items within the ListBoxes, by drag n drop, so I need to know exactly where in the listbox the mouse is pointing... ideally which item number as well as which pixel within the item's rectangle. Can I do this in VB 6.0 or is there a better method to this?? Thank you to anyone who has read this far and who responds. Tym! :wtf:

    N 1 Reply Last reply
    0
    • T Tym

      Did this easily in VC++, now I'm trying to learn VBasic 6.0... ClassA ClassB - includes pointer to an ordered list of ClassA's ClassC - inherits from ClassB, includes pointer to one ordered list of both ClassA's and ClassB's All classes created and destroyed dynamically, multiple instances On form: Custom ListBoxA - with pointer to list of ClassA's whose member variable "name" determines items in ListBox Custom ListboxB - same as above, but ClassB's Custom ListBoxC - same, but both ClassA and ClassB as items the problem: Drag items from ListBoxes A and B and drop onto ListBox C. Want to create custom dragndrop mousepointers which consist of the text from the listbox being dragged (can I create an icon/cursor on a device context and assign that to the pointer??) VBasic doesn't seem "pointer-friendly." Can I dynamically create a List of ClassA objects, then point to it from one or more of the listboxes?? I'm still new to VB's data types. Is this the kind of thing I would use a Collection class for? One more thing, sorry for being so needy. I want to be able to re-order items within the ListBoxes, by drag n drop, so I need to know exactly where in the listbox the mouse is pointing... ideally which item number as well as which pixel within the item's rectangle. Can I do this in VB 6.0 or is there a better method to this?? Thank you to anyone who has read this far and who responds. Tym! :wtf:

      N Offline
      N Offline
      Nick Seng
      wrote on last edited by
      #2

      bad news man, VB6 doesn't support pointers as far as I know. I have read an article somewhere in CP that uses API to get pointers in VB6 but I can't seem to find it again. :( On the list reordering, when an item is clicked in the listbox, you can refer to it by:

      List1.ListIndex 'this gets the zero based index of the list item OR
      List1.List(List1.ListIndex) ' this gets the string value of the selected list

      Notorious SMC


      The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
      Get your facts first, and then you can distort them as much as you please Mark Twain

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups