Advertisement

Results for "Author: jon davis"

1_2002 #111204
Cool Logic (Lots of simple but handy functions)

These are some functions that I use all the time that Microsoft left out of core VB. Some of them are more useful than others, like IsEven()/IsOdd() and IsLeapYear() and PlaySound() and SaveString() and GetPathDir(). Some of this source is borrowed and modified from other authors' sources, but at least half of it is original. I have rewritten this code to put it into a class module, and then I compiled it to a DLL. I use the DLL all the time in projects. Very handy!

2_2002-2004 #113669
Code Stringifier

It's a common problem everyone has faced. You have a couple paragraphs of text that you want to store in a constant. But how do you manage quotation marks, line breaks, and backslashes in a quoted string? This solution will let you paste text into a textbox, and it will spit out the source code in order to store that text properly in a variable. Outputs to Javascript, VBScript, VB6, VB.Net, C#, and HTML. Very handy!

2_2002-2004 #117684
Cool Logic (Lots of simple but handy functions)

These are some functions that I use all the time that Microsoft left out of core VB. Some of them are more useful than others, like IsEven()/IsOdd() and IsLeapYear() and PlaySound() and SaveString() and GetPathDir(). Some of this source is borrowed and modified from other authors' sources, but at least half of it is original. I have rewritten this code to put it into a class module, and then I compiled it to a DLL. I use the DLL all the time in projects. Very handy!

2_2002-2004 #118034
CUri - A URL parser class

This is a URL parser class that accepts a URL (such as "http://www.blah.com/") and parses out: - the protocol - the hostname - the username - the password - the port - the resource - the querystring Enjoy!

2_2002-2004 #118793
Default functions and properties

Make a function or a property the default function or property for that object.

2_2002-2004 #126722
DHTML Javascript Console

This is a demonstration of using dynamic content and event handling in Internet Explorer to input data from the user (as with a textbox, only without a textbox) and update the web page accordingly. The same method of keypress trappings and DHTML dynamic content can be applied in a far more graphical way, but the concept would be the same. In this particular demonstration, JavaScript commands are merely displayed in plain text. However, one could utilize graphics-based text in a graphics-intensive UI if he chose to. Requires Internet Explorer 5.0+. (Implemented in v6.0 though.)

2_2002-2004 #129447
HTM2ASP Redirector (easy .htm/.html to .asp redirector)

Have you ever needed to switch the file extension of a large set of files from .htm to .asp but you were worried about other web sites linking to the .htm files? You could create a new redirector .htm file for every file you switch to .asp. Or, you can just download and set up this solution! Just drop this file somewhere on the web server (remember the URL), and then configure the Custom Errors settings in IIS (by default pointing to 404b.htm) to point to this file's URL. That's it!

2_2002-2004 #130743
Play sound in C# without DirectX

Why load DirectX to play a sound when you can just call the Windows library?

2_2002-2004 #130744
Guess A Number game

This is a simple demonstration of a simple console application written in C#.

2_2002-2004 #130745
The Return of the Variant (ver. 6)

A Variant structure written in C#, ideal for VB.NET 2005 or C# 2002/2003/2005 developers who miss the old (and, in the eyes of many, ugly) VB6 Variant. A Variant is a type that contains any type of variable and can be worked with "automagically" without heavy typecasting procedures. (System.Object is not a variant equivalent because you cannot do things like addition with it.) One important difference about this structure: It becomes what you do to it. So if the value is a string and you add an integer of 12, the value becomes an integer. If you want it to remain the same, you should typecast first--for example, add "12" rather than (int)12. Changes for v2: - All type properties ("String", etc.) are now private. - Added implicit/explicit custom operators, so typecasts now work naturally. For example: string myString = (string)myVariant; // no longer myVariant.String ... float myFloat = (float)myVariant; // no longer myVariant.Float ... bool myBool = (bool)myVariant; // no longer myVariant.Boolean .... Changes for v3: Quite a few. Added DateTime support. Implemented IConvertible. Changed all the private type name properties to public "To[type]()" methods. Changed the naming convention to conform to IConvertible. Changes to v3.1: Removed many unnecessary if statements. Made some documentation updates. Changes to v4: Removed the "Type becomes what you do with it" rule for numeric operations. Example: adding an integer of 1 to a float of 1.1 results in a float of 2.1 rather than an integer of 2. Changed operator overloads to automatically adjust the type if the operation causes the resulting value to extend numerically beyond the value of the type. For example, if an integer (Int32) operation results in a value than can fit into an integer, the value is changed to a long (Int64). Changes to v5: Changed operator overloads so that if auto-converting to a compatible type, the new type is not smaller than the previous type; Made changes to CBln() to default to True if the object is a non-empty string; Added lots of documentation. Change to v5.1... it's IsNumberable, not IsNumerable. :) Also, To[Type]() should default to the specified type. And SmartMath() method name changed to VariantArithmetic(). Changes in v6... Added TimeSpan type support; added IsDate, IsTimeSpan; updated operator overloads, including equality (==).

