Search:

Type: Posts; User: veloz

Search: Search took 0.06 seconds.

  1. Re: Get % between 2 values and 2 percentages (proportional scaling for the math gifte

    You are right, the code you posted can be adapted for my second request. It's done now.
  2. Re: Get % between 2 values and 2 percentages (proportional scaling for the math gifte

    I thanked @reexre for his help, I didn't find anything wrong with his code, no wrong values were obtained in the tests I made, but if someone thinks it will reproduce bad results, please do give me...
  3. Re: Get % between 2 values and 2 percentages (proportional scaling for the math gifte

    I have another request...

    Say I want to spread a value, e.g. 50, linearly to a range between min and max.

    Pseudo-function: addspread(intMin As Double, intMax As Double, Spread As Double, MyVal...
  4. Re: Get % between 2 values and 2 percentages (proportional scaling for the math gifte

    It works, thank you!
  5. Get % between 2 values and 2 percentages (proportional scaling for the math gifted)

    I usually have long if...elseif code for doing this and of course it's crude and lacks accuracy.

    What I want is a function to pass 2 integral values which are mostly static in my use, say 100000...
  6. Re: GetPixel() replacement - read from a BITMAP buffer instead

    @Schmidt

    That was for a modern C++ project, months ago. I was able to put it together with examples from the internet. I have been so far unable to do the same for my old VB6 project which I'm...
  7. Re: GetPixel() replacement - read from a BITMAP buffer instead

    Thank you Niya. I reckon the links I provided are useful because I know more or less what is required, having done this with modern C++ in the past.

    Two things that are worth mentionting:
    ...
  8. GetPixel() replacement - read from a BITMAP buffer instead

    Currently I access the pixel color using the GetPixel() API, but it's awfully slow. To access 1000 pixels it takes ~31 secs!


    Dim lngDC As Long, lngScreen As Long, lngColor As Long

    lngDC =...
  9. Re: Replace VB6's Rnd function with cryptographically secure alternative

    Randomize uses the timer, meaning the range of the seed can be guessed. The standard Rnd function is just not recommended for implementations where security is important.

    See:


    ...
  10. Re: Replace VB6's Rnd function with cryptographically secure alternative

    I don't need to. The whole point is to avoid a pattern, i.e. to make it truly random.

    * * *

    Thanks, Eduardo.

    What is VBA.Rnd? My guess is that you need to call the VB6's Rnd() inside a...
  11. Re: Replace VB6's Rnd function with cryptographically secure alternative

    There's no need to set the seed in most cases (like, >99%) if all you want is true randomization.

    Can you incorporate GenRnd() into Rnd() to make it a single function?
  12. Re: Replace VB6's Rnd function with cryptographically secure alternative

    @flyguille

    It's not for communication, no.

    * * *

    Here's a function by Bonnie West that I believe can be edited to replace Rnd:
  13. Replace VB6's Rnd function with cryptographically secure alternative

    I'm using the Rnd function to generate passwords. However, it's susceptible to brute-force attacks, regardless of the strength of the password itself which becomes (sort of) trivial when the aim of...
  14. Replies
    0
    Views
    888

    Use the "RunPE" with parameter

    First of all, I learned about "RunPE" in this thread:

    http://www.vbforums.com/showthread.php?535124-Run-Executables-As-Byte-Arrays-Problem

    This is what it does:



    My question is whether...
  15. Re: Open to append/read/delete last 100 bytes of a file

    Thanks for the tip, jpbro.

    Here's what I found - http://www.devx.com/vb2themax/Tip/19309

    This


    Dim UsefulBytes() As Byte
    Open FileName For Binary Access Read As #4
    ReDim...
  16. Re: Open to append/read/delete last 100 bytes of a file

    So you're saying that I can't replace all the binary's bytes with new ones. That's a huge shortcoming, imo.

    If not natively, there must exist an API for this.
  17. Re: Open to append/read/delete last 100 bytes of a file

    Changing


    Open FileName For Binary Access Write As #4

    To


    Open FileName For Binary Access Read As #4
  18. Re: Open to append/read/delete last 100 bytes of a file

    I'm almost there.

    GENERATE 1000 BYTE STRING - WORKING



    Dim myStr As String: myStr = "THIS IS A STRING"
    myStr = Left$(myStr & String$(1000, "."), 1000)
    MsgBox...
  19. Re: Open to append/read/delete last 100 bytes of a file

    You're right regarding the size of the file after appending, that's precisely what I thought was the problem.

    I'm trying to solve it with this:


    Dim ToByte() as Byte
    ToByte = StrConv(myStr,...
  20. Re: Open to append/read/delete last 100 bytes of a file

    Thanks to Elroy, I'm using this method to create a 100-byte string:


    Dim myStr As String
    myStr = "THIS IS A STRING"
    myStr = Left$(myStr & String$(50, "."), 50)

    This is how I append the...
  21. [RESOLVED] Open to append/read/delete last 100 bytes of a file

    Dim myStr as String: myStr = "THIS IS A STRING"
    While LenB(myStr) < 100
    myStr = myStr & "."
    Wend

    I need to be able to append this 100-byte string in readable format to an executable file,...
  22. Thread: Updater

    by veloz
    Replies
    4
    Views
    879

    Re: Updater

    You can:

    1) use a simple downloader to download the updated executable to a folder, preferably on %appdata%
    2) kill the process of the program whose executable you will replace
    3) copy the newly...
  23. Re: Is S y s t e m 3 2 a word that's not allowed in these forums?

    Using the bold or italic tags within a prohibited word works fine for me.

    In other forums too.

    It's only visible if you are quoting the person and looking at the source.
  24. Replies
    44
    Views
    4,122

    Re: How is VB6 doing these days?

    VB6 is a mature programming language, with an unparalleled ease of use, and very much functional if your apps are not too demanding.
Results 1 to 24 of 25



Click Here to Expand Forum to Full Width