|
I used message filter.
I did not override the WndProc but I did override the PreProcessMessage of the main form and it is called before WndProc (but it seems specific to the form) - no luck .
I did use ShowDialog(this)) for the child dialog.
It seems that whenever we have a modal dialog other than the main form the events of the dialog goes directly to the dialog and not pass through the main form or application queue. Is this true?
Atif
|
|
|
|
|
I don't know exactly but here is my guess:
I read again the documentation for the Application.AddMessageFilter method and found the following: "Message filters are unique to a specific thread." So I maybe the modal dialog runs with its own UI thread and therefor its message aren't detected by the filter. In this case you'll have to add a filter for every dialog.
But as I said I'm not very sure about that, so open a new thread and gain from the knowledge of other CP's
www.troschuetz.de
|
|
|
|
|
I created another thread too...but it has not worked out yet...thanks a lot lot for all your help.
|
|
|
|
|
At first I want to apologize for the late answer.
In my previous post I didn't suggest that you create another thread, but rather that for the opened modal dialog a new UI thread is created. Today, I checked this theory and it's false. The number of threads of an application stays the same when you open a modal dialog.
So for me there is no obvious reason why the message filter didn't get notice of the messages for the modal dialog.
Maybe you open a new thread with this specific problem, as surely another CP is able to provide a solution
www.troschuetz.de
|
|
|
|
|
You should take a look at the MSDN topic for the type from the System.Security.Cryptography.Xml namespace that you want to use. At the bottom you find the information which dll contains this type. E.g. to use the System.Security.Cryptography.Xml.DataObject class you have to reference the System.Security.dll.
www.troschuetz.de
|
|
|
|
|
I want to use the above namespace but when I type:
System.Security.Cryptography.
I only have the namespace X509Certificates and don't have Xml
Can someone please tell me what DLL etc I need to reference to get the required namespace.
Thanks
|
|
|
|
|
has anyone worked with DLP-245PL?
|
|
|
|
|
A survey!
Put me down for a 'NO'.
What kind of programming problem are you having with C#?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
A survey!
where is option: "What the hell is DLP-245PL?"?
...
google-> it looks similar to *something*... soon I'll fail exam from *it*
Dave Kreskowiak wrote:
What kind of programming problem are you having with C#?
hmm... managed firmware? I don't think so
regards,
David 'DNH' Nohejl
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
Put me down as a "no" also.
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
has anyone work with DLP-245PL?
|
|
|
|
|
Hi All,
I have managed to Host (C#)Windows Froms Control in MFC Application.
MFC Application is Dialog based application where i did "Insert ActiveX Control" on a dialog and i am able to see the Control on Dialog.When i execute Program it runs fine.
Problem is after that when i Close Development Environment (VC++(6.0) IDE)and open it agian,it gives error "The ActiveX Control can not be instantiated"
"The ActiveX Control MyControl.MyControl1 Failed to initialize properly"
And in Design environment it shows Blue background on my control.But when i run it, it runs fine.
It is very annoying ,every time i closes and opens the IDE error is shown.
Can anybody give some advice on this.
Thanks
TusharM.
|
|
|
|
|
Does anyone have a function, method or sip of code that will print an array to a multiline string like print_r() will do in PHP?
Thank You
|
|
|
|
|
|
I don't know neither PHP or print_r, but you could easily join a string with String.Join(Environment.NewLine, yourArray) and print it.
Yes, even I am blogging now!
|
|
|
|
|
print_r would print it something like this
[0] => [0] => "Value0"
[1} => "Value0b"
[1] => [0] => "Value1"
[1} => "Value1b"
[2] => [0] => "Value2"
[1} => "Value2b"
[3] => [0] => "Value3"
[1} => "Value3b"
...
[n] => [0] => "Valuen"
[1} => "Valuenb"
3-dimensions would branchout 3 times... 4, 4times... you get the drill
|
|
|
|
|
sorry it didnt keep the tabs...
|
|
|
|
|
i'm developing a PDA module on C# and i have to communicate with the server which is running on VB6 (Winsock). i'm confused...can some one help me on how to overcome this problem.
thanks
Life has its ups and downs, so does programming....
|
|
|
|
|
damasta2k wrote:
i'm confused...can some one help me on how to overcome this problem.
There is a lot of information available on socket-based programming both in terms of documentation and articles. The Code Project has many articles here, check these[^] for starters, also MSDN has documentation regarding the Socket class here[^].
- Nick Parker My Blog | My Articles
|
|
|
|
|
Hi
The RichTextBox control doesn't have a BackgroundImage property. I read in the msdn library that this property can be overriden, but there's no examples.
Can u tell me what 2 do with this problem??
Thanx
|
|
|
|
|
|
Hi,
I have a problem with controls in window forms.
The controls are embedded in a window desktop application where notify windows are popping up
at certain times (based on a timer). The windows stay on the desktop until the user is closing them.
Here is the problem:
Controls of windows (the window forms contain a label and a pictureBox) which are popping up when the computer is locked appear in black. As soon as I change the size of the window (they are sizable window forms), the controls are displayed properly again.
Does someone have an ideas why this happens and how I can fix my code?
Thank you a lot!
|
|
|
|
|
Strage bug. I bet the bug is very small. If you really can't figure it out you can try to catch the session events.
First you need to register for the events. Make sure you are running on XP. Use this:
[DllImport("Wtsapi32.dll")]<br />
extern public static bool WTSRegisterSessionNotification(IntPtr handle, double flags);<br />
<br />
[DllImport("Wtsapi32.dll")]<br />
extern public static bool WTSUnRegisterSessionNotification(IntPtr handle);
Override the WndProc method in your window kinda like this:
protected override void WndProc(ref System.Windows.Forms.Message m)
{
switch(m.Msg)
{
case (int)WM_WTSESSION_CHANGE:
}
}
To make life easier here are my constant definitions:
public const int WM_WTSSESSION_CHANGE = 0x02B1;<br />
public const int WTS_CONSOLE_CONNECT = 0x1;<br />
public const int WTS_CONSOLE_DISCONNECT = 0x2;<br />
public const int WTS_REMOTE_CONNECT = 0x3;<br />
public const int WTS_REMOTE_DISCONNECT = 0x4;<br />
public const int WTS_SESSION_LOGON = 0x5;<br />
public const int WTS_SESSION_LOGOFF = 0x6;<br />
public const int WTS_SESSION_LOCK = 0x7;<br />
public const int WTS_SESSION_UNLOCK = 0x8;
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
You could try subscribing to the Paint event and calling this.Invalidate() in the event handler.
The Paint event is fired when you uplock the screen.
Regards,
Brian Dela
Now Bloging![^]
|
|
|
|
|
Hi,
I need to convert string in specific format to DateTime structure.
I tryed following code but it throws exception.
string text = "4113013050";<br />
string format = "YMMddHmmss";<br />
DateTime dateTime = DateTime.ParseExact(text,format,null) ;<br />
textBox1.Text = dateTime.ToString();
Can somebody tell me what am I doing wrong. Thanks
Salut!
|
|
|
|