IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Delphi Discussion :

[BARRE DES TACHES] faire réapparaître une fenètre


Sujet :

Delphi

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé
    Avatar de OutOfRange
    Profil pro
    Inscrit en
    Avril 2005
    Messages
    533
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2005
    Messages : 533
    Par défaut [BARRE DES TACHES] faire réapparaître une fenètre
    Bonjour

    J'utilise le code suivant pour enlever mon application de la barre des tâches

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
      ShowWindow(application.Handle, SW_HIDE);
      SetWindowLong(application.Handle, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
      ShowWindow(application.Handle, SW_SHOW);
    Je l'ai trouvé ici (merci Claudius 40)
    http://www.developpez.net/forums/sho...r+barre+taches

    Bon maintenant, comment je fais pour la faire apparaître à nouveau dans la barre des tâches ?

  2. #2
    Expert confirmé
    Avatar de Jipété
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    11 132
    Détails du profil
    Informations personnelles :
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations forums :
    Inscription : Juillet 2006
    Messages : 11 132
    Par défaut
    Salustre !
    Moi, je dirais, après lecture du lien,
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
      ShowWindow(application.Handle, SW_SHOW);
      SetWindowLong(application.Handle, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
      ShowWindow(application.Handle, SW_SHOW);
    Mais j'ai pas testé et j'peux me gourrer...
    Mes 2 cts,
    --
    jp

  3. #3
    Membre éclairé
    Avatar de OutOfRange
    Profil pro
    Inscrit en
    Avril 2005
    Messages
    533
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2005
    Messages : 533
    Par défaut
    Salut Jipété

    Ca ne fonctionne pas
    Je pense plutôt qu'il faut modifier un des paramètres de la seconde ligne
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
      SetWindowLong(application.Handle, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
    C'est elle qui cache "l'onglet" de la barre des tâches
    Pour ce faire, il faut que la fenêtre de l'appli elle-même soit cachée (1ère ligne)
    La 3ème la remet en SW_SHOW une fois l'opération de camouflage terminée

    Merci quand même pour ta suggestion

  4. #4
    Modérateur
    Avatar de Rayek
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mars 2005
    Messages
    5 236
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : France, Haute Savoie (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mars 2005
    Messages : 5 236
    Par défaut
    Après avoir utiliser sur SetWindowLong

    je tombe sur ca :

    Citation Envoyé par Aide delphi
    SetWindowLong Function

    --------------------------------------------------------------------------------


    The SetWindowLong function changes an attribute of the specified window. The function also sets the 32-bit (long) value at the specified offset into the extra window memory.

    Note This function has been superseded by the SetWindowLongPtr function. To write code that is compatible with both 32-bit and 64-bit versions of Microsoft® Windows®, use the SetWindowLongPtr function.

    Syntax

    LONG SetWindowLong( HWND hWnd,
    int nIndex,
    LONG dwNewLong
    );
    Parameters

    hWnd
    [in]
    Handle to the window and, indirectly, the class to which the window belongs.

    Windows 95/98/Me: The SetWindowLong function may fail if the window specified by the hWnd parameter does not belong to the same process as the calling thread.

    nIndex
    [in] Specifies the zero-based offset to the value to be set. Valid values are in the range zero through the number of bytes of extra window memory, minus the size of an integer. To set any other value, specify one of the following values.
    GWL_EXSTYLE
    Sets a new extended window style. For more information, see CreateWindowEx.
    GWL_STYLE
    Sets a new window style.
    GWL_WNDPROC

    ...
    Curieux comme je suis, allons voir dans Windows Style.

    Citation Envoyé par "Aide delphi"
    WS_BORDER
    Creates a window that has a thin-line border.

    WS_CAPTION
    Creates a window that has a title bar (includes the WS_BORDER style).

    WS_CHILD
    Creates a child window. A window with this style cannot have a menu bar. This style cannot be used with the WS_POPUP style.

    WS_CHILDWINDOW
    Same as the WS_CHILD style.

    WS_CLIPCHILDREN
    Excludes the area occupied by child windows when drawing occurs within the parent window. This style is used when creating the parent window.

    WS_CLIPSIBLINGS
    Clips child windows relative to each other; that is, when a particular child window receives a WM_PAINT message, the WS_CLIPSIBLINGS style clips all other overlapping child windows out of the region of the child window to be updated. If WS_CLIPSIBLINGS is not specified and child windows overlap, it is possible, when drawing within the client area of a child window, to draw within the client area of a neighboring child window.

    WS_DISABLED
    Creates a window that is initially disabled. A disabled window cannot receive input from the user. To change this after a window has been created, use EnableWindow.

    WS_DLGFRAME
    Creates a window that has a border of a style typically used with dialog boxes. A window with this style cannot have a title bar.

    WS_GROUP
    Specifies the first control of a group of controls. The group consists of this first control and all controls defined after it, up to the next control with the WS_GROUP style. The first control in each group usually has the WS_TABSTOP style so that the user can move from group to group. The user can subsequently change the keyboard focus from one control in the group to the next control in the group by using the direction keys.
    You can turn this style on and off to change dialog box navigation. To change this style after a window has been created, use SetWindowLong.


    WS_HSCROLL
    Creates a window that has a horizontal scroll bar.

    WS_ICONIC
    Creates a window that is initially minimized. Same as the WS_MINIMIZE style.

    WS_MAXIMIZE
    Creates a window that is initially maximized.

    WS_MAXIMIZEBOX
    Creates a window that has a maximize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified.

    WS_MINIMIZE
    Creates a window that is initially minimized. Same as the WS_ICONIC style.

    WS_MINIMIZEBOX
    Creates a window that has a minimize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified.

    WS_OVERLAPPED
    Creates an overlapped window. An overlapped window has a title bar and a border. Same as the WS_TILED style.

    WS_OVERLAPPEDWINDOW
    Creates an overlapped window with the WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX styles. Same as the WS_TILEDWINDOW style.

    WS_POPUP
    Creates a pop-up window. This style cannot be used with the WS_CHILD style.

    WS_POPUPWINDOW
    Creates a pop-up window with WS_BORDER, WS_POPUP, and WS_SYSMENU styles. The WS_CAPTION and WS_POPUPWINDOW styles must be combined to make the window menu visible.

    WS_SIZEBOX
    Creates a window that has a sizing border. Same as the WS_THICKFRAME style.

    WS_SYSMENU
    Creates a window that has a window menu on its title bar. The WS_CAPTION style must also be specified.

    WS_TABSTOP
    Specifies a control that can receive the keyboard focus when the user presses the TAB key. Pressing the TAB key changes the keyboard focus to the next control with the WS_TABSTOP style.
    You can turn this style on and off to change dialog box navigation. To change this style after a window has been created, use SetWindowLong.


    WS_THICKFRAME
    Creates a window that has a sizing border. Same as the WS_SIZEBOX style.

    WS_TILED
    Creates an overlapped window. An overlapped window has a title bar and a border. Same as the WS_OVERLAPPED style.

    WS_TILEDWINDOW
    Creates an overlapped window with the WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX styles. Same as the WS_OVERLAPPEDWINDOW style.

    WS_VISIBLE
    Creates a window that is initially visible.
    This style can be turned on and off by using ShowWindow or SetWindowPos.



    WS_VSCROLL
    Creates a window that has a vertical scroll bar.
    Pourqoi n'essayerai je pas avec WS_VISIBLE

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
      ShowWindow(application.Handle, SW_HIDE);
      SetWindowLong(application.Handle, GWL_EXSTYLE, WS_VISIBLE );
      ShowWindow(application.Handle, SW_SHOW);
    Miracle ca focntionne ^^
    Modérateur Delphi

    Le guide du bon forumeur :
    __________
    Rayek World : Youtube Facebook

  5. #5
    Membre éclairé
    Avatar de OutOfRange
    Profil pro
    Inscrit en
    Avril 2005
    Messages
    533
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2005
    Messages : 533
    Par défaut
    Salut Malatar

    Et merci pour ton aide
    Effectivement, ça fonctionne
    Ces aides en angliche me rebutent un peu
    Et de toutes façons, ma version D6 perso ne me fournit aucune aide sur SetWindowLong...

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 4
    Dernier message: 28/02/2010, 11h08
  2. Réponses: 4
    Dernier message: 03/02/2009, 00h32
  3. Réponses: 1
    Dernier message: 27/08/2007, 09h02
  4. Afficher une seule fenêtre dans la barre des taches
    Par Amissan dans le forum Interfaces Graphiques en Java
    Réponses: 7
    Dernier message: 25/01/2007, 16h56
  5. Création de fenêtres sans icone dans la barre des taches
    Par bruce_will dans le forum Windows
    Réponses: 2
    Dernier message: 06/12/2004, 04h29

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo