Re: How to bring the 'CredUIPromptForCredentials dialog' to the foreground

From: Declercq Dirk (dirk.declercq.ddc_at_telenet.be)
Date: 02/27/05

  • Next message: AProchko: "Error: Access is denied"
    Date: Sun, 27 Feb 2005 15:31:05 +0100
    
    

    Thanks for the information.

    ""Shawn Farkas [MS]"" <shawnfa@online.microsoft.com> wrote in message
    news:0vgn1U6GFHA.1140@TK2MSFTNGXA02.phx.gbl...
    > This isn't my area of expertese, but you shouldn't be using the Desktop as
    > the parent window for a dialog. Raymond expands upon that here:
    > http://blogs.msdn.com/oldnewthing/archive/2004/02/24/79212.aspx
    >
    > -Shawn
    > http://blogs.msdn.com/shawnfa
    > --
    > This posting is provided "AS IS" with no warranties, and confers no
    > rights.
    >
    >
    > Note:
    > For the benefit of the community-at-large, all responses to this message
    > are best directed to the newsgroup/thread from which they originated.
    > --------------------
    >> From: "Declercq Dirk" <dirk.declercq.ddc@telenet.be>
    >> Subject: How to bring the 'CredUIPromptForCredentials dialog' to the
    > foreground
    >> Date: Thu, 24 Feb 2005 22:27:40 +0100
    >> Lines: 27
    >> X-Priority: 3
    >> X-MSMail-Priority: Normal
    >> X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
    >> X-RFC2646: Format=Flowed; Original
    >> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
    >> Message-ID: <uX1MterGFHA.3472@TK2MSFTNGP09.phx.gbl>
    >> Newsgroups:
    > microsoft.public.dotnet.framework.sdk,microsoft.public.dotnet.framework.wind
    > owsforms,microsoft.public.dotnet.security
    >> NNTP-Posting-Host: d54c2d224.access.telenet.be 84.194.210.36
    >> Path:
    > TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP0
    > 9.phx.gbl
    >> Xref: TK2MSFTNGXA02.phx.gbl
    > microsoft.public.dotnet.framework.windowsforms:81205
    > microsoft.public.dotnet.security:9230
    > microsoft.public.dotnet.framework.sdk:10294
    >> X-Tomcat-NG: microsoft.public.dotnet.security
    >>
    >> Hey,
    >>
    >> From within my security-dll I am able to display the
    >> 'CredUIPromptForCredentials' dialog.
    >> Because this dialog is popped up from code within my dll I have set the
    >> parent window of this dialog to be the Desktop.
    >>
    >> I am already able to bring this dialog visible (if there are other
    > window's
    >> occupying the desktop) by using
    >> SetWindowPos( hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE )
    > in a
    >> seperate thread
    >> where the 'hWnd' parameter is the window I have found with the
    > 'EnumWindows'
    >> function.
    >>
    >> What I am not able to do is set this window the active window of the
    > system
    >> because when I press a key to fill
    >> in the UserName the input is going to another application although the
    >> title-bar of the 'CredUIPromptForCredentials'-dialog
    >> seems to be active (I suspect so because the color is the one of an
    > active
    >> window).
    >>
    >> Some idea's ?
    >>
    >> I have already tried using SetWindowPos( hWnd, HWND_TOPMOST, 0, 0, 0, 0,
    >> SWP_NOSIZE | SWP_NOMOVE | SWP_SHOWWINDOW )
    >>
    >>
    >>
    >


  • Next message: AProchko: "Error: Access is denied"

    Relevant Pages

    • Re: Are VBA userforms always child of Windows desktop?
      ... When I load a modeless userform then in Spy++ the treeview suggests that the form is a child of the desktop. ... Retrieves the parent window. ...
      (microsoft.public.excel.programming)
    • Re: how to call a java script function in a child window from the
      ... The htm in the parent window and needs ... The child window displays a contact form that is to be ... I was trying to from the parent window script> ...
      (microsoft.public.frontpage.programming)
    • Re: How to have a Perl script emulate a keystroke to another application
      ... I used Win32::GuiTest to SendKeys to applications. ... Finds the window handles of the windows matching the specified ... parent - the parent window of the button ... BOOL SetForegroundWindow* ...
      (comp.lang.perl.misc)
    • Re: Detect a forms window mode
      ... By looking at the window classes of the form and of its parent window, ... I can tell whether the form is popup or not. ... 'Returns the handle of the parent window of the specified window. ... Private Sub Form_Load ...
      (microsoft.public.access.modulesdaovba)
    • Re: Detect a forms window mode
      ... By looking at the window classes of the form and of its parent window, I can tell whether the form is popup or not. ... Dim hWndParent As Long ...
      (microsoft.public.access.modulesdaovba)