CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: David Anton

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    295

    Re: Mistake in the Braces

    Yes - the 'doInBackground' method has an extra closing brace. The 'while' loop is being closed twice.
  2. Replies
    3
    Views
    277

    Re: Can I pass a new bool as a reference?

    After each call to 'search', I would add:
    if (breaknow)
    break;
  3. Replies
    3
    Views
    277

    Re: Can I pass a new bool as a reference?

    The compiler error says it all - "a 'ref' or 'out' argument must be an assignable variable".
  4. Replies
    2
    Views
    264

    Re: Convert ascii to hex

    ((int)'A').ToString("X")
  5. Replies
    5
    Views
    645

    Re: is common code possible in vb.net ?

    Certainly:

    Project -> Add Existing Item -> Add as Link (you have to click the button drop-down - a bad interface for sure).
  6. Re: How to use delegate in vc++ 2010?

    C++0x (or whatever they're calling it now):


    notifyIcon1::BalloonTipClosed += [&] ()
    {
    delete notifyIcon1;
    };


    C++/CLI:
  7. Re: [RESOLVED] Convert from C# to VC++2010 -dataGridView?

    It's one of our converters (you can check out the link in my signature).
  8. Re: [RESOLVED] Convert from C# to VC++2010 -dataGridView?

    I agree about the "Keys" enum - the problem was that without a "using System.Windows.Forms", the converter can't confirm that "Keys" refers to the enum and not some other class of that name.
  9. Re: Convert from C# to VC++2010 -dataGridView?

    //.h file code:

    public ref class MyDataGrid : DataGridView
    {
    protected:
    virtual bool ProcessDialogKey(Keys ^keyData) override;
    };

    //.cpp file code:
  10. Re: Convert from C# to VC++2010 -dataGridView?

    As Ovidiu said, it's no picnic to convert to native C++, but if you are one of the handful of people in the world coding in C++/CLI, then you can use:

    public ref class MyDataGrid : DataGridView
    {...
  11. Re: Some code a converter did that I don't understand.

    The converter should have changed "Information.IsDBNull" to "System.Convert.IsDBNull".
  12. Replies
    4
    Views
    563

    Re: Help Me Convert Some Code

    Right you are (this is fixed in the next build).
  13. Replies
    4
    Views
    563

    Re: Help Me Convert Some Code

    Your C++ code was not compilable - after correcting it and converting I get:

    private string computeChecksum_ascii_checksum = new string(new char[5]);
    private string[] computeChecksum(sbyte[]...
  14. Thread: C# or C++?

    by David Anton
    Replies
    7
    Views
    653

    Re: C# or C++?

    Learn at least a little of both - it's easier to understand some concepts if you have experience with more than one language.
    e.g., it's easier to understand C# struct vs class when you understand...
  15. Re: RaiseEvent from VB.net to CSharp problem

    Just drop the 'RaiseEvent' keyword.

    Note that 'CallByName' is not available in C# unless you set a reference to the Microsoft.VisualBasic assembly.
  16. Replies
    14
    Views
    1,757

    Re: How do I convert a C# code to C++?

    Both the syntax and the library dictate this requirement:

    1. The syntax is a Microsoft-unique thing that never really caught on much.
    2. The library used is .NET - the same as C#.
  17. Replies
    14
    Views
    1,757

    Re: How do I convert a C# code to C++?

    It's C++/CLI code which requires Visual C++ 2005 or higher.

    It works just like C# code, so you will have nearly identical performance as C# (slower than native C++).

    Also, your users will need...
  18. Replies
    14
    Views
    1,757

    Re: How do I convert a C# code to C++?

    If you want C++/CLI (using .NET), then it's fairly simple.
    It's probably not what you want, but just in case here it is:



    using namespace System;
    using namespace System::Collections::Generic;...
  19. Replies
    5
    Views
    485

    Re: Help line of C# to VB.Net

    <DllImport("coredll.dll")>
    Private Shared Function SystemParametersInfo(ByVal uiAction As UInteger, ByVal uiParam As UInteger, ByVal pvParam As StringBuilder, ByVal fWiniIni As UInteger) As Integer...
  20. Replies
    1
    Views
    612

    Re: transform from C# to C++

    (I realize that this conversion is not complete - you'll have to make some adjustments)



    using namespace System;

    private ref class Program
    {
    private:
    value class Point
  21. Re: [RESOLVED] List in a List - VB Conversion to C#

    ToList is also available in C# - it's just that VB allowed you to drop the empty argument list:



    lds.Fields = fs.FieldAliases.Keys.ToList();

    lds.Values = new List<List<object>>();
    for (int...
  22. Replies
    15
    Views
    1,552

    Re: parse string into decimal variable

    You've got something weird happening on your system or some bad locale setting.
    When I try the same code I get 169.65 assigned to 'a'.
  23. Replies
    15
    Views
    1,552

    Re: parse string into decimal variable

    The dot is being remove some other way in your code.
    CDec and System.Convert.ToDecimal certainly do not remove the dot.
    If the string contains a valid decimal, then that decimal value is extracted...
  24. Re: Equivalent for Dim waveform() as Byte in Visual C#

    In addition to MadHatter's answer, be aware that array length is used in C# to specify the size, while array upper bounds are used in VB, so you have to adjust for these.
    e.g.,

    Dim myArray(5) As...
  25. Replies
    15
    Views
    1,552

    Re: parse string into decimal variable

    You're right - it's not idiot-proof.
    It will only work when you can reasonably assume that the argument is the string version of a decimal number.

    If the argument is likely to be any junk then...
Results 1 to 25 of 120
Page 1 of 5 1 2 3 4



HTML5 Development Center

Click Here to Expand Forum to Full Width