Common Dialog control


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Common Dialog control

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    Common Dialog control

    [Originally posted by Jonathan Barnes]

    Does anybody know how to reposition the common dialog control. I cannot find any functions to do it.

    thanks

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Common Dialog control

    [Originally posted by modigliani]

    Can't be done through normal VB. You need to use API calls. Check one of the more advanced VB forums.

  3. #3
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Common Dialog control (no API needed)

    [Originally posted by Psycho]

    Actually, You can not do that, but there's a trick. CommonDialog always places it's UpperLeft corner onto it's owner's UpperLeft corner.
    The solution is quite simple. You have to make a form with a CommonDialog Control on it. If You want to show an Open, Save etc Dialog, simple place the "DummyForm's" UpperLeft corner to the location where You want to see the Dialog, then show Your dialog. DummyForm naturally have to be invisible.

    Private Sub ShowDialog (iType as Integer)

    'Select Case IType
    'If 0, ShowSave etc... as You Like...

    DummyForm.Visible = False
    DummyForm.Move 1500, 120 ' For Example...
    DummyForm.CommonDialog1.ShowOpen

    End Sub

    Do not forget to UnLoad DummyForm too at exitting the Application.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center