Click here to Skip to main content
15,886,963 members
Home / Discussions / C#
   

C#

 
AnswerRe: how can we send an email over exchange server using C# Pin
Yusuf5-Mar-09 18:30
Yusuf5-Mar-09 18:30 
GeneralRe: how can we send an email over exchange server using C# Pin
anupmadathil5-Mar-09 21:32
anupmadathil5-Mar-09 21:32 
GeneralRe: how can we send an email over exchange server using C# Pin
Yusuf6-Mar-09 3:41
Yusuf6-Mar-09 3:41 
GeneralRe: how can we send an email over exchange server using C# Pin
kedarkarthik29-Dec-09 19:20
kedarkarthik29-Dec-09 19:20 
QuestionSelect free port automatically Pin
yesu prakash5-Mar-09 17:34
yesu prakash5-Mar-09 17:34 
AnswerRe: Select free port automatically Pin
ABitSmart5-Mar-09 18:58
ABitSmart5-Mar-09 18:58 
AnswerRe: Select free port automatically Pin
Bharat Jain5-Mar-09 19:48
Bharat Jain5-Mar-09 19:48 
Questioncomponents and verbs Pin
damichab5-Mar-09 16:39
damichab5-Mar-09 16:39 
Hi,

I have written a basic UserControl (called bevel). On it I have a Label and nothing else. I can successfully add this to a form and it does what it should.

From various web examples, I added code to add a 'verb' to the design time context menu. The resulting file looks like...


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

using System.ComponentModel.Design;

namespace MyNameSpace.Components
{
    [Designer(typeof(BevelDesigner))]
    public partial class Bevel : UserControl
    {
        public Bevel()
        {
            InitializeComponent();
        }
    }

    internal class BevelDesigner : ComponentDesigner
    {
        public override System.ComponentModel.Design.DesignerVerbCollection Verbs
        {
            get
            {
                DesignerVerbCollection v = new DesignerVerbCollection();
                v.Add(new DesignerVerb("Flip", new EventHandler(FllipHandler)));
                return v;
            }
        }

        private void FllipHandler(object sender, System.EventArgs e)
        {
            //MessageBox.Show("You clicked the test designer verb!");
        }
    }
}



Trouble is now the component does not display on the design form any more but rather sits at the bottom rather like the 'Timer' component does. When I right click on the component, the verb "Flip" has been added, however. I was wondering if it was somehow bypassing the "Bevel.Designer.cs" form and if so what I could do about it. I was also wondering if the above example was for 'raw' code and was incompatible with a project done in an IDE. I am using Visual Studio 2008 should that makes any difference. I figure I am missing something really basic as every example has a variation of the above example without any further elaboration.

Regards,

David Bailey.
AnswerRe: components and verbs Pin
0x3c06-Mar-09 2:13
0x3c06-Mar-09 2:13 
GeneralRe: components and verbs Pin
damichab6-Mar-09 12:40
damichab6-Mar-09 12:40 
Questionhow to open a form when click on custom property item in propertygridview. Pin
dilipmca045-Mar-09 16:33
dilipmca045-Mar-09 16:33 
AnswerRe: how to open a form when click on custom property item in propertygridview. Pin
Dragonfly_Lee5-Mar-09 17:55
Dragonfly_Lee5-Mar-09 17:55 
Questionhow to open a form when click on custom property item in propertygridview Pin
dilipmca045-Mar-09 16:29
dilipmca045-Mar-09 16:29 
Questionnested lists problem Pin
VitroBlue5-Mar-09 15:42
VitroBlue5-Mar-09 15:42 
AnswerRe: nested lists problem Pin
Christian Graus5-Mar-09 15:55
protectorChristian Graus5-Mar-09 15:55 
AnswerRe: nested lists problem Pin
Luc Pattyn5-Mar-09 23:51
sitebuilderLuc Pattyn5-Mar-09 23:51 
Questionexporting to Excel Pin
avvaru.murali5-Mar-09 15:18
avvaru.murali5-Mar-09 15:18 
AnswerRe: exporting to Excel Pin
Christian Graus5-Mar-09 15:52
protectorChristian Graus5-Mar-09 15:52 
AnswerRe: exporting to Excel Pin
Ramkithepower5-Mar-09 19:24
Ramkithepower5-Mar-09 19:24 
Questionneed help..... How to link the current website that i am browsing to the textbox ? Pin
YiXiang_895-Mar-09 15:04
YiXiang_895-Mar-09 15:04 
AnswerRe: need help..... How to link the current website that i am browsing to the textbox ? Pin
_Maxxx_5-Mar-09 15:12
professional_Maxxx_5-Mar-09 15:12 
GeneralRe: need help..... How to link the current website that i am browsing to the textbox ? Pin
YiXiang_895-Mar-09 15:19
YiXiang_895-Mar-09 15:19 
GeneralRe: need help..... How to link the current website that i am browsing to the textbox ? Pin
Christian Graus5-Mar-09 15:56
protectorChristian Graus5-Mar-09 15:56 
GeneralRe: need help..... How to link the current website that i am browsing to the textbox ? Pin
YiXiang_895-Mar-09 16:13
YiXiang_895-Mar-09 16:13 
GeneralRe: need help..... How to link the current website that i am browsing to the textbox ? Pin
_Maxxx_5-Mar-09 17:41
professional_Maxxx_5-Mar-09 17:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.