Link to home
Start Free TrialLog in
Avatar of solipsist
solipsist

asked on

Calendar size change on Outlook custom form

I have created a custom Outlook 2000 form which contains a calendar control.  

The problem I have is that whenever I open the form the size of the calendar changes to that specified on the form properties - this also happens when I switch between the view and read pages.

What usually happens is that the calendar is set at 300 x 300 pixels, and when I make any changes it suddenly becomes tiny.

I have tried specifying the size of the calendar in the code window but this hasn't worked.

Can anyone help????

Cheers,

Sol.
Avatar of CJ_S
CJ_S
Flag of Netherlands image

Ho have you specified the size? The size of the outlook forms are specified in twips, so you'd better use like 3000 instead of 300 :-/...

Regards,
CJ
Avatar of solipsist
solipsist

ASKER

I tried that in the code window, but it made no difference...

The problem is that it wont stay the same size for longer than about 20 seconds.
Just re-read the question. And I think I know why. The calendar control is an activex control, meanign that it does not retain state. You need to do that yourself in code!

If you check the events of the form you will probably also see something like WriteProperties and ReadProperties and InitializeProperties. Together with that comes the PropertyBag as the parameter. You can use that propertybag to put in variables, and later one retrieve them again.

Assuming VB-code:
In the ReadProperties you use the PropBag.ReadProperty function (check the parameters, i can't recall them out of the top of my head, but DO use the last default parameter!!) Here you also place the resize code for the form. The WriteProperties will be called when the form is being closed (or hidden).  The InitProperties will only be called once, but please do use it also for resizing the form.

Just check them out...

regards,
CJ
I will give it a try & tell you how it goes...
I will give it a try & tell you how it goes...

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
ASKER CERTIFIED SOLUTION
Avatar of Netminder
Netminder

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial