Click here to Skip to main content
15,891,745 members
Home / Discussions / C#
   

C#

 
QuestionLoading data from DB asynchronously in win forms Pin
Tridip Bhattacharjee18-Dec-10 6:58
professionalTridip Bhattacharjee18-Dec-10 6:58 
AnswerRe: Loading data from DB asynchronously in win forms Pin
Luc Pattyn18-Dec-10 7:18
sitebuilderLuc Pattyn18-Dec-10 7:18 
GeneralRe: Loading data from DB asynchronously in win forms Pin
Manfred Rudolf Bihy19-Dec-10 3:54
professionalManfred Rudolf Bihy19-Dec-10 3:54 
QuestionHow to port a 32 bit application on 64 bit OS Pin
Aseem Sharma18-Dec-10 6:55
Aseem Sharma18-Dec-10 6:55 
AnswerRe: How to port a 32 bit application on 64 bit OS Pin
Dan Mos18-Dec-10 7:06
Dan Mos18-Dec-10 7:06 
AnswerRe: How to port a 32 bit application on 64 bit OS Pin
jschell20-Dec-10 8:51
jschell20-Dec-10 8:51 
GeneralRe: How to port a 32 bit application on 64 bit OS Pin
Aseem Sharma20-Dec-10 15:42
Aseem Sharma20-Dec-10 15:42 
QuestionWrapped ToolStrip Control Pin
Rafone18-Dec-10 3:09
Rafone18-Dec-10 3:09 
Hi All;
I am using VS 2008 and I have wrapped a checkbox into a toolstrip. Works great but when in VS after shutting down the app the toolstrip is blank (shows no controls don't get the add contol drop down). If I close that project and open another then go back all is well.
Can someone tell me if this is a bug in my code or a bug in VS2008?

Here is the code for the wrapper;

using System;
using System.Windows.Forms;
using System.Windows.Forms.Design;

[System.ComponentModel.DesignerCategory("code")]
[ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ToolStrip | ToolStripItemDesignerAvailability.StatusStrip)]

public class ToolStripCheckBox : ToolStripControlHost
{
    public ToolStripCheckBox()
        : base(new CheckBox())
    {

    }


    public CheckBox CheckBoxControl
    {
        get { return Control as CheckBox; }
    }

    public bool Checked
    {
        get { return CheckBoxControl.Checked; }
        set { CheckBoxControl.Checked = value; }
    }

    public event EventHandler CheckedChanged;

    public void OnCheckedChanged(object sender, EventArgs e)
    {
        // not thread safe!
        if (CheckedChanged != null)
        {
            CheckedChanged(sender, e);
        }
    }

    protected override void OnSubscribeControlEvents(Control control)
    {
        base.OnSubscribeControlEvents(control);
        (control as CheckBox).CheckedChanged += OnCheckedChanged;
    }

    protected override void OnUnsubscribeControlEvents(Control control)
    {
        base.OnUnsubscribeControlEvents(control);
        (control as CheckBox).CheckedChanged -= OnCheckedChanged;
    }
}


thx

rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...

QuestionTrouble with ProcessInfo and UTF-8 parameters string containing a path and/or filename with japanese/chinese/german character for execute a Process Pin
plaguebreath18-Dec-10 2:21
plaguebreath18-Dec-10 2:21 
AnswerRe: Trouble with ProcessInfo and UTF-8 parameters string containing a path and/or filename with japanese/chinese/german character for execute a Process Pin
Luc Pattyn18-Dec-10 3:04
sitebuilderLuc Pattyn18-Dec-10 3:04 
Questionhow to get rid of Windows Mobile Device Center screen when i connect any device to my computer ? Pin
Gali197818-Dec-10 1:26
Gali197818-Dec-10 1:26 
AnswerRe: how to get rid of Windows Mobile Device Center screen when i connect any device to my computer ? Pin
Dave Kreskowiak18-Dec-10 3:05
mveDave Kreskowiak18-Dec-10 3:05 
AnswerRe: how to get rid of Windows Mobile Device Center screen when i connect any device to my computer ? Pin
RaviRanjanKr18-Dec-10 5:21
professionalRaviRanjanKr18-Dec-10 5:21 
QuestionWhat is the equivalent code in c#? Pin
Milad.Biroonvand17-Dec-10 22:05
Milad.Biroonvand17-Dec-10 22:05 
AnswerRe: What is the equivalent code in c#? Pin
RaviRanjanKr17-Dec-10 22:39
professionalRaviRanjanKr17-Dec-10 22:39 
AnswerRe: What is the equivalent code in c#? Pin
Richard MacCutchan17-Dec-10 23:34
mveRichard MacCutchan17-Dec-10 23:34 
AnswerRe: What is the equivalent code in c#? Pin
Luc Pattyn18-Dec-10 1:18
sitebuilderLuc Pattyn18-Dec-10 1:18 
GeneralRe: What is the equivalent code in c#? Pin
Dan Mos18-Dec-10 7:30
Dan Mos18-Dec-10 7:30 
GeneralRe: What is the equivalent code in c#? Pin
Henry Minute18-Dec-10 11:37
Henry Minute18-Dec-10 11:37 
QuestionRe: What is the equivalent code in c#? Pin
Luc Pattyn18-Dec-10 11:51
sitebuilderLuc Pattyn18-Dec-10 11:51 
AnswerRe: What is the equivalent code in c#? Pin
Henry Minute18-Dec-10 11:54
Henry Minute18-Dec-10 11:54 
AnswerRe: What is the equivalent code in c#? Pin
Luc Pattyn18-Dec-10 11:56
sitebuilderLuc Pattyn18-Dec-10 11:56 
GeneralRe: What is the equivalent code in c#? Pin
Henry Minute18-Dec-10 12:01
Henry Minute18-Dec-10 12:01 
AnswerRe: What is the equivalent code in c#? Pin
Pete O'Hanlon18-Dec-10 9:26
mvePete O'Hanlon18-Dec-10 9:26 
GeneralRe: What is the equivalent code in c#? Pin
Luc Pattyn18-Dec-10 9:31
sitebuilderLuc Pattyn18-Dec-10 9:31 

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.