microcephalic Posted November 29, 2004 Posted November 29, 2004 Hi, does anyone know of an add-in for vb .net that will allow you to store snippets of code for future reference? Quote
Rick_Fla Posted November 29, 2004 Posted November 29, 2004 Planet Source Code: Code Bank Quote "Nobody knows what I do until I stop doing it."
microcephalic Posted November 29, 2004 Author Posted November 29, 2004 I compiled and installed the code bank project, but it is still not showing up as a possible selection in the add-in manager. Is this compatible w/ vs .net 2003? Quote
Rick_Fla Posted November 29, 2004 Posted November 29, 2004 To be honest I have not tired the code myself, I created my own program for this. Might have to leave a comment for the author of the control. Quote "Nobody knows what I do until I stop doing it."
microcephalic Posted November 29, 2004 Author Posted November 29, 2004 Would you mind sharing the one that you created? Thanks! Quote
Rick_Fla Posted November 29, 2004 Posted November 29, 2004 it's not an add-in to Visual Studio, it's part of a Tool Kit I created to help with coding and other projects I have at work. If I get some free time, I can try and seperate the code bank code from the tools kit. Quote "Nobody knows what I do until I stop doing it."
Mike_R Posted November 29, 2004 Posted November 29, 2004 I may not be understanding the issue here... but you can drag code from the Editor to the Toolbox and the Snippet is saved there. And it does persist between sessions. :) You can even add a tab to the Toolbox and call it "Code Snippets" if you like, or make different Tabs for different Projects: "DLL Code Snippets", "EXE Code Snippets", or whatever... Quote Posting Guidelines Avatar by Lebb
Rick_Fla Posted November 29, 2004 Posted November 29, 2004 My code bank is used for other languages (Coldfusion, VB6, VB.NET) so it was easier for me to track them. I think the add-in for VS helps organize if you have 100+ little snipps that you use. Using the toolbar is good for a few things, but hope you never have to re-install VS :) With a seperate program, you have a database that can be saved or backed up if needed, can search for code based off discription if needed. Quote "Nobody knows what I do until I stop doing it."
Mike_R Posted November 29, 2004 Posted November 29, 2004 Ah, ok, good point! And that PlanetSourceCode link you provided, above, looks very nice as well. :) Quote Posting Guidelines Avatar by Lebb
microcephalic Posted November 30, 2004 Author Posted November 30, 2004 I actually never knew that you could save code to the toolbar.... :o That's great though and should work well for my purposes! Thanks for the help! :) Quote
Mike_R Posted November 30, 2004 Posted November 30, 2004 Yes, drag it over and it pops right in. Then you can right-click on it and choose "Rename" to give it a clearer Title if you want. There are lots of little new tricks for the IDE, mostly involving Window-Docking, for Visual Studio. If you still have the laminated "Getting Started" installation card, the inside and back have a whole lot of tips & tricks listed and illustrated. Most of them are very useful... Quote Posting Guidelines Avatar by Lebb
Rick_Fla Posted November 30, 2004 Posted November 30, 2004 I use this feature to setup regions on my forms that I use on a regular basis, file description and making sure Options Strict and such is on, it is a very useful feature. Quote "Nobody knows what I do until I stop doing it."
Mike_R Posted November 30, 2004 Posted November 30, 2004 I guess you are talking about VB.Net then? You can ensure that the entire Project defaults to 'Option Strict On' by choosing Alt|Project|Properties... Then under 'Common Properties' choose 'Build'. You'll see selections for 'Option Explicit' and 'Option Strict', best use 'On' for both! Once you do this, you no longer have to explicitly state it within your Class Modules, you can just forget all about it. :) I think there is a way to set this as the default for All Projects. I believe I did this at one time, but I no longer remember how... Quote Posting Guidelines Avatar by Lebb
VBAHole22 Posted December 1, 2004 Posted December 1, 2004 laminated "Getting Started" installation card Is this available online somewheres like in a pdf that you know of? Quote Wanna-Be C# Superstar
Mike_R Posted December 1, 2004 Posted December 1, 2004 I can't seem to find it on the Web. The key line on the inside of this card reads: "Highlights of the Visual Studio .Net 2003 IDE" But Google is bust on that. Let me sort of outline some of the key aspects: (1) Tabbed Window Docking: The most obvious one is how the windows dock. Drag a window around, without releasing the mouse, and you'll see the various positions they can dock in. Release when satisfied. What's new with the .Net IDE is that if you drag towards the tabs at the bottom of one of the windows, the windows will "overlay" into the same space, where clicking on a tab activates the window. (Sorry, this is tough to describe without a picture... but I bet you've found this one already on your own...) (2) Code Snippets: Drag Text into the Toolbox window and the Snippet witl become an Icon within the Toolbox. It can then de dragged back into the Editor window whenever needed. Right-click on this Snippet to either (a) Rename it's Title or (b) Delete it altogether. (3) Window Auto-Hide: This one is tricky to find, but powerful. First dock a window to any side. It must be docked first. Then to the left of the [x] button you'll notice what looks like a Push-Pin/Tack thingy. Hover over that and the Tooltip will say "AutoHide". Click it, and the window will compress to an Icon on the side. Uses minimal space. Click on this icon whenever you want and it will slide out like a tray. But it stays docked which is nice -- that is, once it loses focus (if, say, you click within the Text Editor again) and it will close by itself. Very slick. If you prefer it to stay docked and open (that is, not AutoHide) then open it again and click the "AutoHide" Push-Pin icon again. (4) The Task List Manager shows a listing of all current syntax errors and other problems. Double click on any of them to Goto the line of code in question. You can also easily add your own Bookmarks within your code by putting // TODO comments ('TODO in VB.Net). Add something like this: // TODO: Remember to add .Dispose Code And it will show up as "TODO: Remember to add .Dispose Code" within the Task List. Double click on that, and it will take you right there. :) You can also make your own Custom *tags*. I added "Dbgg" to mine, so when I put //Dbgg: Be sure to ... it shows up in the Task List. "Dbgg" for me highlights something that I know that I need to fix, but isn't necessarily a Syntax error or something that the Compiler would pick up for me. But you can make your own tags by choosing Alt|Tools|Options... then choose the "Environment" folder and then the "Task List" choice. Type a name in the 'Name' textbox and then click the 'Add' button. And you're done! :) (5) Outlining: I'm sure you know that you can Hide/Show code with the automatic Outlining or adding your own #Region... #EndRegion blocks, but you can also simply hide any arbitrary area by choosing.... Hmmm... It does not seem to work in C#. Ok, well, in VB.Net you can (a) Select some text (b) Right-Click on it, and © choose Outlining|Hide Selection. But the truth is, this hiding does not persist between sessions, so it's of limited value. Hopefully they'll improve this for 2005. Anyway, that's most of the useful stuff... I hope that this was clear enough without pictures! Quote Posting Guidelines Avatar by Lebb
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.