User Profile

Collapse

Profile Sidebar

Collapse
inch
inch
Last Activity: May 13 '08, 08:14 AM
Joined: Sep 25 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • inch
    started a topic How to show a form without it getting focus?
    in .NET

    How to show a form without it getting focus?

    I would like to pop up a small information window (form) while my application is running to remind the user about something. However it should not get focus as this could intefere with what the user is doing in the main part of the application.
    It should work a bit like the pop up messages you get in MSN when a new person comes on line.
    How do I pop up a form without it getting focus? I've tried all sorts, but can't seem to get the result...
    See more | Go to post

  • Problem with data type adInteger when using ADODB to query Excel

    I am trying to hack some C++ code from a colleague. It uses ADODB to query the data in an Excel spreadsheet.
    Once the data has been queried it stores it in memory for quick access later. For each data item it checks the data type using GetType().
    He has also written some functions to retrieve the data from memory by type. One of the types being Integer.

    Now the problem. The data that comes back from Excel never seems to...
    See more | Go to post

  • But passing the same struct as a parameter works OK. It is only trying to set it's value when returned as the result of a call that fails....
    See more | Go to post

    Leave a comment:


  • Just a small update to this. If I try using a 'simple' struct that only has single variable members it works OK.
    However using a struct with an array member fails.
    There must be a way to do this, but I can't find it.
    See more | Go to post

    Leave a comment:


  • Yea, I got that. When I tried the code below I get the message:
    Method's type signature is not PInvoke compatible.
    This is the C# code I used:
    Code:
    [DllImport("CLibToCallFromCS.dll")]
    public static extern MxRecArr ReturnStructArr(int Mode);
     
    private void button7_Click(object sender, EventArgs e)
    {
    int var = 0;
    MxRecArr MyRec = new MxRecArr();
    MyRec.Initialize();
    MyRec = ReturnStructArr(var);
    ...
    See more | Go to post

    Leave a comment:


  • C#-P/Invoke: How to call function that's return value is a struct

    Hello all..
    I'm new to C# and I've not actually started serious coding. However I know I will need to call some legacy functions from a company DLL. I have tested this using P/Invoke and been quite successull. However, there are a few functions that return a struct as their return value. How do I go about calling these? A simple (fictional) example of the C source is below:
    Code:
    typedef struct _MxRec {
    char Name[32];
    double Mx[32];
    ...
    See more | Go to post
No activity results to display
Show More
Working...