Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

how to run file open dialog box in activex dll project

kapiloo7kapiloo7 Posts: 45Member
I am creating a COM component to read excel file in which,
i have to ask for the file. in standard exe project we can have
common dialog control. but as this is a dll project i can not have
a control.so how can i run the dialog box.

any body can help plz...

Comments

  • Bulgarian_VBBulgarian_VB Posts: 307Member
    : I am creating a COM component to read excel file in which,
    : i have to ask for the file. in standard exe project we can have
    : common dialog control. but as this is a dll project i can not have
    : a control.so how can i run the dialog box.
    :
    : any body can help plz...
    :
    Yes, there are APIs to get a common dialog. However, you can still use the control... just add a form to your project. ActiveX DLLs can have and display their own forms. In your case you wouldn't want a form to be displayed, so after placing the control, just resize the form to 1x1 pixel and set the start-up position to -1000, -1000 so that it's not visible. Show the dialog OnLoad and Unload the form immediately after the common dialog is closed.

    Hope I helped,
    Nikolay Semov

Sign In or Register to comment.