Search Results - VBForums

Search:

Type: Posts; User: Milk

Page 1 of 13 1 2 3 4

Search: Search took 0.07 seconds.

  1. Replies
    28
    Views
    675

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

    by Milk
    Replies
    7
    Views
    471

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

    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...
  4. Replies
    3
    Views
    1,087

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

    Job done.

    105639

    Thanks for the input chaps.
  6. 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...
  7. 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...
  8. 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...
  9. [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...
  10. Replies
    5
    Views
    1,325

    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...
  11. Replies
    2
    Views
    1,551

    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 =...
  12. Replies
    11
    Views
    985

    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.
  13. Replies
    11
    Views
    985

    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...
  14. Replies
    11
    Views
    985

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

    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...
  16. Replies
    13
    Views
    599

    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...
  17. Replies
    13
    Views
    599

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

    right :)
  21. 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...
    ...
  22. 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...
  23. Thread: Math algorithm

    by Milk
    Replies
    1
    Views
    693

    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...
  24. Replies
    6
    Views
    295

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

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

    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...
  27. Replies
    50
    Views
    2,152

    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...
  28. Replies
    17
    Views
    1,693

    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...
  29. Replies
    17
    Views
    1,693

    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)...
  30. Replies
    6
    Views
    694

    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...
  31. 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...
  32. Replies
    12
    Views
    2,070

    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
    {
    ...
  33. Replies
    12
    Views
    2,070

    Re: Classes To Access Form Objects

    Rather than implementing Vb's default instance consider the following...

    using System;
    using System.Drawing;
    using System.Windows.Forms;

    namespace Passing_forms
    {
    public partial class...
  34. Replies
    1
    Views
    439

    Re: Trouble parsing JPEG tags

    I've just had a quick google and it looks like some sections use entropy encoding and the markers for these sections are not followed by an offset. That 0xFFDA 'Start Of Scan' marker is one of those....
  35. Replies
    9
    Views
    1,261

    Re: Helium balloon question

    As with a liquid, the pressure increases the deeper you go.
  36. Replies
    4
    Views
    475

    Re: Inverting Bits

    It should be just a case of using a bitwise Xor with the appropriate mask.
    I'm not too familiar with VB.Net syntax but based on ThomasJohnsen's post...
    Dim result As Byte = Convert.ToByte(yourbyte...
  37. Replies
    5
    Views
    1,222

    Re: view and run a ".h" file

    Okay, you have a bunch of files which together compile into something. You could tell us what this is.

    Normally in visual studio you have a project file (vcxproj) that ties all these source files...
  38. Replies
    5
    Views
    1,222

    Re: view and run a ".h" file

    Do you have a .dll associated with this header file?

    What do you have and what do you want to do?
  39. Replies
    15
    Views
    2,168

    Re: VB6 - How to program device drivers

    If you want to learn more you could perhaps have a look at building an open source project such as the windows port of libusb. The project is written in C.
  40. Thread: Automation

    by Milk
    Replies
    5
    Views
    461

    Re: Automation

    I suppose what we do in the main is quite similar to Ace. Data acquisition from various sensors, servo and relay control, working with microcontrollers. Often with a shed load of number crunching...
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.