Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi guys, this one's been bugging me for over a year now, and I've finally snapped. In VB6, once you enter the code window for a form the objects are displayed in the top left dropdown listbox in alphabetical order - not so in .NET, they seem to be arranged in the order they were created.

 

The reason I've snapped now is that I've been working on a program by myself for a little over a year now, and some of the forms have upwards of 50 objects on them - meaning that if I were to initialize a new event to one of the objects I'd have a needle/haystack job on my hands instead of simply going through the listbox alphabetically.

 

Is there a way to sort the box, or am I to be stuck in torment until I crack and do the traditional sniper rifle/church tower job in my local town center?

 

Thanks!

Chaos is merely logic beyond human comprehension
Posted

Hey!

In the properties window you can change the view and see the events of each form object. You can from there choose which event you want to work on. The properties window is still sorted alphabetically.

 

Not exactly what you're looking for but I feel safer passing the tower square ;)

 

/Kejpa

Posted

And I forgot....

Be patient, in Whidbey (VS2005) the sort order in the form is back

I'm currently doing most things with VB2005 Beta 1 and I'm sooooo happy :D

 

/Kejpa

Posted

You mean the actual events and overides in the code window yeah?

 

No, you cant alphabetise them. But, you can use 'Regions' to organise them nicely:

 

eg:

 

#Region "Form subs/events"
Private Sub Form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'blah blah
End Sub
Private Sub Form_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
'more blah
End Sub
#End Region

 

This way, you have substantially more control over your code neatness than in VB6! ;)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...