Search:

Type: Posts; User: Elroy

Page 1 of 13 1 2 3 4

Search: Search took 0.06 seconds.

  1. 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...
  2. Replies
    7
    Views
    214

    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.
  3. Replies
    13
    Views
    271

    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...
  4. 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,...
  5. 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.
    ...
  6. Replies
    3
    Views
    204

    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...
  7. Replies
    3
    Views
    192

    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...
  8. Replies
    15
    Views
    391

    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.
  9. Replies
    15
    Views
    391

    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...
  10. Replies
    15
    Views
    391

    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...
  11. 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...
  12. Thread: [RESOLVED] Color

    by Elroy
    Replies
    14
    Views
    455

    Re: [RESOLVED] Color

    Yeah, but Dil, his question was specifically about the return of GetPixel. They are pretty simple in that context. :)
  13. 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...
  14. Thread: [RESOLVED] Color

    by Elroy
    Replies
    14
    Views
    455

    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...
  15. 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)....
  16. Thread: [RESOLVED] Color

    by Elroy
    Replies
    14
    Views
    455

    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. ;)
  17. Thread: [RESOLVED] Color

    by Elroy
    Replies
    14
    Views
    455

    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...
  18. Replies
    31
    Views
    604

    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...
  19. Replies
    31
    Views
    604

    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,...
  20. 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...
  21. 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...
  22. Replies
    31
    Views
    604

    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...
  23. Replies
    31
    Views
    604

    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.
  24. 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
  25. 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...
  26. Replies
    31
    Views
    604

    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...
  27. 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...
  28. 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...
  29. 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...
  30. 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...
  31. 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...
  32. 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...
  33. 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...
  34. 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...
  35. Replies
    12
    Views
    729

    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...
  36. 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)
  37. Replies
    3
    Views
    295

    Re: How do I make an array of arrays?

    That's the distinction between an array of Variants versus a Variant holding an array. And that gets confusing because you do the array indexing the same way for both of them, but they're not the...
  38. Re: Pass empty-array to function parameters

    Yep, and notice that Wqweto isn't even using an array in his pvResize2 call ... as it's a Variant. It will error though if you don't give it an array to Redim.

    Also, I've never had a reason to...
  39. Re: Pass empty-array to function parameters

    Yes, a Variant will also accept the Empty and/or Null constants. :)

    You do have to check for them though ... IsEmpty, IsNull.

    There's also IsArray which may come in handy for you.
    You do...
  40. Replies
    13
    Views
    592

    Re: how do i wait till a for statement to finish

    Yes Dil, I've written applications in other languages where you have a loop that "monitors" messages (for messages we wish to raise as events). I actually didn't know whether that loop was put into...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width