ActiveX control on modal form give 'can't show non-modal form when modal form is displayed' 
Author Message
 ActiveX control on modal form give 'can't show non-modal form when modal form is displayed'

Hello,

I've created a ActiveX control with a textbox and a button that will drop
down a calender to pick a date.

The calender is placed on a form, when the button is pressed the form is
shown non-modal, and gives this error when the control is used on a modal
form.

I know this is not possible, but is there a workaround for ActiveX controls?

Regards,

Rene



Sat, 06 Mar 2004 02:10:00 GMT  
 ActiveX control on modal form give 'can't show non-modal form when modal form is displayed'
What about using the calendar control and using the Visibility option to
hide/show it rather than putting it on a modal form?

Casey


Quote:
> Hello,

> I've created a ActiveX control with a textbox and a button that will drop
> down a calender to pick a date.

> The calender is placed on a form, when the button is pressed the form is
> shown non-modal, and gives this error when the control is used on a modal
> form.

> I know this is not possible, but is there a workaround for ActiveX
controls?

> Regards,

> Rene



Sat, 06 Mar 2004 02:31:40 GMT  
 ActiveX control on modal form give 'can't show non-modal form when modal form is displayed'
My control works like this:

You can enter the date, or press the dropdown button to pick a date from the
calendar.
When the user presses a key outside the calendar, it disappears. I think
this will be a problem when using your method.

BTW: I don't know how other drop down controls can handle this. I've tried
this with 3th party tools without problem.

Rene


Quote:
> What about using the calendar control and using the Visibility option to
> hide/show it rather than putting it on a modal form?

> Casey



> > Hello,

> > I've created a ActiveX control with a textbox and a button that will
drop
> > down a calender to pick a date.

> > The calender is placed on a form, when the button is pressed the form is
> > shown non-modal, and gives this error when the control is used on a
modal
> > form.

> > I know this is not possible, but is there a workaround for ActiveX
> controls?

> > Regards,

> > Rene



Sat, 06 Mar 2004 03:04:34 GMT  
 ActiveX control on modal form give 'can't show non-modal form when modal form is displayed'


Quote:
> My control works like this:

> You can enter the date, or press the dropdown button to pick a date from
the
> calendar.
> When the user presses a key outside the calendar, it disappears. I think
> this will be a problem when using your method.

It shouldn't be.

Try the Lost_Focus() function on the calendar control. I presume that when
the dropdown is selected, you put focus to the calendar, so losing focus
would be a valid reason to close the calendar.

Casey



Sat, 06 Mar 2004 04:03:52 GMT  
 ActiveX control on modal form give 'can't show non-modal form when modal form is displayed'


Quote:
> > You can enter the date, or press the dropdown button to pick a date from
> the
> > calendar.
> > When the user presses a key outside the calendar, it disappears. I think
> > this will be a problem when using your method.

> Try the Lost_Focus() function on the calendar control. I presume that when
> the dropdown is selected, you put focus to the calendar, so losing focus
> would be a valid reason to close the calendar.

I've tried this, but when I press outside the calendar control it doesn't
lose it's focus, only when I select another control (button or textbox).

I'm now trying to use the DTPicker as the dropdown calendar, and try to make
this working as my last control.

Thanx for your help,

Rene



Sat, 06 Mar 2004 15:47:33 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Modal Form can't open another Modal Form

2. MODAL FORM & NON MODAL FORM

3. MODAL FORM & NON MODAL FORM

4. MODAL FORM & NON MODAL FORM

5. non-modal form when a modal form is displayed

6. MODAL FORM & NON MODAL FORM

7. Can't show non-modal form when ...

8. Msgbox error 'Can't show non-modal form when modal form is displayed'

9. Problem with draw order after calling modal a modal from from a modal form

10. Modal Form with Modal form using Control?

11. ActiveX DLL events won't fire when DLL shows Modal Form

12. How Do I Change A Modal Form To Non-Modal

 

 
Powered by phpBB® Forum Software