Results 1 to 3 of 3

Thread: Vista UAC-like prompt (where it creates new desktop for prompt)

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2008
    Posts
    2

    Vista UAC-like prompt (where it creates new desktop for prompt)

    I think you all know of the Vista UAC dialog prompt that pops up on a new desktop to make you confirm things so my question relates to that.

    At The Code Project, a clever little cookie wrote what i'm after and it's called VDialog and its description reads "Vista-like TaskDialog control for .NET Framework 2.0, compatible with Windows XP" but i'm having trouble with his code.

    What i'd like to do is not use his DialogResults and use a second form with my own buttons. I've tried so many things but i can't seem to do it.

    Simply put: Could somebody use his project to make a solution that has the main form with a button on it that pops up form2 the way it does with his custom dialogs.

    Wouldn't ask if i had any idea what i was doing wrong. I'm a little cut that i can't do it myself so i'm hoping somebody here has the know-how to rip his apart and use it the way i'd like to. Thanks.

    His link is here: http://www.codeproject.com/KB/vb/vdialog.aspx

  2. #2

    Thread Starter
    New Member
    Join Date
    Feb 2008
    Posts
    2

    Re: Vista UAC-like prompt (where it creates new desktop for prompt)

    Bump ;(

  3. #3
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: Vista UAC-like prompt (where it creates new desktop for prompt)

    Wow, that is so wrong in so many ways. Please DO NOT actually use that.

    Vista's UAC is much more than a simple dialog box with everything else blacked out. Ever wonder why your monitor flickers when you go into a UAC prompt? That's because it's entering the secure desktop. Not only can you not click on anything else but the dialog is in a secure desktop meaning no other application or APIs can modify the dialog or make a choice for you. This is a great security feature. A secure channel is setup between the SecureDesktop and the calling application and security has to be guaranteed through-out the whole process. Vista's Login, CardSpace and I think a few other things are also on a SecureDesktop and for good reason.

    By simply mimicking the look of the UAC prompt without the important framework behind it, you're essentially opening up your users to possible attack vectors. Not only that but it's bad form.

    Read this blog post for more information.

    If you really want to use a UAC prompt then you need to prepare your application for elevation (usually through a manifest file). if you want your own custom dialog box on the SecureDesktop, well I'm not sure how you could accomplish that but i'm not sure it would be necessary.
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width