Skip to Content
0
Former Member
Dec 06, 2011 at 04:34 AM

Focus on the dialog window

65 Views

Hi, SDK Developers.

We are developing an addon for sap and create a routine to open a dialog that allows you to choose the folder windows and assign to a field in SAP screen, except that the dialog opens behind the window of the SAP. Then we minimize the SAP for the dialog window appears. How to solve this?

public void Anexar(SAPbouiCOM.EditText oEditItem)

{

try

{

OpenFileDialog fDialog = new OpenFileDialog();

fDialog.Title = "Anexar arquivo";

fDialog.Filter = "(.)|.";

fDialog.InitialDirectory = @"C:\";

if (fDialog.ShowDialog() == DialogResult.OK)

{

oEditItem.Value = fDialog.FileName.ToString();

}

}

catch (Exception e)

{

SBO_Application.MessageBox(e.Message);

}

}