Search Results - VBForums

Search:

Type: Posts; User: Milk

Page 1 of 13 1 2 3 4

Search: Search took 0.07 seconds.

  1. Replies
    3
    Views
    314

    Re: How to interpret this code line

    If its any help the line could also be written like this
    pcm[0] = (--pste[1].pcmFirst)[0];

    So the pcmFirst pointer in the second element of pste is decremented by one (i.e. made to point the...
  2. Replies
    5
    Views
    408

    Re: Error Int

    Hi 2kaud,
    I'm not sure I understand you. If you are suggesting that an int is 64 bit when building for x64 then I don't agree.
  3. VS 2010 Re: Better Multi-Threads For My Approach?

    have you come across Parallel.ForEach?
  4. Replies
    5
    Views
    408

    Re: Error Int

    Hi diablo21,
    Warnings are not the same as errors but in this case it does appear to reveal one.
    The default value you are passing to GetPrivateProfileInt, 20000000000, is too large to represent...
  5. Replies
    5
    Views
    248

    Re: Public Function in Class Module

    Sam fail. The '=' should not be used with the Return statement.

    Public Function AddTwoNumbers(ByVal intNumber1 As Integer, ByVal intNumber2 As Integer) As Long
    Return intNumber1 + intNumber2...
  6. Replies
    3
    Views
    255

    Re: Easier way of graphics programming?

    You might find the OGRE engine or the SDL library useful for what you want.
  7. Thread: 2D Array Question

    by Milk
    Replies
    4
    Views
    388

    Re: 2D Array Question

    isqG8 would be indexed c_argcstl[1][0].isqKnight;

    c_argcstl is an array of arrays of CSTL structures. The initializer goes in order [0][0], [0][1], [1][0], [1][1]

    CSTL const c_argcstl[coMAX][2]...
  8. Thread: 2D Array Question

    by Milk
    Replies
    4
    Views
    388

    Re: 2D Array Question

    The array is 2 x 2 however each array element has 4 integer members.

    CSTL const c_argcstl[coMAX][2] =
    {
    // cf RookTo Knight KingTo
    cfE1G1, isqF1, isqG1, isqG1,
    cfE1C1, isqD1, ...
  9. Replies
    28
    Views
    1,410

    Re: Welcome to the New Moderator

    "Klytus, I'm bored. What plaything can you offer me today?"

    "An obscure forum in the VB system, your funkiness. The inhabitants call it Games and Graphics Programming."
  10. Thread: Circle Collision

    by Milk
    Replies
    7
    Views
    737

    [C#] Re: Circle Collision

    I found this explanation together with this C++ code useful for a similar problem. The simplified version is probably more useful to you than the 'remote' version. It should be pretty easy to...
  11. Replies
    3
    Views
    1,308

    Re: Missing stdint.h file

    Sorry for delay replying.

    Cygwin.dll provides a POSIX like layer that sits on top of the Windows API. It makes it possible to compile applications written for Linux on Windows.

    Rather than...
  12. Replies
    3
    Views
    1,308

    Re: Missing stdint.h file

    Those are Unix headers.

    I think your best bet to compile the code with minimal changes would be to use Cygwin. The resulting file will dependent on the Cygwin dll.

    The alternative would be to...
  13. Re: Help with LEDs for power and hard disk access.

    Job done.

    105639

    Thanks for the input chaps.
  14. Re: Help with LEDs for power and hard disk access.

    Cheers.

    I've gone and bought the components now for the above bipolar circuit, it is a little over the top for a flashing light but I'm enjoying learning about it.

    I'm using a opto mosfet...
  15. Re: Help with LEDs for power and hard disk access.

    I've been thinking about using the bipolar LEDs again.

    I found an example circuit for driving bipolar LEDs which seems okay here.

    Combining the above with google, the gimp and my lack of...
  16. Re: Help with LEDs for power and hard disk access.

    Appreciated ;)

    In which case I think I will get the single LED version and use a separate indicator for the HDD.

    Can you confirm whether I should use an inline resistor or not. I am led (pun...
  17. [RESOLVED] Help with LEDs for power and hard disk access.

    I am building a custom case and I want to use one of these bulgin switches for the power switch. They come in single and dual LED flavours and I would like to use a dual version but I'm a bit unsure...
  18. Replies
    5
    Views
    1,407

    Re: Converting code - different output

    The VB.NET code is using the legacy VB functions which are loyal to VB classic. VB classic in its more recent incantations used unicode internally but these were covered with the wide character...
  19. Replies
    2
    Views
    1,627

    Re: Getting the elapsed number of days

    some bits don't look right...
    #define HOUR 3600 /* Seconds in one hour */
    #define DAY 86400 /* Seconds in one day */

    /* Get the current difference in seconds */
    seconds =...
  20. Replies
    11
    Views
    1,217

    Re: Structure Conversion between VB6 and C

    How about showing us the code you are using.

    If you wrap the code in
    code goes here tags it is easier for us to read.
  21. Replies
    11
    Views
    1,217

    Re: Structure Conversion between VB6 and C

    Confession; I've not used VB6 in some time.

    The call is asynchronous so it will return almost straight away but it won't be finished until some time later. The pointers in the structure must refer...
  22. Replies
    11
    Views
    1,217

    Re: Structure Conversion between VB6 and C

    I think you might want something more like this...


    Type timeval
    tv_sec As Long 'seconds(long)
    tv_usec As Long 'any micro seconds(long)
    End Type

    Type strImageAcq
    theHandle As Long
  23. Replies
    5
    Views
    401

    Re: [RESOLVED] How to include "*.h" files

    C++/CLI might be worth a look for you. CLI IntelliSense is broken in VS2010, making it a bit of a pain. I think it works in 2008 and it definitely works in 2012. It would mean you could still...
  24. Replies
    13
    Views
    725

    Re: Heap vs Stack confusion

    I see my reply did not help. :(

    As far as I mean, you instantiate something when you create it. I should have perhaps wrote declared instead.

    I think of reference types as a special value type...
  25. Replies
    13
    Views
    725

    Re: Heap vs Stack confusion

    As far as I understand...

    Value types only exist on the stack when they are instantiated within the body of a method. Properties are methods with a bit of extra syntactic sugar, so they count too....
  26. Re: Looking for possible optimization of code to count bits (1's).

    I don't have vb6 any more, but I think this will work.

    Public Function CountBits(ByVal pValue As Long) As Long
    Dim Ct As Long
    Do While pValue <> 0
    Ct = Ct + 1
    pValue =...
  27. Re: Marshal.GetDelegateForFunctionPointer() Problem w/ Function returning Struct

    I've had a play with this with some success.

    Seeing as we already have some ADA posted in this thread, I'm going to post the C# I used. I did translate it using this translator but it looked...
  28. Re: First time using pointers - is this the right way to do this?

    right :)
  29. Re: First time using pointers - is this the right way to do this?

    That looks fine to me.

    Another way to write this...
    cwlayout[loopCW] = 0; // Clear the layout
    cwX.cwPointerLayout = & cwlayout[loopCW]; // Get a pointer to that spot
    is this...
    ...
  30. Re: passing reference to pointf from vb to c++ both in vb.net

    A long in C++ is usually 4 bytes not 8 bytes like in .net. That is why the ByVal version fails. try...

    void __stdcall junk_(long long, long long&)

    The PASCAL macro is defined as __stdcall on...
  31. Thread: Math algorithm

    by Milk
    Replies
    1
    Views
    716

    Re: Math algorithm

    You need to research the difference between the assignment operator '=' and the equivalence operator '=='.

    Also understand that operations return the result so a=b=c=3 assigns 3 to all values and...
  32. Replies
    6
    Views
    331

    Re: Optimal Computation Environment

    If you are not already familiar with openCV you might find it worth a look. It is highly optimised and has support for both openCL and CUDA. It also has limited GUI support using QT.
  33. Replies
    5
    Views
    344

    VS 2008 Re: Bitmaps or images from arrays

    Here is a translation (might want a tweak) of some C# code that I use to generate a Bitmap from an array of bytes.
    Imports System.Drawing
    Imports System.Drawing.Imaging
    Imports...
  34. Replies
    7
    Views
    893

    Re: DoEvents Replacement

    WINUSER.H is the header you want. You might well have it already if you have installed any of the windows kits.

    You can also find it online easily enough, here's a link.

    Also you can usually...
  35. Replies
    50
    Views
    2,618

    VS 2010 Re: Visual Basic Limitations

    My main project last year was a prototype system for tracking bird movement around offshore wind turbines.
    During daylight hours the system acquires camera data at ~128 mb/sec this is then analysed...
  36. Replies
    17
    Views
    2,032

    Re: CopyMemory Shift Array one position

    I'm not sure its necessary to shift the elements, just the safearray pointers (eg the 4 byte value of the Array variables)
    As long as any double references are cleaned and any lost array elements...
  37. Replies
    17
    Views
    2,032

    Re: CopyMemory Shift Array one position

    I've not used VB6 in a while but...

    It looks to me like you are just copying the safearray pointers rather than the data.

    If any of these are lost as a result of the copymemory call (eg. #999)...
  38. Replies
    6
    Views
    825

    VS 2010 Re: Visual Basic Destructor

    In C++ the destructor is very important because you have responsibility of deallocating everything you allocate. In managed NET it is not so important because the GC does a great job cleaning up...
  39. Re: Double appears to have different values in VB6 and C++

    Converting a double to string often loses accuracy so identical strings do not indicate identical doubles.

    Passing the double to and from the DLL will not alter the double.

    You could use your...
  40. Replies
    12
    Views
    2,207

    Re: Classes To Access Form Objects

    Going back to the default instance implementation that was not working, I think you were looking at the wrong code. Look for the application entry point.

    static class Program
    {
    ...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.