Wrox Programmer Forums
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 14th, 2005, 11:52 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

Well, I lost touch with forum for a while. Have you figured it out, Walter. I you have, please post the code.
If you havent, just let me know. With my VC++ apps I've used DDE communication a lot withoug ever running
into any problems . May be I'll borrow some more code from them and try to further convert it to C#'s.
Just let me know.

Regards
Ankur Verma
 
Old December 14th, 2005, 12:31 PM
Authorized User
 
Join Date: Nov 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Ankur,

Glad to see you are back.

But it happens that just a while ago I finally managed to find a solution. Here 's the code:

[DllImport("user32.dll")]
public static extern int UnpackDDElParam(int MSG, int lParam, ref int puiLo, ref int puiHi);
[DllImport("kernel32.dll")]
static extern int GlobalGetAtomNameA (short nAtom, StringBuilder lpBuffer, int nSize);

case WM_DDE_INITIATE:
        int lo= 0, hi = 0;
    StringBuilder lpBuffer = new StringBuilder(50);
    if (UnpackDDElParam(m.Msg, (int) m.LParam, ref lo, ref hi) != 0
     && GlobalGetAtomNameA((short) lo, lpBuffer, 50) != 0
     && lpBuffer.ToString() == "MyApplication")
        SendMessage(m.WParam,WM_DDE_ACK,this.Handle,0);
    break;

It took me a while to get it right. As I said before, I never was
involved in any Win32 API programming.

Best Regards,

Walter


 
Old December 14th, 2005, 01:31 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

Cool stuff man.

And dont tell me that you havent ever been involved in Win32 API Programming, 'cause I'm not
buying that. You have used.. like a million APIs already in this application of yours, you can
call yourself a Win32 API programming expert, because, what else, this IS what you do when you
say you are doing Win32 API based programming.

Nice problem this was, and I'm glad that you were able to finally pull if off.

Regards
Ankur Verma
 
Old December 15th, 2005, 02:26 AM
Authorized User
 
Join Date: Nov 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Ankur,

Thanks, it was a nice problem, but it took me a lot of time, and it would have been a lot more if you did not help(doing almost all the work ;)). If I had to code my application in this old fashioned way, it would have taken me ages. But this was the last problem, so it can be released now.

Best Regards

Walter

 
Old December 16th, 2005, 03:15 AM
Registered User
 
Join Date: Dec 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi people,

Can You have a look on my problem?

 I am using VB.NET 2003
I am designing a MDI Application with the MIDChildren all in normall windowstate property. I create de (child)forms with a borderstyle.none, and make them a MDIChildren before I show them. This works OK, except that when the forms are created, they show up in the client area of the MDIForm, not maximized, with a caption, very shortly, before they are finaaly filling the client area. In other words, there is a short flicker when a new form is created and displayed. This process is most noticeable with a not-so-powerful PC (or is it a not-so-fast-display-card?). This phenomenon has been reported on several occasions in the newsgroups, but a cure has never been offered. I did some research and subclassed the MdiClient, overriding the WndProc message and filtering the message WM_NCPAINT and 174 (not that I ever saw this message). This is a suggestion of Andrzej Markowski in the CodeProject, but I didn't see any effects. Has anybody found a solution for this annoying behavior or an idea how to tackle this?
Thanks in advance!
 
Old December 16th, 2005, 09:08 AM
Authorized User
 
Join Date: Nov 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I never encountered such a problem with my MDI application, which is used in similar conditions.
So I'm afraid I can not help you.


Walter Vanhimbeeck

 
Old December 16th, 2005, 10:48 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

No Walter, with borderless child forms, this problem is there indeed. Adrian is right, it can be annoying.
But never thought of working on a solution for this as usually it is not seen as a critical bug. But I'm affraid,
I just may not find enough time this week to work on this problem. But I'll definitely give it a try. In
between do let me know if you people are able to make any headway.

Regards
Ankur Verma





Similar Threads
Thread Thread Starter Forum Replies Last Post
MDI application!!!!! angelboy C# 2005 0 February 23rd, 2007 12:36 PM
MDI application !!!!! angelboy C# 2005 0 February 7th, 2007 06:12 AM
MDI Application phillipjones1988 C# 2005 0 December 3rd, 2006 12:56 AM
MDI Application dayaananthanm VB How-To 1 August 24th, 2006 04:39 PM
MDI application wanted xerxes VB.NET 2002/2003 Basics 0 April 12th, 2006 12:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.