Search:

Type: Posts; User: Elroy

Page 1 of 13 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    8
    Views
    210

    Re: Stupid problem with text box...

    You just have that code in Form_Load. The only text it's going to show is text you put into the textbox while in IDE design mode through the properties window.
  2. Replies
    12
    Views
    352

    Re: Set focus

    Yeah, actually I was aware of that, but I've just never done it. And yeah, setting the "Visible" flag is just a redundant way of doing the "Show" or "Hide" methods.

    I suppose it's just six-of-one...
  3. Replies
    12
    Views
    352

    Re: Set focus

    Yes, I use the Activate event precisely this way all the time as well. A flag like that isn't "wonky". But, be sure to set the flag to True within the Activate event.

    And, the "why" of it is ......
  4. Replies
    2
    Views
    136

    Re: Decimal to binary error

    That code also has some major "bankers rounding" issues. Since it's a regular division (using /), it's converting to Double, doing the division, and then converting back to Integer (doing bankers...
  5. Re: Vb6: read richtextbox line by line; out of string space

    VB6s, just to say it, you're making thousands of copies of your arrLines() array, and that's almost certainly your problem. I forget how much stack space you're allocated by default in VB6, but...
  6. Replies
    14
    Views
    373

    Re: Select case with this

    To my eyes, it's wildly unclear what you want.

    However, here's a wild guess:


    Select Case True
    Case Instr(sMyString, "%@")
    ' "%@" is in string, so do work.
  7. Replies
    13
    Views
    300

    Re: All in one question post

    Jenniger9, I also agree with with others are saying.

    I also do believe that you can just "jump in" when you've got a project (that's clear and well specified). However, for me, to be a good...
  8. Re: Convert binary data to a valid Unicode string whitout wasting (much) space ❓

    Yeah, I knew you had done that. :) But I'd really like to do it as a binary-tree. And yeah, I know hashes are faster. I just really like the intuitiveness of binary-trees. If I get some time,...
  9. Re: Convert binary data to a valid Unicode string whitout wasting (much) space ❓

    This whole thread makes me want to write a self-rolled binary tree key/value class. I'd do it, but the "self-balancing" aspect is a bit daunting to me. The rest is pretty straight-forward stuff.
    ...
  10. Replies
    3
    Views
    224

    Re: Easier way to get Windows error var name?

    Nice idea. Maybe search the core Windows DLLs and see if you can figure out which one has the list, and then see if there's some API for cross-referencing numbers to names.

    However, having said...
  11. Replies
    3
    Views
    200

    Re: Mid$ not working to label.caption

    Yeah, to beat a dead horse, JimWyseTech, your Mid$(lblWd.Caption, LtrIndex *2,1) piece is just creating a temporary String (BSTR), doing your replacement into that temp String, and then abandoning...
  12. Replies
    15
    Views
    401

    Re: Monitor Scale Factor

    Not toggle. I never got that to work to my satisfaction. However, it can be used (if called before any forms are loaded) as an alternative to the manifest, and only if called once.
  13. Replies
    15
    Views
    401

    Re: Monitor Scale Factor

    For me, that's both true and false.

    In a sense, it's quite simple:
    If you're not DPI aware, and Windows is set to 100% scaling, then nothing happens. You get pixel-per-pixel scaling.
    If...
  14. Replies
    15
    Views
    401

    Re: Monitor Scale Factor

    I can't get to it this second, but I've got some code that does this. I'll post it later, if someone else doesn't beat me to it.

    And yeah, I also wouldn't mind knowing what you're trying to...
  15. Re: ActiveX dll's that reference each other

    Only on the actual call to get into whatever member you're calling. If we're not in a loop making calls into the DLL, that's negligible. The compiler optimizations will be the same either way...
  16. Thread: [RESOLVED] Color

    by Elroy
    Replies
    14
    Views
    470

    Re: [RESOLVED] Color

    Yeah, but Dil, his question was specifically about the return of GetPixel. They are pretty simple in that context. :)
  17. Re: ActiveX dll's that reference each other

    I thought he used that class (i.e., DLL) to get the performance advantages of optimization flags. You still get that with late binding. I use late binding with my smoothing algorithm, and it works...
  18. Thread: [RESOLVED] Color

    by Elroy
    Replies
    14
    Views
    470

    Re: [RESOLVED] Color

    Boo, I was trying to let him figure that out on his own. :p

    Also, we should probably use integer division, so it's not doing a lot of type casting in the expression. Also, that 256 should...
  19. Re: ActiveX dll's that reference each other

    Personally, I think Zvoni had the correct answer, late binding. However, this does require a bit of hoop-jumping, but I've been doing it for years in my main project (used daily in many locations)....
  20. Thread: [RESOLVED] Color

    by Elroy
    Replies
    14
    Views
    470

    Re: [RESOLVED] Color

    Yeah, just getting back. It looks like you made the change to the wrong API call. I'm assuming you figured that out. ;)
  21. Thread: [RESOLVED] Color

    by Elroy
    Replies
    14
    Views
    470

    Re: Color

    RPG? Rocket Propelled Grenade? Role Play Game? Not sure "COLOR" can be converted to those.

    It can be converted to RGB (Red, Green, Blue) though. The low-order byte (of the long) is Red, the...
  22. Replies
    31
    Views
    614

    Re: Assume no aliasing

    Also, just to say it, these optimizations are "per compile". What I mean is, if you have an ActiveX DLL, it might have different optimizations than your main program, even if that DLL is used by...
  23. Replies
    31
    Views
    614

    Re: Assume no aliasing

    Well, here's my opinion, in bullet points:


    The speed at which our CPUs interact with internal registers as well as memory has increased by orders of magnitude since VB6 came out. Therefore,...
  24. Re: [RESOLVED] How to use program to detect struct is contiguous memory or not ?

    Wait, you want a programmatic way to detect if a UDT has a BSTR string, object, and/or dynamic array in it ... without knowing anything about the UDT?

    NO, I don't think there's going to be a way...
  25. Re: Making Collections do Binary Key Comparisons (Eduardo's original question)

    Ohhh, Dil, you're no fun. :p

    Now, regarding OCXs, they're not going to load a second copy of VBA6.DLL (or MSVBVM60.DLL), are they? So, the patch should work across all collections in your...
  26. Replies
    31
    Views
    614

    Re: Assume no aliasing

    Ok, the memory pointer always exists ... it's just possibly cached in EAX differently when aliasing vs not. Same rules apply ... none of the above aliasing techniques should be used when using this...
  27. Replies
    31
    Views
    614

    Re: Assume no aliasing

    Ok, that makes sense to me. And, if the code is going to do that, we can't use any of the above aliasing techniques when doing this optimization, because a memory pointer might be non-existent.
  28. Re: Making Collections do Binary Key Comparisons (Eduardo's original question)

    Here's a bit more of a test, checking the fetching of keys, and it works just fine:



    Option Explicit

    Private Sub Form_Load()
    Dim c As New Collection
  29. Making Collections do Binary Key Comparisons (Eduardo's original question)

    Ok, I'd like to return to Eduardo's original question, as I personally like Collections.

    Pluses:

    No dependencies.
    Deal with both keyed and non-keyed items.
    Self-balancing.
    Trivial to...
  30. Replies
    31
    Views
    614

    Re: Assume no aliasing

    Just to be quite clear, you'd have to pass it ByRef (the default) to actually get aliasing. Another way to alias a variable is to pass a module-level (or global) variable as an argument.

    And I...
  31. Re: How to use program to detect struct is contiguous memory or not ?

    Yes, we did answer that question ... any variable length (BSTR) strings, any objects, or any dynamic arrays (as well as Variants with those as well as Variants containing UDTs) will only be pointers...
  32. Re: How to use program to detect struct is contiguous memory or not ?

    Good point. The rules are pretty much the same though, dynamic arrays, variable length strings, and objects ... with the addition of TypeLib declared UDTs in the Variants. And, just to say it, a...
  33. Re: How to use program to detect struct is contiguous memory or not ?

    @Niya: Ahh, yes, if that's all he wants to know, then yeah. The only thing that puts "pointers" into a UDT are "dynamic arrays", "variable length (BSTR) strings", and objects.

    I thought he was...
  34. Re: Large arrays (when arrays don't fit in memory)

    Ahhh, looks like really good work. :) I see that you broke it up into separate classes for the different variable types.

    And you also included a variable-length-string option.

    I'm neck-deep...
  35. Re: Is it possible to put an access database in a zip folder and connect to it throug

    Code for what? Creating a compressed folder? Right-click the folder, "General" tab, "Advanced" button, "Compress contents to save disk space".

    Are you wanting a programmatic way to do that? If...
  36. Re: How to use program to detect struct is contiguous memory or not ?

    You could serialize it (through a pipe or just write it to a file) and check the serialized size with the UDT's size.

    EDIT: That wouldn't necessarily work though if it had fixed length strings in...
  37. Re: How do I grant program permissions to connect to the database in System32 Windows

    Use your credentials when connecting or logging into your computer maybe? I usually think of the "granting" of permissions as beyond the domain of an end-user application, and managed only by OS...
  38. Re: Is it possible to put an access database in a zip folder and connect to it throug

    You could put it into a Windows compressed folder and access it, which is close to the same thing. However, you can't put it into an actual ZIP file and access it without first pulling it out of...
  39. Replies
    12
    Views
    739

    Re: Unable to Retrieve Command Line Arguments

    Just to complete the explanation, and because this thread is so strange ... MW, many objects (including controls) have a default property. In the case of command_buttons, the default property is the...
  40. Re: QUESTION - OpenFile Dialog in Property in PropertyBox

    Code inside a new custom User Control:


    Option Explicit

    Public Property Get SomePicture() As StdPicture
    '
    End Property

    Public Property Set SomePicture(pic As StdPicture)
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width