Click here to Skip to main content
15,911,896 members
Home / Discussions / C#
   

C#

 
AnswerRe: Datetime value in property Pin
Guffa19-Dec-05 10:58
Guffa19-Dec-05 10:58 
QuestionConnecting to an Oracle Database when a Windows Form loads Pin
apoc50319-Dec-05 8:16
apoc50319-Dec-05 8:16 
AnswerRe: Connecting to an Oracle Database when a Windows Form loads Pin
Dave Kreskowiak19-Dec-05 8:32
mveDave Kreskowiak19-Dec-05 8:32 
GeneralRe: Connecting to an Oracle Database when a Windows Form loads Pin
apoc50319-Dec-05 8:37
apoc50319-Dec-05 8:37 
QuestionHow to fire KeyDown event of any control (ex: ListBox) Pin
Baris Y19-Dec-05 7:56
Baris Y19-Dec-05 7:56 
AnswerRe: How to fire KeyDown event of any control (ex: ListBox) Pin
Judah Gabriel Himango19-Dec-05 9:18
sponsorJudah Gabriel Himango19-Dec-05 9:18 
GeneralRe: How to fire KeyDown event of any control (ex: ListBox) Pin
Baris Y19-Dec-05 11:06
Baris Y19-Dec-05 11:06 
GeneralRe: How to fire KeyDown event of any control (ex: ListBox) Pin
Judah Gabriel Himango19-Dec-05 11:40
sponsorJudah Gabriel Himango19-Dec-05 11:40 
Inheriting is easy to do. Just create a class like this:

public class MyListBox : ListBox
{
   ...
   
   // Calling this function will fire the KeyDown event
   protected override void OnKeyDown(KeyEventArgs e)
        {
            base.OnKeyDown(e);
        }

   // Here we'll make a function that can be called anywhere from your code.
   public void FireKeyDownEvent(Keys pressedKeys)
   {
       OnKeyDown(new KeyEventArgs(pressedKeys);
   }
}


As far as adding your control to the toolbox, you should be able to do it just by adding new item to toolbox, and when it asks you for the item, have it point to your dll containing MyListBox. I recommend you look at some of the articles here at Codeproject on how to design a good custom control fit for the toolbox.
GeneralRe: How to fire KeyDown event of any control (ex: ListBox) Pin
Jared Parsons20-Dec-05 4:51
Jared Parsons20-Dec-05 4:51 
GeneralRe: How to fire KeyDown event of any control (ex: ListBox) Pin
Baris Y20-Dec-05 6:30
Baris Y20-Dec-05 6:30 
AnswerRe: How to fire KeyDown event of any control (ex: ListBox) Pin
Baris Y20-Dec-05 6:38
Baris Y20-Dec-05 6:38 
QuestionCheck User Data Pin
tadhg8819-Dec-05 6:14
tadhg8819-Dec-05 6:14 
AnswerRe: Check User Data Pin
Jared Parsons19-Dec-05 6:22
Jared Parsons19-Dec-05 6:22 
QuestionTransactions Problem Pin
webhay19-Dec-05 6:09
webhay19-Dec-05 6:09 
AnswerRe: Transactions Problem Pin
Guffa19-Dec-05 6:38
Guffa19-Dec-05 6:38 
GeneralRe: Transactions Problem Pin
webhay19-Dec-05 9:09
webhay19-Dec-05 9:09 
QuestionSliding Dialog box Pin
VPMahank19-Dec-05 5:44
VPMahank19-Dec-05 5:44 
AnswerRe: Sliding Dialog box Pin
ekynox19-Dec-05 10:17
ekynox19-Dec-05 10:17 
GeneralRe: Sliding Dialog box Pin
VPMahank20-Dec-05 3:47
VPMahank20-Dec-05 3:47 
QuestionTelnet Protocol Pin
smsulliva19-Dec-05 5:44
smsulliva19-Dec-05 5:44 
Question.NET 2.0 Serial Ports Pin
Alan Staton19-Dec-05 5:30
Alan Staton19-Dec-05 5:30 
AnswerRe: .NET 2.0 Serial Ports Pin
c#guy381119-Dec-05 7:17
c#guy381119-Dec-05 7:17 
GeneralRe: .NET 2.0 Serial Ports Pin
Alan Staton19-Dec-05 7:32
Alan Staton19-Dec-05 7:32 
GeneralRe: .NET 2.0 Serial Ports Pin
Alan Staton20-Dec-05 9:06
Alan Staton20-Dec-05 9:06 
QuestionFxCop - Passing by Ref or Out Pin
MrEyes19-Dec-05 5:06
MrEyes19-Dec-05 5:06 

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.