Search Results - VBForums

Search:

Type: Posts; User: Milk

Page 1 of 13 1 2 3 4

Search: Search took 0.05 seconds.

  1. Replies
    3
    Views
    978

    Re: OpenCV 3.0 with VS2013 for x64

    Hi there,
    you may be interested in the C++ bindings for OpenCV, your example is using the C interface. One is not better than the other so it is a matter of personal preference.

    #include...
  2. Too Late for Contest 8, Roman Numeral Converter - [Milk]

    I realise this is too late for the competition. I hope its still okay to be shown together with the other entries once they have been assessed. ;)

    #include <stdio.h>
    #include <ctype.h>
    #include...
  3. Replies
    3
    Views
    410

    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...
  4. Replies
    5
    Views
    579

    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.
  5. VS 2010 Re: Better Multi-Threads For My Approach?

    have you come across Parallel.ForEach?
  6. Replies
    5
    Views
    579

    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...
  7. Replies
    5
    Views
    342

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

    Re: Easier way of graphics programming?

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

    by Milk
    Replies
    4
    Views
    473

    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]...
  10. Thread: 2D Array Question

    by Milk
    Replies
    4
    Views
    473

    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, ...
  11. Replies
    28
    Views
    1,574

    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."
  12. Thread: Circle Collision

    by Milk
    Replies
    7
    Views
    818

    [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...
  13. Replies
    3
    Views
    1,377

    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...
  14. Replies
    3
    Views
    1,377

    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...
  15. Re: Help with LEDs for power and hard disk access.

    Job done.

    105639

    Thanks for the input chaps.
  16. 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...
  17. 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...
  18. 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...
  19. [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...
  20. Replies
    5
    Views
    1,426

    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...
  21. Replies
    2
    Views
    1,672

    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 =...
  22. Replies
    11
    Views
    1,309

    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.
  23. Replies
    11
    Views
    1,309

    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...
  24. Replies
    11
    Views
    1,309

    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
  25. Replies
    5
    Views
    430

    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...
  26. Replies
    13
    Views
    809

    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...
  27. Replies
    13
    Views
    809

    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....
  28. 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 =...
  29. 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...
  30. Re: First time using pointers - is this the right way to do this?

    right :)
  31. 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...
    ...
  32. 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...
  33. Thread: Math algorithm

    by Milk
    Replies
    1
    Views
    729

    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...
  34. Replies
    6
    Views
    351

    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.
  35. Replies
    5
    Views
    364

    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...
  36. Replies
    7
    Views
    990

    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...
  37. Replies
    50
    Views
    2,771

    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...
  38. Replies
    17
    Views
    2,173

    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...
  39. Replies
    17
    Views
    2,173

    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)...
  40. Replies
    6
    Views
    887

    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...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width