modal DLL calling

  • Thread starter Elisabete de Moraes
  • Start date
E

Elisabete de Moraes

Hi everyone,

I have a .Net dll that instantiates other .Net dll's and win32 dll's,
through LoadLibrary and System.Reflection.Assembly namespace. That's working
fine.
I need .Net dll (caller) to wait till the end of the called function /
method ends processing (something like making called DLL act as "modal").
Is there any way to use something like WaitForSingleObject in this context?
Is there any solution for this problem?

Thanks in advance

Elisabete
 
G

Guest

Hi Elisabete !!

I'm sorry to bother you. But I can't find help anywhere. I'm trying to find
an answer to the same question that you wrote previously almost a year ago.

"I am inheriting the DataGridColumnStyle class that hosts a DateTimePicker
control and that's ok. The problem I'm going through is that the right and
left arrow keys don't work like they do in an isolated instance of a
DateTimePicker control, ie, the focus go to the next grid cell (instead
going to the next part of the date). I did overload the ProcessDialogKey
event to handle the window message but it doesn't work at all.
Does anyone have an idea please?"

Oleg answered: "Override ProcessKeyMessage routine"

With this it seems you achieved what you wanted.

But I can't figure it out how to do that. Do I have to override this method
in an inherited datagrid or in a datetimepicker inherited class??

If you have some sample code it would be great.

Thankyou very much in advance !! And I'm sorry posting it here, but I didn't
find another way to contact you.
 
G

Guest

I think I figured it out how to do it. If someone is interested, here is some
sample code:

Just create a new class that inherits from DateTimePicker and use it in your
column style implementation instead of the standard DateTimePicker.
To get out of the cell containing the new DateTimePicker control, use the
TAB key or SHIFT+TAB.

public class myPicker:DateTimePicker
{
public myPicker():base()
{
}
protected override bool ProcessKeyMessage(ref Message m)
{
//here we say to the DateTimePicker to take care of pressed keys
//instead of his parent
return this.ProcessKeyEventArgs(ref m);
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top