I have a class library that I want to expose so that I can make a com
call to a member of that class but obviously I am doing something
wrong in my code because I can't seem to see the member and I cant
register the dll.

Here is my code

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace Calendarpopup
{
    [ComVisible(true)]
    public partial class FrmCalendar : Form
    {


        //Constructor

        public
            FrmCalendar(string sdate)
        {
            InitializeComponent();
            if (sdate.Length == 0)
            {
               textholdate.Text =
monthCalendar1.TodayDate.ToShortDateString();
            }
            else
            {
                textholdate.Text = sdate.ToString();
            }


        }

        //Destructor
        ~FrmCalendar()
        {
            //Resource Cleanup
        }

        private DateTime selectedDate;

        [ComVisible(true)]
        public string SelectedDate()
        {
            return textholdate.Text;
          //  get { return selectedDate.ToShortDateString(); }
        }

        //If it hit cancel send nothing
        [ComVisible(true)]
        public void butCancel_Click(object sender, EventArgs e)
        {
            textholdate.Clear();
            selectedDate.ToString("");
            this.Close();
            SelectedDate();
        }

        [ComVisible(true)]
        public void butOK_Click(object sender, EventArgs e)
        {

            this.Close();
            SelectedDate();
        }

        private void monthCalendar1_DateChanged(object sender,
DateRangeEventArgs e)
        {
            textholdate.Clear();
            textholdate.Text = selectedDate.ToShortDateString();
        }

        private void textholdate_TextChanged(object sender, EventArgs
e)
        {

        }

        private void FrmCalendar_Load(object sender, EventArgs e)
        {

        }
    }
}

It compiles and links but I get this warning message

warning MSB3214 WorkflowCal.dll  does not contain any types that can
be registered for COM Interop.


and like I said I can not register the dll.  BTW I make the assembly
COM Visable

Anybody have any ideas?

Thanks
Josh

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web 
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---

Reply via email to