3_2004-2005 #132212
Code Stringifier

It's a common problem everyone has faced. You have a couple paragraphs of text that you want to store in a constant. But how do you manage quotation marks, line breaks, and backslashes in a quoted string? This solution will let you paste text into a textbox, and it will spit out the source code in order to store that text properly in a variable. Outputs to Javascript, VBScript, VB6, VB.Net, C#, and HTML. Very handy!

3_2004-2005 #136228
Cool Logic (Lots of simple but handy functions)

These are some functions that I use all the time that Microsoft left out of core VB. Some of them are more useful than others, like IsEven()/IsOdd() and IsLeapYear() and PlaySound() and SaveString() and GetPathDir(). Some of this source is borrowed and modified from other authors' sources, but at least half of it is original. I have rewritten this code to put it into a class module, and then I compiled it to a DLL. I use the DLL all the time in projects. Very handy!

3_2004-2005 #136578
CUri - A URL parser class

This is a URL parser class that accepts a URL (such as "http://www.blah.com/") and parses out: - the protocol - the hostname - the username - the password - the port - the resource - the querystring Enjoy!

3_2004-2005 #137337
Default functions and properties

Make a function or a property the default function or property for that object.

3_2004-2005 #145266
DHTML Javascript Console

This is a demonstration of using dynamic content and event handling in Internet Explorer to input data from the user (as with a textbox, only without a textbox) and update the web page accordingly. The same method of keypress trappings and DHTML dynamic content can be applied in a far more graphical way, but the concept would be the same. In this particular demonstration, JavaScript commands are merely displayed in plain text. However, one could utilize graphics-based text in a graphics-intensive UI if he chose to. Requires Internet Explorer 5.0+. (Implemented in v6.0 though.)

3_2004-2005 #147991
HTM2ASP Redirector (easy .htm/.html to .asp redirector)

Have you ever needed to switch the file extension of a large set of files from .htm to .asp but you were worried about other web sites linking to the .htm files? You could create a new redirector .htm file for every file you switch to .asp. Or, you can just download and set up this solution! Just drop this file somewhere on the web server (remember the URL), and then configure the Custom Errors settings in IIS (by default pointing to 404b.htm) to point to this file's URL. That's it!

3_2004-2005 #149286
Play sound in C# without DirectX

Why load DirectX to play a sound when you can just call the Windows library?

3_2004-2005 #149287
Guess A Number game

This is a simple demonstration of a simple console application written in C#.

3_2004-2005 #149288
The Return of the Variant (ver. 6)

A Variant structure written in C#, ideal for VB.NET 2005 or C# 2002/2003/2005 developers who miss the old (and, in the eyes of many, ugly) VB6 Variant. A Variant is a type that contains any type of variable and can be worked with "automagically" without heavy typecasting procedures. (System.Object is not a variant equivalent because you cannot do things like addition with it.) One important difference about this structure: It becomes what you do to it. So if the value is a string and you add an integer of 12, the value becomes an integer. If you want it to remain the same, you should typecast first--for example, add "12" rather than (int)12. Changes for v2: - All type properties ("String", etc.) are now private. - Added implicit/explicit custom operators, so typecasts now work naturally. For example: string myString = (string)myVariant; // no longer myVariant.String ... float myFloat = (float)myVariant; // no longer myVariant.Float ... bool myBool = (bool)myVariant; // no longer myVariant.Boolean .... Changes for v3: Quite a few. Added DateTime support. Implemented IConvertible. Changed all the private type name properties to public "To[type]()" methods. Changed the naming convention to conform to IConvertible. Changes to v3.1: Removed many unnecessary if statements. Made some documentation updates. Changes to v4: Removed the "Type becomes what you do with it" rule for numeric operations. Example: adding an integer of 1 to a float of 1.1 results in a float of 2.1 rather than an integer of 2. Changed operator overloads to automatically adjust the type if the operation causes the resulting value to extend numerically beyond the value of the type. For example, if an integer (Int32) operation results in a value than can fit into an integer, the value is changed to a long (Int64). Changes to v5: Changed operator overloads so that if auto-converting to a compatible type, the new type is not smaller than the previous type; Made changes to CBln() to default to True if the object is a non-empty string; Added lots of documentation. Change to v5.1... it's IsNumberable, not IsNumerable. :) Also, To[Type]() should default to the specified type. And SmartMath() method name changed to VariantArithmetic(). Changes in v6... Added TimeSpan type support; added IsDate, IsTimeSpan; updated operator overloads, including equality (==).

4_2005-2006 #164764
Play sound in C# without DirectX

Why load DirectX to play a sound when you can just call the Windows library?

Languages
Top Categories
Global Discovery