Search:

Type: Posts; User: Elroy

Page 1 of 13 1 2 3 4

Search: Search took 0.20 seconds; generated 34 minute(s) ago.

  1. Re: Standard DLL Creation (and Usage) with VB6 (à la, The Trick)

    Not exactly sure what you did. But, in VB6, you have to uninstantiate the code/COM portion of a form to get the Form_Terminate event to raise.

    With a typical Form1 (just using the auto-declared...
  2. Re: Standard DLL Creation (and Usage) with VB6 (à la, The Trick)

    Can you please take this to another thread, as it's not applicable to my OP.
  3. Re: Standard DLL Creation (and Usage) with VB6 (à la, The Trick)

    Yeah, I was thinking I might test that. Good to know. I think I'll leave the instructions as they are though. :)
  4. Re: [RESOLVED] DoEvents does not resume from its last position - why?

    Is sckServer_DataArrival an event? If so, you're possibly recursing that event with the DoEvents in there. Event-driven programs don't need DoEvents, as the OS (i.e., Windows) will raise the event...
  5. Replies
    8
    Views
    358

    Re: Lightweight Windowed Control

    I didn't download-and-examine, but this might be the one I once played around with. It might serve for some ideas on which to expand.
  6. Replies
    8
    Views
    358

    Re: Lightweight Windowed Control

    Two things come to mind.

    1) It sure sounds like custom User Controls (UCs) will be your friend to get this all done. Also, just FYI, UCs have options on whether they're windowless and/or whether...
  7. Re: Standard DLL Creation (and Usage) with VB6 (à la, The Trick)

    Yeah, I thought about writing an AddIn. Basically, it'd do the following, if I did it:


    Add an entry to the IDE's "File" menu that said "Compile to Standard DLL".
    When clicked, check that the...
  8. Replies
    8
    Views
    358

    Re: Lightweight Windowed Control

    To my way of thinking, there are two issues, with a third consideration.


    Does it have a hWnd?
    Does it have a DC?
    Is it a single control or multiple controls? If multiple, the above two...
  9. Re: Use GDIPlus to display image from a resource file?

    You need to be aware that GDI and GdiPlus are two VERY different things.
  10. Replies
    4
    Views
    303

    Re: WIN 10 COntrol Panel

    You could shell to specific areas, using command line arguments. For instance, the following goes straight to the power options:



    Option Explicit

    Private Sub Form_Load()
    Shell...
  11. Re: Weird behaviour in a listbox with checkbox turned on

    Personally, anytime I start thinking about checkboxes in listboxes, my thoughts turn to the ListView control, as seen here.
  12. Re: Use GDIPlus to display image from a resource file?

    Yeah, I've never used the GdipCreateBitmapFromResource. But, for me, this is two separate issues.


    Loading an image from resources and getting it into a StdPicture object.
    Knowing enough...
  13. Replies
    22
    Views
    600

    Re: create new property for text box

    Ok, here's new UC that uses the txt_Change event for validating. That should catch everything. :p



    Option Explicit '
    '
    Event Change()
    '
    Private mdMin As Double
    Private mdMax As Double
  14. Replies
    22
    Views
    600

    Re: create new property for text box

    Yeah, you're correct. It would probably take work in the txt_Change event (and possibly txt_KeyDown). The easiest way might be to just always save the last txt.Text value in a module String, check...
  15. Standard DLL Creation (and Usage) with VB6 (à la, The Trick)

    Let me say from the outset that it's The Trick who sorted the magic of doing this, and who seems to know all the compiled VB6 headers better than the back of his hand. He's done some work that...
  16. Replies
    22
    Views
    600

    Re: create new property for text box

    hahaha, nahhh, it should be fairly straightforward for starman to further tweak that txt_KeyPress event if he wants it to work differently.

    I'm going to make a CodeBank post now, using The Trick's...
  17. Replies
    22
    Views
    600

    Re: create new property for text box

    I'll bow out after this, but, to my eyes, that's exactly what a custom UC could provide with a fairly minimal amount of work. And, we wouldn't need to play any tricks with converting Longs to...
  18. TO: The Trick ... Standard DLL Creation with VB6

    Dear Trick,

    I've been studying your standard DLL creation code seen here, and find it very fascinating.

    I've refactored it to simplify it to a strictly VB6 situation.

    With your permission,...
  19. Replies
    22
    Views
    600

    Re: create new property for text box

    IDK, I've created so many custom UCs that it comes pretty easy to me these days. It seems that, for someone who wants to be a serious VB6 programmer, it's worth learning how to do this.

    And...
  20. Replies
    27
    Views
    937

    Re: MakeDLL problem

    I'm not sure I'm the one who's up for messing with the AddIn, and creating standard DLLs with VB6, but a small sample of your DLL source code, and a small test program that calls it would help to...
  21. Replies
    22
    Views
    600

    Re: create new property for text box

    It would have been nice if some of these things were a Variant, but such is not the case.
  22. Replies
    22
    Views
    600

    Re: create new property for text box

    If you're sticking two values into the Tag property, I don't understand why you wouldn't just stick them both in there, as it's a string regardless of how you handle it.


    Option Explicit
    ...
  23. Replies
    27
    Views
    937

    Re: MakeDLL problem

    That's because, by default, VB6 converts all "Declare ..." API call Strings to ANSI when the call is made, and converts them back to Unicode upon return (if they're ByRef).

    To prevent that, you...
  24. Replies
    22
    Views
    600

    Re: create new property for text box

    It sounds to me like it all needs to be stuffed into a custom User Control module. That's precisely what they're for, creating a control that appears in our ToolBox that's based on other controls...
  25. Re: Having issues trying to set up a class

    Not to my knowledge. Except for maybe a "coolness" factor. :)
  26. Re: Having issues trying to set up a class

    Well, yeah, it's checking the value of the object pointer "under the hood" without actually passing the object as an argument to get it done. But, my point was that it's just checking whether 32-bit...
  27. Re: Having issues trying to set up a class

    Hmmm, I guess I still don't understand, "With" may create a couple more lines of code (With... & End With), but it actually reduces overhead, and almost certainly results in less and faster machine...
  28. Re: Getting VB6 help from ChatGPT (something for those of us with lots of easy questi

    I must admit, the one thing I do like about AI is that I can ask "dumb" questions, and not worry how it makes my ego feel. :lol:
  29. Re: Having issues trying to set up a class

    To do that, you'll need to rename your actual class to "SQL" rather than "cSQL", and then set the PredeclaredId to True.

    When you use that PredeclaredId, the object name and the class name become...
  30. Re: Having issues trying to set up a class

    (assuming we have the cSQL PredeclaredId set to True)



    Debug.Print cSQL.Method1
    Debug.Print cSQL.Method2
    Debug.Print cSQL.Method3

    versus
  31. Re: Having issues trying to set up a class

    Just checking if ObjPtr(TheObject) = 0, so not very much overhead. But yeah, using "With" blocks is always a good idea.
  32. Re: Having issues trying to set up a class

    Yes, a class that I know I only want a single instantiation of, and want it to be globally available (almost like an extension to the language), the "PredeclaredId = True" trick is very useful.
    ...
  33. Re: Getting VB6 help from ChatGPT (something for those of us with lots of easy questi

    Yes, I agree that Collections and Dictionaries each have their strengths and weaknesses.

    However, to get back to the general point of your OP, I must admit that my position regarding simplistic or...
  34. Re: RC6 error adding item to a cCollection with an empty string as a key (vb6 col can

    I'm very sure. Here's the structure for each item in a collection. You can see the pParentItem, pRightBranch, & pLeftBranch that's typical of any binary tree. You can also see the addition of...
  35. Re: Strange behavior of a "TIMER" control

    Personally, I'm not sure I've ever used the Enabled property of the timer control. I just only/always use the Interval property.
  36. Re: RC6 error adding item to a cCollection with an empty string as a key (vb6 col can

    I've never used RC#, but I do believe the VB6 Collection object is somewhat unique in allowing empty keys. Most Collection/Dictionary objects (i.e., key-value databases) like this store the keys in...
  37. Re: Getting VB6 help from ChatGPT (something for those of us with lots of easy questi

    And more counter to your example is that my first thought would be to go to the built-in Collection object, and avoid creating an external reference.

    I too am an advocate for turning to AI for...
  38. Replies
    3,743
    Views
    1,870,798

    Re: CommonControls (Replacement of the MS common controls)

    When I'm in this situation, and I've been there, I typically turn to the Scintilla OCX control. That thing will do just about anything you want to throw at it (within the limits of what a 32-bit...
  39. Replies
    5
    Views
    419

    Re: Loading my array with Hex values

    If you know for sure they're two hex characters, I'd tend to use CByte. It'll be faster, and won't go through the strange ANSI string conversion that Val() does.


    Debug.Print CByte("&h" &...
  40. Re: Installing the VB6 IDE on Windows 10 or 11 (64-bit)

    Hi Sam, I fixed line #4. Regarding the rest, there's part of me that believes that, if they don't know how to do this stuff, maybe they shouldn't be using the VB6 IDE. However, this is an open...
Results 1 to 40 of 496
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width