Search:

Type: Posts; User: killo

Page 1 of 13 1 2 3 4

Search: Search took 0.42 seconds.

  1. Replies
    27
    Views
    69,422

    Re: [VB6] PortMapper - UPnP NAT Traversal Class

    No I'm not using vb6 in xp mode.
    But actually, now it has started to give me the same error on my xp machine. If I do the fix that I posted above, then it doesn't give me the error, but it says "No...
  2. Replies
    27
    Views
    69,422

    Re: [VB6] PortMapper - UPnP NAT Traversal Class

    I was playing around with the portmappercbs module and I think I've fixed it.
    I uncommented the implements statement and set XPcompile to true, even though this is windows 7.
    I'll let you know if...
  3. Replies
    27
    Views
    69,422

    Re: [VB6] PortMapper - UPnP NAT Traversal Class

    I've been using this for a while now in a program I made on XP, and it works very well. But I've now moved to windows 7 and when I run it, I get: error: -2147220223 Automation error
    When I click...
  4. Replies
    10
    Views
    3,453

    Re: AKS prmality test

    Thanks for your help so far, I've started implementing this, but even the first step runs slower than the naive method:

    Naive method (Trial division):

    If CheckingNum Mod 2 = 0 Then goto Done...
  5. Replies
    10
    Views
    3,453

    Re: AKS prmality test

    Oh yeah, of course it does, I forgot that x^0 is 1 and not 0.

    On wikipedia it says that the logarithm is to base 2 http://en.wikipedia.org/wiki/AKS_primality_test
    but that's the initial algorithm...
  6. Replies
    10
    Views
    3,453

    Re: AKS prmality test

    Thanks, I almost understand this fully now, but I have 2 questions:

    so if I had 23x^25 + 34x^12 + 12x^7
    and n = 31, r = 7
    Taking coefficients mod n: 23x^25 + 3x^12 + 12x^7
    Taking exponents...
  7. Replies
    10
    Views
    3,453

    Re: AKS prmality test

    Wow thanks for explaining that to me :) I'll carefully look at this over the next few days and tell you how I get on.
    Some preliminary questions:

    Where you said:

    and you had previously found...
  8. Replies
    214
    Views
    165,281

    Re: [VB6] - Multi-User Chat Example (Winsock)

    what if I'm using this program behind a router where I'm not allowed to change the router settings to do port forwarding, at university for example.
    There must be some way to do it without changing...
  9. Replies
    10
    Views
    3,453

    AKS prmality test

    I have been looking up the AKS primality test and would like to implement it in code. The algorithm is here:...
  10. Replies
    20
    Views
    1,446

    Re: Saving double values accurately

    Thanks guys, Fitness is now exactly the same before and after saving/loading! :)
  11. Replies
    20
    Views
    1,446

    Re: Saving double values accurately

    The file size being 10kb instead of 5 is not a problem for me, I was just asking out of curiosity, but I understand why that is now after your explanation :)
    It's looking good so far, but I can't...
  12. Replies
    20
    Views
    1,446

    Re: Saving double values accurately

    Oh thanks, it works now.
    I "converted" all of my brains by loading them all with the old code then saving them with the new code.
    So now I can use both the new save and load code throughout my...
  13. Replies
    20
    Views
    1,446

    Re: Saving double values accurately

    Thanks for your code, I didn't know you could save it so simply like that.
    I ran it in the IDE and it gave me an error saying "Out of memory" and highlighted the line in Loadfile that says:
    Get...
  14. Replies
    20
    Views
    1,446

    Re: Saving double values accurately

    I don't know what you mean by a UDT wrapper
    In post #4 I said that all of the values are doubles except those enclosed in Cdbl() (which then forces them to become double)
    My brains consist of...
  15. Replies
    2
    Views
    1,155

    Re: adding integers

    Does this help?

    label7.caption = val(label7.caption) + 1
  16. Replies
    20
    Views
    1,446

    Re: Saving double values accurately

    I can't find any faults in my saving and loading routines myself. But yes please you can have a 'shufti' at it.
    All of the values I am saving and loading are doubles, except where I have enclosed...
  17. Replies
    16
    Views
    1,377

    Re: Please Optimize my follwoing code...

    why is it not working as you expected? is it too slow or do some parts just not work?
  18. Replies
    20
    Views
    1,446

    Re: Saving double values accurately

    I implemented VBClassicRocks' method shown in post #4 but I am still having differences in the fitness after saving then reloading. It's not very much but it's significant. If the double values are...
  19. Replies
    20
    Views
    1,446

    Re: Saving double values accurately

    Thanks, I will try implementing this soon.
    What about values that are, for example 8.1 precisely ( or 8.1000000000000000)
    will this still be 8 bytes long?
  20. Replies
    20
    Views
    1,446

    Re: Saving double values accurately

    Thanks, I will try replacing the Val() with Cdbl() when loading.
    How would I implement decimal conversion values when saving? I'm not sure what you mean by this.
  21. Replies
    20
    Views
    1,446

    [RESOLVED] Saving double values accurately

    I am aware that double variables have some slight imprecision involved when you get down to small values so this may be the source of the problem but I'm not sure.
    I have a program running a neural...
  22. Replies
    2
    Views
    3,223

    Multithreading crash

    Here is my code:

    In a module:

    Public Declare Function SHCreateThread Lib "shlwapi.dll" (ByVal pfnThreadProc As Long, pData As Any, ByVal dwFlags As Long, ByVal pfnCallback As Long) As Long
    ...
  23. Replies
    7
    Views
    850

    Re: Picturebox displaying other windows

    akhileshbc: I have already tried using picture1.refresh and it doesn't help.
    And dee-u: your link seems to be broken.
    Thanks anyway though.
  24. Replies
    7
    Views
    850

    Picturebox displaying other windows

    I am using picture1.paintpicture() to place a picture in a picturebox, and then once the picture has been placed in it, i am using SetForegroundWindow(Me.hWnd) to bring the form to the front....
  25. Replies
    2
    Views
    579

    Re: Data not saving as it should

    when I open it with wordpad it's fine. Thanks
  26. Replies
    10
    Views
    11,510

    Re: Create Factorial using vb6.

    Oh right. Thanks for working that out. I didn't realise double was so much bigger than long.
  27. Replies
    10
    Views
    11,510

    Re: Create Factorial using vb6.

    it's 170 with long or double?
    there's no way you can get it bigger than the double limit, unless you use some kind of math function like the one in my sig. I remember making a factorial function...
  28. Replies
    10
    Views
    11,510

    Re: Create Factorial using vb6.

    Factorials get big quickly, you're probably getting an overflow error.

    change:

    dim i as integer
    to:

    dim i as double

    There will still be a limit to the biggest number you can put in but...
  29. Replies
    2
    Views
    579

    [RESOLVED] Data not saving as it should

    I've made a random data generator, that generates 1kb of random data, basically 1000 characters with a random ascii value from 1 to 256.
    The SHA-1 hash is then taken of the data and this is added to...
  30. Replies
    2
    Views
    590

    Re: saving a picturebox to file

    Sorry. found that I needed autoredraw set to true. all works now.
  31. Replies
    2
    Views
    590

    [RESOLVED] saving a picturebox to file

    I have a picturebox on my form, then I run the following code:

    Picture1.Cls
    Picture1.Print Jobs(I).Datastring
    For A = 0 To 5
    Picture1.Line (Rnd * 6010, Rnd * 380)-(Rnd * 6010, Rnd * 380),...
  32. Replies
    2
    Views
    1,311

    SHA-1 hashing and memory errors

    I'm using the SHA1 algorithm to hash some data. The hashing code is in a class module, here is the whole class module:

    Option Explicit

    ' Visual Basic SHA Implementation
    ' Peter Girard and...
  33. Replies
    7
    Views
    4,271

    Re: exchanging infomation between two VB6 programs

    ok, I'm using the text file method at the moment. It's for a server application that deals with requests.
    I was thinking about it because using the text file method, it's going to be writing and...
  34. Replies
    7
    Views
    4,271

    Re: exchanging infomation between two VB6 programs

    is there a simpler way? if not then I will investigate the findwindow and enumchildwindow functions because I am not very familiar with them.
  35. Replies
    7
    Views
    4,271

    exchanging infomation between two VB6 programs

    is there any way to exchange information between two vb programs other than having one of them save a file then the other one open it?
    possibly by an api or something?
    I can't build both the exe's...
  36. Re: Visual basic has encountered a problem and needs to close VB6

    Reinstalled VB6 and it didn't work, so I reinstalled VB6 SP6 and it worked :):)
    Thanks guys :thumb:
  37. Re: Visual basic has encountered a problem and needs to close VB6

    Just found it does this with other projects too, the ones I tried at first must be different somehow because I could open them, but now I've found a few that I can't open. Should I reinstall VB6?
  38. Re: Visual basic has encountered a problem and needs to close VB6

    what does remake the form mean? if it means delete my form and then make a new one and draw all the controls on and everything, then that will take ages, and I won't be able to remember where all my...
  39. Re: Visual basic has encountered a problem and needs to close VB6

    I went into add in manager, and done that, but I still have the problem. :( don't know what's going on here :(
  40. Re: Visual basic has encountered a problem and needs to close VB6

    Thanks for the help. Should I re-install visual basic? what else could I do?
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width