Search results for query: *

  1. M

    Question Code still running after Close()

    Unfortunately, the Exit() method terminates the application. I just want to close the form.
  2. M

    Question Code still running after Close()

    I want to create an asychronus Quit method within my form. Basically, an immediate abort of all processes and close the form. I have a button that calls Close(), but the code that was running when the button was pressed keeps running, and now objects in the form no longer exist and an exception...
  3. M

    Something broke my C# application

    I doubt that this has anything to do with your issue but those public fields should be properties. The standard is to pretty much ALWAYS use properties to expose data publicly. ----------------------------------- I've never done that, and I'm willing to give it a go - but I can't find a...
  4. M

    Something broke my C# application

    Sorry about the cryptic subject line, but I have a bizzare situation... Upgraded to the latest version of VS 2019 this morning and something stopped working - I'm passing some argunments from one form to another, by making them public on the recieving form. I've done this many times before...
  5. M

    Can I force a form to display on a dual monitor PC?

    I'm creating an application that will display data on 2 large forms. The target platform (Windows 10) will have two monitors. and I'd like the application to be aware of that and automatically display the 2 forms on their own monitor. Currently I have to drag one of the forms to the 2nd monitor...
  6. M

    Resolved forms not taking focus

    Thanks, but I figured it out... I had set the TopMost property on the 3rd form to true. My bad.
  7. M

    Resolved forms not taking focus

    Main form shows form 2, form 2 shows form 3. If I mouse click the top of form 2 I would expect it to take focus and be the top window in the display. With this project, it doesn't.. form 3 stays on top. If I minimize form 3, I can get to the controls on form 2. Is there a property somewhere that...
  8. M

    Answered convert floating point to fixed and back

    Thanks I'll see if I can get clarification from the CPU manufacturer. Unfortunately, I deal with their field app guys here in the states, who forward my questions to the mfgr in Germany, so there's a bit of a lag in time. Math isn't my strong point :(
  9. M

    Answered convert floating point to fixed and back

    Yes, it's more of a math question, though I will be implementing the solution in C#. The application is for work, and the documentation for the processor doesn't give any clue what algorithm they're using other than the register description that I posted above. I'll see if I can find a math forum.
  10. M

    Answered convert floating point to fixed and back

    Unfortunately, it's the jiggery-pokery that eludes me. Bitconverter doesn't have a method of specifying the mantissa and exponent lengths. Thanks anyway.
  11. M

    Answered convert floating point to fixed and back

    If I knew how to do it manually I wouldn't be asking.
  12. M

    Answered convert floating point to fixed and back

    I have an application that will stuff fixed point values into CPU registers. They're 32 bit (4 byte) and specified as: Unsigned fixed-point number: 5 bits integer 27 bits fractional Min = 0x0 = 0.0000000 Max = 0xFFFFFFFF = 31.9999995 How would I convert a number like 1.003936 to 4 bytes...
  13. M

    Question Converting a C++ function call to C#

    I have a DLL that uses arguments that are pointers: void __cdecl Rgp(double X[], double Y[], double *slope, double *offset, int32_t n_input); I can fix the array syntax but what do I do about the pointers? [DllImport("linearize_r01.dll", CallingConvention = CallingConvention.Cdecl)]...
  14. M

    Answered FatalExecutionEngineError using a dll

    Thank you very much. I added the calling convention CallingConvention.Cdecl and eliminated the ref keywords and the code no longer crashes. I had assumed that any output parameters should be declared as ref or out per C# convention. I guess arrays are passed by reference anyway so it doesn't...
  15. M

    Answered FatalExecutionEngineError using a dll

    Oops, my bad. I copied the wrong declaration from the C++ header. This is the original prototype that I'm attempting to duplicate: void __cdecl c_lin_coeff_dut(int32_t C_in[], double z[], double theta[], int32_t C_fpp, int32_t C_int_fpp, int32_t z_fpp, int inverse, double cc[]...
  16. M

    Answered FatalExecutionEngineError using a dll

    I have a third party dll that I want to use in a C# application. I have sample code in C++ including the function declarations and I've created a console application, modified with (I think) equivalent data types and my homegrown printf(). When I run the application it chokes at the first...
Back
Top Bottom