Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can minimize a notebook easy enough with Mathematica code, but how does one minimize all of the Mathematica front end? Just as if you clicked the minimize button on the menu bar? This is for version 8 on windows XP if that helps.

share|improve this question
What do you mean by this: "I can minimize a notebook easy enough with Mathematica code" ? – Vitaliy Kaurov Aug 13 '12 at 0:49
@VitaliyKaurov FrontEndTokenExecute[SelectedNotebook[], "WindowMiniaturize"] – wxffles Aug 13 '12 at 2:08
There was a FE token FrontEndHide, but it only worked on NeXt computers (as of Mma V3). It does nothing when executed in my current machine. – Dr. belisarius Aug 13 '12 at 2:55

Until a better answer comes along, I present, for your edification, an ugly hack that isn't really Mathematica per se:


src = "
  #include \"WolframLibrary.h\"
  #include <windows.h>
  #include <string>

  BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam)
    char title[256];
    GetWindowText(hwnd, title, sizeof(title));
    std::string t(title);
    if(t.find(\"Wolfram Mathematica 8\") != std::string::npos)
        ShowWindow(hwnd, SW_MINIMIZE);
    return TRUE;

  EXTERN_C DLLEXPORT int hide(WolframLibraryData libData,
    mint Argc, MArgument *Args, MArgument Res)
    EnumWindows(EnumWindowsProc, 0);
    return LIBRARY_NO_ERROR;

hidelib = CreateLibrary[src, "hide", "Language" -> "C++",
  "CompileOptions" -> {"/EHsc"},
  "Libraries" -> {"user32.lib"},
  "Debug" -> False]

hide = LibraryFunctionLoad[hidelib, "hide", {}, "Void"]

And to use:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.