Mats codemix

Mats codemix

A little c#, a litte .NET and throw in some c++ and you get a nice Spaghetti

Mats codemix RSS Feed
 
 
 
 

Archive for Uncategorized

Good tips on VB6 string handling

Doing (temporary) development in VB6 i found these tips on string handling in VB6
http://www.aivosto.com/vbtips/stringopt.html
Find additional tips on http://www.aivosto.com/vbtips/

Searching with google

If i want to search this site with google.

Code

<form action="http://www.google.com/search" method="get">
<fieldset>
<input type="hidden" name="sitesearch" value="mats.gardstad.se/matscodemix/" />
<input type="text" name="q" size="31" maxlength="255" value="" />
<input type="submit" value="Google Search" />
</fieldset>
</form>

Powershell v2 CTP3 - profiles

I wanted to change the colours for powersshell error messages. Easily done by using this code

# Set Error and warning colours
$hostprivate = (Get-Host).PrivateData
$hostprivate.ErrorBackgroundColor = "red"

First i put the code in Profile.ps1 in C:\Documents and Settings\myname\Mina dokument\WindowsPowerShell.
This caused the powerhell scripting environment (ISE) to spit out some errors while starting:
Property ‘ErrorBackgroundColor’ cannot be [...]

Powershell-script to find files not having specified text

I had the need to find files “not containing” a certain text.
I scanned the web and found all and nothing. A few dedicated search tools and editors (some payware and some free).
Since i use powershell a lot in my work i wanted to use that environment. Finding a file based on a certain text [...]

A mix of code

I wanted to have a place to jot down ideas and things i discover working as a software developer.  I hope to expand this blog to something useful if not fore everyone but at least for me.