none
Minimize and Close doesn't work SomeTimes

    Question

  • Hello,

     

       My C# application, has Controlbox, but its MaximizeBox is set to "False". And the app minimizes on system tray and restores whenever required.

    At times not always after restoring the app doesn't minimize or close from the controlbox - Minimize & "x" buttons of ControlBox don't work at all.. I got to compulsory use TaskManager to close it. What can be the problem any ideas ??

     

    Thanks

     


    Thanks
    • Moved by CoolDadTxMVP Tuesday, June 14, 2011 2:03 PM Winforms related (From:Visual C# General)
    Tuesday, June 14, 2011 12:05 PM

Answers

  •  

    Thanks Friends,

      I found the solution. I had implemented WndProc and few lines of that was creating problem. After lot of RnD and experts help, I found the solution. Just removed those wrong implemented lines and things got working.

     


    Thanks
    • Marked as answer by truptivd Wednesday, July 06, 2011 7:54 AM
    Wednesday, July 06, 2011 7:54 AM

All replies

  • Hello truptivd,

    That's wired. I'd suggest you to create a new project, set ControlBox to true, MaximizeBox to False, (set it up the way you did in the original project, )and reproduce the issue. It's very likely that you will find the problem while trying to reproduce the issue on a clean project.

    If you don't find the problem, zip it and upload it to skydrive.com or some free file hosting service (although skydrive is preferred on this forum).


    Helen Zhou [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, June 16, 2011 7:52 AM
  • What is your operation system?

    When you click on one of the buttons, does it look like it is being clicked?

    Do you have this problem in other windows or just this application?

    By Chance did you remove or change the user32.dll.mui in the past couple of days? Sometimes using a modified user32 file to remove the Vista Evaluation watermark from the desktop. If so I hope you backed up the original so you can revert.

    Maybe these links would give you some useful information about minimize and Close button don't working.
    http://social.technet.microsoft.com/Forums/en-US/itprovistaapps/thread/b86d4c71-3446-4ce2-9e26-70ac25ade867/
    Minimize, Maximize, and Close Button Not Working
    Unable to minimize, maximize or close a window
    Close,Maximize, and Minimize buttons do not work on some of my windows.


    Helen Zhou [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, June 21, 2011 7:41 AM
  •  

    Thanks Helen Zhou,

     

       I use Win7 Ultimate 32 bit. Actually more than me, other 2 persons are using this application and they face this problem often. Unfortunately I can't see their results or know what's going on and why iwth my app. Mostly they both are on Win7 and XP.

     

      But this problem with my applicatoin doesn't occur all time, only happens sometimes. When I had seen this problem the scene was :

    App was activate and on top. When I clic the minimize/close button of ControlBox, the whole button and icon of button turns red with black border on the icon and the icon seems to be highlighted, Something like this had hppened when I had faced this problem long days ago but those other 2 person faces today also the same problem.

    If at all they might have made changes/removed to user32.dll.mui, then I guess this should happen with all applications (From Notepad to XYZ). But they face the problem only with my application, so I don't think user32.dll.mui can be the problem. And with my app also not always, only sometimes.   Am I correct with this ?

    BUT YES, they might have accessed UAC, as my app needs Admin control. Had a look at hte sites provided. 2 f them recommend System Restore option. Will try to know more from the 2 person who face this problem. This disability is annoying them a lot.

     

    Thanks

     

     

     


    Thanks
    Tuesday, June 21, 2011 9:30 AM
  •  

    Thanks Friends,

      I found the solution. I had implemented WndProc and few lines of that was creating problem. After lot of RnD and experts help, I found the solution. Just removed those wrong implemented lines and things got working.

     


    Thanks
    • Marked as answer by truptivd Wednesday, July 06, 2011 7:54 AM
    Wednesday, July 06, 2011 7:54 AM