none
WPF window doesn't show up on windows XP

    Question

  • Hello,

    we have a problem with a WPF application (.Net 3.5) and Windows XP (with SP3), on some machines the application loads (log entries are written) but the window is not shown... (and no exception or anything like that is thrown, process is in the task manager visible).

    We tested it on a virtual machine and on one it worked after installing all Windows Updates, newest direct X and Microsoft Updates and KB2467173 http://support.microsoft.com/kb/2467173

    On another virtual machine we installed the same patches and updates (and even all of Microsoft Update) - in a different order - and on that the application window still doesn't show up.

    Do you have any idea how this could be fixed?

    Thanks!
       Stefan

     

    Thursday, May 19, 2011 10:15 AM

Answers

  • Hi Miri and Sheldon,

    I am Stefan's coworker and have found a solution to the problem Stefan has described here.

    For our application the trouble was with the Icon of the window. It contained a 256x256 pixels compressed icon format along with the other standard resolution. As soon as I took the 256x256 format out of the icon, the window was able to show. This is still strange, since the loading problem did not occur on all Windows XP machines. Some took the icon just fine. Another suspicious thing was, that on a given XP machine the icon on the taskbar would be replaced by the standard generic windows application icon. Sometimes it would show the custom icon and sometimes the standard windows one.

    Anyway: Miri have a look at the window and application icon.

    Greetings from Bavaria,
    Daniel

    Wednesday, August 03, 2011 9:09 AM

All replies

  • Hi,

    Pretty Interesting problem you have. I am not sure what is going on there, but I would like to suggest one technique ,

    is the "ShowInTaskbar" property of the wpf window is set to true or not....

    the window should show in the taskbar after lunch, in case it got minimized some how,

    Regards,


    Md. Masudur Rahman
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Thursday, May 19, 2011 10:47 AM
  • Hello Masdur,

    thanks for your answer.

    The property ShowInTaskbar is set to true, but it is not shown. It also is not listet in the applications tab of the taskmanager, but in its process tab. (on the other system, were it works, it is shown in the taskbar)

    Any other ideas?

    Thanks!

       Stefan

     

    Thursday, May 19, 2011 11:31 AM
  • Hi Stefan 00000,

    I have not faced the same issue with yours, and I do a lot of researches on your issue, however, I have not found a similar one, this is strange behavior, could you try to use Process monitor to test your app, might you could find some important hints and share with us.

    http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

     

    Best regards,


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, May 23, 2011 4:36 AM
    Moderator
  • Hello Sheldon,

    thanks for your answer. I had a look at it with process monitor, but all I saw is, that background processes that look for connected devices are working - and many other entries I don't understand... (about 12.000 lines).

    Do you have an idea for what I should look?

     

    Thanks!

      Stefan

     

    Tuesday, May 24, 2011 1:16 PM
  • Hi Stefan,

    If this issue is caused by your machine, and have you got some exceptions?

     

    Best regards,


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, May 26, 2011 5:08 AM
    Moderator
  • Hello Sheldo,

    I don't get any exceptions - the log files we create tells us, that everything of our code is loaded and executed. The only (and main) problem is, that no window is shown.

    We tested it on several WinXP SP3 virtual machines (on some it worked, on some it didn't) and got the same error report from some customers (that still use WinXP).

     

    Any other ideas?

    Thanks!
       Stefan

    Thursday, May 26, 2011 8:40 AM
  • Hi Stefan,

    I have not come up new ideas, and if I have new ideas of your issue, I will let you know.

     

    Best regards,


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, May 27, 2011 7:53 AM
    Moderator
  • Hi Stefan,

    It is hard to find the root cause of your issue, do you have new findings?

     

    Best regards,


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, May 31, 2011 5:36 AM
    Moderator
  • Hello Sheldon,

    we don't have new findings.

    We still cannot reproduce why it works on some machines and not on others; and why it works on some after we applied all patches and on other machines with the same patches it doesn't work...

    Ciao!
      Stefan

    Tuesday, May 31, 2011 8:27 AM
  • Hi Stefan,

    I suggest that you test your application with light system, without antivirus software, or other inject software, and comment your code, and just left a window to check if it could work well.


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, June 01, 2011 7:28 AM
    Moderator
  • Hi Stefan and Sheldon,

    I have a similar problem with my WPF application. There is a very small # of customers with Windows XP, SP3 that can't see the main application window.

    My main application window appears when the user clicks on a tray icon.

    I have a custom splash screen window that always appears fine but as stated above, on some particular machines with Windows XP sp3 when the user will then click on the tray icon, the main window just won't appear.

    I have printed out a lot of log messages to troubleshoot the problem remotely. The sequence of events is always the same, window.show, window.activate and also the location for window.left and window.top is the same. However on some particular machines the window just won't show up (it's like it's ignoring the show command).

    Perhaps we could try to find similarities between our applications/windows?

    Thanks,
    Miri 

    Monday, August 01, 2011 10:31 PM
  • Hi Miri and Sheldon,

    I am Stefan's coworker and have found a solution to the problem Stefan has described here.

    For our application the trouble was with the Icon of the window. It contained a 256x256 pixels compressed icon format along with the other standard resolution. As soon as I took the 256x256 format out of the icon, the window was able to show. This is still strange, since the loading problem did not occur on all Windows XP machines. Some took the icon just fine. Another suspicious thing was, that on a given XP machine the icon on the taskbar would be replaced by the standard generic windows application icon. Sometimes it would show the custom icon and sometimes the standard windows one.

    Anyway: Miri have a look at the window and application icon.

    Greetings from Bavaria,
    Daniel

    Wednesday, August 03, 2011 9:09 AM
  • Hi BlauerHimmel,

    Thank you for sharing this information here, it will be very beneficial for others having the similar issue.

     

    best regards,


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, August 03, 2011 9:25 AM
    Moderator
  • Hi Daniel,

    Thank your for your response!

    I have just found the issue for my application - different from the issue you had.

    The people who couldn't see my window, had higher DPI settings. Since I am setting the window's position to an absolute location, for a higher DPI setting that position was simply outside the visible area of the screen.

    I am setting the position according to the position of the system tray (I have a tray icon and the window appears when the user clicks on the tray icon) and it looks like I can't just take that because WPF is talking in device independent pixels which doesn't take into account DPI settings. So I am going to utilize this thread to fix the problem:

    http://social.msdn.microsoft.com/forums/en-US/wpf/thread/14720dad-bbbd-425e-98cb-3efeb2d5799a/

    Hope this helps someone!

    Miri



    Wednesday, August 03, 2011 4:48 PM