theDeSilva.com Andrew de Silva

Entries from January 2010

Using cmd.exe with VB.NET – Process.Start

January 27th, 2010 · No Comments · .NET

Here’s a quick function to show the use of System.Diagnostic.Process which will allow you to start another application using VB.NET. The example below is used to call svnadmin to create a new repository ( Subversion ) by grabbing the repository name. The function also checks to see whether the directory exist on the file system [...]

[Read more →]

Tags:····

VB.NET Database query return result as XML

January 25th, 2010 · No Comments · .NET

A simple VB.NET page that takes a ID variable and return the result as XML page. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 [...]

[Read more →]

Tags:···

Greasemonkey – Add button to page to call function within GreaseMonkey

January 21st, 2010 · No Comments · Javascript

Here’s a really quick way to add a button into an existing page and then have the button call a function that is within greasemonkey script. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19   window.addEventListener("load", function(e) { addButton(); }, false);   function addButton(){ [...]

[Read more →]

Tags:····

Resize image using VB.NET

January 21st, 2010 · No Comments · .NET

Here’s a quick function to resize image using VB.NET 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Sub ResizeImage(ByVal dir As String, ByVal fileName As String, ByVal percentResize As Double) ‘following code resizes picture [...]

[Read more →]

Tags:····

Save File Stream using VB.NET

January 4th, 2010 · No Comments · .NET

Here is a simple VB.NET that would allow you to post a file stream from Flex. The class below saves the file into a location on your server. To use it you can simply use HTTP POST and pass in the directory save location using the query string dir. I used a catch try block [...]

[Read more →]

Tags: