[program-l] Re: ctrl+f2 in vs 2005 and 2008

  • From: "Jacob Kruger" <jacob.kruger@xxxxxxxxxxxxx>
  • To: <program-l@xxxxxxxxxxxxx>
  • Date: Mon, 8 Dec 2008 14:01:41 +0200

Mine also seems not to want to offer the same functionality when it
comes to the form, but, for that specific event, it's easy enough to
just go into design view, tab around till on the form object, and just
hit enter since that seems to generate event handlers for a default for
the controls including the form itself.

HTH

Jacob Kruger
jacob.kruger@xxxxxxxxxxxxx
+27 (11) 808-6492

-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx
[mailto:program-l-bounce@xxxxxxxxxxxxx] On Behalf Of Justin Daubenmire
Sent: Monday, 08 December, 2008 1:53 PM
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: ctrl+f2 in vs 2005 and 2008

Jacob,

I cannot seem to get this to work for forms. For example, after the 
initialize line of syntax, I type frmMain. but cannot seem to find any 
events for frmMain in the list, only properties of the form. I'm trying
to 
find frmMain.Load to generate the load event using the += syntax.

Can you find form events using this syntax?

In asp.net it would be frmMain.PageLoad ... I'm not sure if this +=
syntax 
will work for form events? maybe just control events?


Justin


----- Original Message ----- 
From: "Jacob Kruger" <jacob.kruger@xxxxxxxxxxxxx>
To: <program-l@xxxxxxxxxxxxx>
Sent: Monday, December 08, 2008 6:08 AM
Subject: [program-l] Re: ctrl+f2 in vs 2005 and 2008


