Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Images in appointment header (Read 7241 times)
elwin68
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Feb 24th, 2010
Images in appointment header
Mar 2nd, 2010 at 2:01pm
Print Post  
I want to show an image in the appointment header if one or more resources are defined with that appointment.
I have added the image by the following command: app.Style.Image = My.Resources.ResImage

Now the image is shown before the appointment and the rest of the information is shifted to the right.

Is it possible to show the image inside of the header so the appointment is not shifted to the right?

Thanks in advance.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Images in appointment header
Reply #1 - Mar 2nd, 2010 at 2:33pm
Print Post  
Unfortunately, the image position cannot be adjusted. However, you can use custom drawing in order to layout the item contents the way, which best suits your application. The AdvancedItemDrawing sample does exactly what you need (and much more). You can have a look at it and reuse the code responsible for drawing the icon in the appointment's header.

Regards,
Meppy
  
Back to top
 
IP Logged
 
elwin68
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Feb 24th, 2010
Re: Images in appointment header
Reply #2 - Mar 2nd, 2010 at 3:01pm
Print Post  
Thanks, I will look at it.
  
Back to top
 
IP Logged
 
elwin68
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Feb 24th, 2010
Re: Images in appointment header
Reply #3 - Mar 11th, 2010 at 11:43am
Print Post  
I have looked at the AdvancedItemDrawing example project. It is still not clear for me how to show an header image if a resource is defined at a appointment.

Do you have a simple example or a step-by-step plan how this can be achieved.

Thanks in advance.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Images in appointment header
Reply #4 - Mar 11th, 2010 at 2:16pm
Print Post  
You can downloaded a simplified version of the sample from here:

https://mindfusion.eu/_samples/_sample_AdvancedItemDrawing.zip

The sample illustrates how to draw an icon in the item's header when there is at least one Resource associated with the item. You can easily modify the drawing code to support variety of options, because the item drawing is completely handled by the sample.

To test the sample, create an item and double-click on it with the right mouse button to add a resource to that item and see the icon being displayed.

Let me know if this is helpful.

Regards,
Meppy
  
Back to top
 
IP Logged
 
elwin68
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Feb 24th, 2010
Re: Images in appointment header
Reply #5 - Apr 13th, 2010 at 10:24am
Print Post  
Hello,

I found some time at last to look at your example.
Unfortunaly the example is written in C# and that's not my best language Sad

I have tried to convert it to VB but that's not so easy as I wish.
Is it possible to give me the example in VB?

Thanks in advance.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Images in appointment header
Reply #6 - Apr 13th, 2010 at 11:29am
Print Post  
Here is a VB version of the sample:

https://mindfusion.eu/_samples/_sample_AdvancedItemDrawingVB.zip

Regards,
Meppy
  
Back to top
 
IP Logged
 
elwin68
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Feb 24th, 2010
Re: Images in appointment header
Reply #7 - Apr 13th, 2010 at 11:35am
Print Post  
Thank, That looks more familiar Smiley
  
Back to top
 
IP Logged
 
elwin68
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Feb 24th, 2010
Re: Images in appointment header
Reply #8 - Apr 14th, 2010 at 7:45am
Print Post  
It's working. Great stuff.

Thanks for your example.
  
Back to top
 
IP Logged
 
elwin68
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Feb 24th, 2010
Re: Images in appointment header
Reply #9 - Apr 16th, 2010 at 12:32pm
Print Post  
After building and testing my Windows Form Application I changed the application type to Class Library such as I did before.
Unfortunally an errors occure when rebuilding the project.
When deleting the custom appointment again the rebuilding is done without errors.

I use VB2008 and when building to a Class Library the following errors occure:
  • The assembly 'MindFusion.Scheduling, Version=5.0.0.16706, Culture=neutral, PublicKeyToken=15f194f9a7df0ef6' is not registered for COM Interop. Please register it with regasm.exe /tlb.
  • The assembly "D:\My Documents\Visual Studio 2008\Projects\Calendar\Calendar\bin\Release\Calendar.dll" could not be converted to a type library. Type library exporter encountered an error while processing 'Calendar.clsCustomAppointmentViewer, Calendar'. Error: Error when loading type DLL file.

Why do the errors occure after adding the custom appointment?
How can I rebuild my project again?

Thanks in advance.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Images in appointment header
Reply #10 - Apr 16th, 2010 at 12:55pm
Print Post  
Have you tried marking the custom appointment class with the CLSCompliant and ComVisible attributes?

Regards,
Meppy
  
Back to top
 
IP Logged
 
elwin68
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Feb 24th, 2010
Re: Images in appointment header
Reply #11 - Apr 17th, 2010 at 12:22pm
Print Post  
The ComVisible attribute did the trick.

Thanks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint