How to set tab order in dialog box on revit

How to set tab order in dialog box on revit

Anonymous
不适用
420 次查看
1 条回复
1 条消息(共 2 条)

How to set tab order in dialog box on revit

Anonymous
不适用

  [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 个赞
421 次查看
1 条回复
回复 (1)
2 条消息(共 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