|  | Command Prompt Here - Download the cmdhere.vbs file and away you go!. If you dont trust me and would never click on a .vbs file,
all you need to do is to create a .vbs with the following contents...
Set objShell = CreateObject("WScript.Shell")
objShell.RegWrite "HKCR\Folder\Shell\MenuText\Command\", "cmd.exe /k cd " & chr(34) & "%1" & chr(34)
objShell.RegWrite "HKCR\Folder\Shell\MenuText\", "Command Prompt Here"
Most importantly, this proves that there is some use for VB.
|
|  | Assemblies - Edit HKLM\Software\Microsoft\.NET Framework\AssemblyFolders and add in your own directory - these assemblies will then be added into the list of available assemblies within Visual Studio, so when you display the assembly browser window, your assemblies will show up in there too.
|
|  | Embedding Resources - To embed a resource (such as an XML file) into a project, choose file properties and then set the Build Action to "Embedded Resource". To read the data out again, get the executing assembly and do Stream s = assm.GetManifestResourceStream ( "name of resource" ). Note that the name of the resource includes the name of the assembly - if you are having problems working it out, run Reflector over your assembly and find the name of the resource that way.
|
|  | Creating .config files for Windows Forms Apps - To create a .config file for a Windows forms app, create a file called app.config and add it to your solution. This will automagically be converted into the appropriate .exe.config file when you compile your project.
|
|  | Choosing which .NET runtime is used - You can "choose" whether to use the workstation or server builds of .NET (MSCORWKS | MSCORSVR) by modifying either a registry key or setting an environment variable. The Reg key is HKLM/SW/MS/COMPLus/BuildFlavor=wks|svr, the environment variable is COMPLUS_BUILDFLAVOR=WKS|SVR. Neither of these is supported, but they work at present. To get the server build you need to either host in IIS, or create your own host in C++.
|
|  | Dont mix Absynthe, Port and Tequila - After a very heavy night in Barcelona at TechEd 03, some wag thought this would be a good idea. It is not. Since then this drink has attained legendary status in our team, and it gets wheeled out to unsuspecting individuals (such as the boss, who to his credit drunk it). Be afraid, very afraid.
|