> Just tested a version that I should have mentioned since have
found/used
> it before.
>
> If I'm in the code behind file (.cs), and sort of around the start of
> the class itself, just below the Initialize.... line, I type in
> something like:
> btnOne.Click +=
>
> I get a prompt telling me to hit tab to accept the new handler string,
> and then another prompt to hit tab again to generate the event handler
> code, and it automatically generates the method/function, including a
> command to generate something like a not handled/implemented exception
-
> something I suppose meant to remind you if you don't go add any real
> functionality as such, but, yes this will also work, since the line of
> code above ends up looking like this:
> btnOne.Click += new EventHandler(btnOne_Click);
>
> and the event handling code appears like this initially:
>        void btnOne_Click(object sender, EventArgs e)
>        {
>            throw new NotImplementedException();
>        }
>
> Stay well
>
> Jacob Kruger
> jacob.kruger@xxxxxxxxxxxxx
> +27 (11) 808-6492
>
>
> -----Original Message-----
> From: program-l-bounce@xxxxxxxxxxxxx
> [mailto:program-l-bounce@xxxxxxxxxxxxx] On Behalf Of Justin Daubenmire
> Sent: Monday, 08 December, 2008 12:45 PM
> To: program-l@xxxxxxxxxxxxx
> Subject: [program-l] Re: ctrl+f2 in vs 2005 and 2008
>
> Hi Jacob,
>
> Thanks for the post. I'll have to try this one out. However, I was
> googeling
> and seen that there is a way in the code editor to type the name of a
> control and a dot to get the events of the control and when you press
> enter
> the code editor will create the event handler for you. So, if I had a
> text
> box named txtName, while in the code editor, I could type
> txtName.TextChanged and press enter and the  event handler would be
> autogenerated and put in the code editor. Those are not the exact
steps,
> but
> that was the overall concept. This seems to be a quicker way of
creating
>
> event handlers than having to use the way you just outlined.
>
> Has any c#.net coders figured out a way to do this task?
>
> Thanks!
>
> Justin
>
> From: "Jacob Kruger" <jacob.kruger@xxxxxxxxxxxxx>
> To: <program-l@xxxxxxxxxxxxx>
> Sent: Monday, December 08, 2008 2:12 AM
> Subject: [program-l] Re: ctrl+f2 in vs 2005 and 2008
>
>
>> Ok.
>>
>> Also using C# mostly nowadays, and for some reason it doesn't really
> let
>> you use those drop down boxes, where VB.Net does.
>>
>> In C#, I tab around the forms, then hit F4 on the relevant control to
>> enter the properties dialogue section of the window, then shift tab
> till
>> you get to the part of the interface that let's you choose which set
> of
>> entries you want to view, and there go left/right over things like
>> properties, events (that's the one you want) since I think this is
>> almost a form of tab control, then tab back to the list, move up and
>> down to the event you want, and hit enter, and it'll take you to
> what's
>> now been added in the code behind window/file.
>>
>> Got this whole process from someone else on this list, but can't
>> off-hand remember who, but it works.
>>
>> Stay well
>>
>> Jacob Kruger
>> jacob.kruger@xxxxxxxxxxxxx
>> +27 (11) 808-6492
>>
>>
>> -----Original Message-----
>> From: program-l-bounce@xxxxxxxxxxxxx
>> [mailto:program-l-bounce@xxxxxxxxxxxxx] On Behalf Of Justin
Daubenmire
>> Sent: Monday, 08 December, 2008 12:15 AM
>> To: program-l@xxxxxxxxxxxxx
>> Subject: [program-l] Re: ctrl+f2 in vs 2005 and 2008
>>
>> I'm using c#.net and not vb.net so this functionality in the code
> editor
>> may
>> be different between languages.
>>
>> I've googled this and apparently it is but I cannot figure out how to
>> enable
>> the events list in c#.net or at least find how to get a list of
events
>> to
>> choose from.
>>
>> Anyone using c#.net ... how do you use the code editor and the drop
>> downs at
>> the top of the code editor to get to the list of events to choose
one?
>>
>> Thanks!
>>
>> Justin
>>
>> ----- Original Message ----- 
>> From: "Justin Daubenmire" <justind@xxxxxxxxx>
>> To: <program-l@xxxxxxxxxxxxx>
>> Sent: Sunday, December 07, 2008 4:59 PM
>> Subject: [program-l] Re: ctrl+f2 in vs 2005 and 2008
>>
>>
>>> Jacob,
>>>
>>> I've tried your suggestion but when I arrow onto my text box, then
>> press
>>> alt+up arrow to close it, it automatically brings me to the
>> declaration of
>>> the text box rather than simply populating the events list so I can
>> tab
>>> onto it.
>>>
>>> Any other thoughts?
>>>
>>> Thanks!
>>>
>>> Justin
>>>
>>>
>>> ----- Original Message ----- 
>>> From: "Jacob Kruger" <jacobk@xxxxxxxxxxxx>
>>> To: <program-l@xxxxxxxxxxxxx>
>>> Sent: Sunday, December 07, 2008 2:12 PM
>>> Subject: [program-l] Re: ctrl+f2 in vs 2005 and 2008
>>>
>>>
>>>> Only thing I can think of off-hand is that even if the relevant
>> control
>>>> seems to be selected initially in that types drop down, first open
> it
>>
>>>> using Alt + down, move up/down a bit, then close it using Alt + up
>> arrow,
>>>> then tab across to the events list since it sounds like the control
>> isn't
>>>> actually selected as such, and therefore the events list combo box
>> isn't
>>>> getting populated as such.
>>>>
>>>> Stay well
>>>>
>>>> Jacob Kruger
>>>> Blind Biker
>>>> Skype: BlindZA
>>>> '...Fate had broken his body, but not his spirit...'
>>>>
>>>> ----- Original Message ----- 
>>>> From: "Justin Daubenmire" <justind@xxxxxxxxx>
>>>> To: <program-l@xxxxxxxxxxxxx>
>>>> Sent: 07 December, 2008 8:14 PM
>>>> Subject: [program-l] ctrl+f2 in vs 2005 and 2008
>>>>
>>>>
>>>> All,
>>>>
>>>> I have no clue why this is happening but in vs 2005 and vs 2008 I
>> cannot
>>>> find any events or methods for any controls that I have on a form
>> when in
>>>> the code editor. I am using a win forms app, have a text box on the
>> form,
>>>> but when in the code editor, and pressing ctrl+f2, I arrive at  the
>> types
>>>> drop down. I tab once and arive at the members list box. However,
>> there
>>>> is no events or methods for the text box control such as text
> changed
>>
>>>> event, data binding, or whatever events the control has. If I tab a
>> third
>>>> time, I arive back at the types drop down. Do others have this same
>>>> situation?
>>>>
>>>> Do I have something setup incorrectly in my IDE? This worked fine
in
>> vs
>>>> 2003 but for some reason, I am missing something somewhere... can
>> anyone
>>>> help?
>>>>
>>>> Thanks!
>>>>
>>>> Justin
>>>>
>>>> ** To leave the list, click on the immediately-following link:-
>>>> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
>>>> ** If this link doesn't work then send a message to:
>>>> ** program-l-request@xxxxxxxxxxxxx
>>>> ** and in the Subject line type
>>>> ** unsubscribe
>>>> ** For other list commands such as vacation mode, click on the
>>>> ** immediately-following link:-
>>>> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
>>>> ** or send a message, to
>>>> ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
>>>
>>> ** To leave the list, click on the immediately-following link:-
>>> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
>>> ** If this link doesn't work then send a message to:
>>> ** program-l-request@xxxxxxxxxxxxx
>>> ** and in the Subject line type
>>> ** unsubscribe
>>> ** For other list commands such as vacation mode, click on the
>>> ** immediately-following link:-
>>> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
>>> ** or send a message, to
>>> ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
>>
>> ** To leave the list, click on the immediately-following link:-
>> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
>> ** If this link doesn't work then send a message to:
>> ** program-l-request@xxxxxxxxxxxxx
>> ** and in the Subject line type
>> ** unsubscribe
>> ** For other list commands such as vacation mode, click on the
>> ** immediately-following link:-
>> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
>> ** or send a message, to
>> ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
>>
>> No virus found in this incoming message.
>> Checked by AVG - http://www.avg.com
>> Version: 8.0.176 / Virus Database: 270.9.15/1835 - Release Date:
>> 2008-12-07 4:56 PM
>> ** To leave the list, click on the immediately-following link:-
>> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
>> ** If this link doesn't work then send a message to:
>> ** program-l-request@xxxxxxxxxxxxx
>> ** and in the Subject line type
>> ** unsubscribe
>> ** For other list commands such as vacation mode, click on the
>> ** immediately-following link:-
>> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
>> ** or send a message, to
>> ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
>
> ** To leave the list, click on the immediately-following link:-
> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
> ** If this link doesn't work then send a message to:
> ** program-l-request@xxxxxxxxxxxxx
> ** and in the Subject line type
> ** unsubscribe
> ** For other list commands such as vacation mode, click on the
> ** immediately-following link:-
> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
> ** or send a message, to
> ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com
> Version: 8.0.176 / Virus Database: 270.9.15/1835 - Release Date:
> 2008-12-07 4:56 PM
> ** To leave the list, click on the immediately-following link:-
> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
> ** If this link doesn't work then send a message to:
> ** program-l-request@xxxxxxxxxxxxx
> ** and in the Subject line type
> ** unsubscribe
> ** For other list commands such as vacation mode, click on the
> ** immediately-following link:-
> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
> ** or send a message, to
> ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq 

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: