How to set tab order in dialog box on revit

How to set tab order in dialog box on revit

Anonymous
Not applicable
421 Views
1 Reply
Message 1 of 2

How to set tab order in dialog box on revit

Anonymous
Not applicable

  [DllImport("user32.dll", SetLastError = true)]
        static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
        /// <summary>
        /// Method  form Making the form as modeless dialog
        /// </summary>
        /// <param name="p"></param>  
        public static void CreateModelessDialog(Presentation.GS_Export p)
        {
            try
            {
                IntPtr h = new IntPtr();
                if (null == _hWndRevit)
                {
                    Process[] processes = Process.GetProcessesByName("Revit");
                    if (0 < processes.Length)
                    {
                        h = processes[0].MainWindowHandle;
                        _hWndRevit = new WindowHandle(h);

                    }                   
                }
                SetParent(p.Handle, h);
                p.Show(_hWndRevit);
                //p.ShowDialog(_hWndRevit);
                //Application.Run(p);   
                Flag = false;
            }
            catch (Exception Ex)
            {

            }
        }

 

im not able to use tab key in dialog box .if i use this code. how to set tab order for modeless dialoge box in revit ? can anyone hv sample code.

0 Likes
422 Views
1 Reply
Reply (1)
Message 2 of 2

Joe.Ye
Alumni
Alumni

 

This is not an issue about Revit or Revit API. 
All modeless dialog displayed from a dll has this problem.

A page in Microsft website has more information and solution about this.

http://support.microsoft.com/kb/233263

 



Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network