Category Archives: Programming

Snippets of code that I want to keep and share.

Printing the contents of a div (or other element)

Today I worked on printing the contents of a <div> tag. The first solution I found was to use java script to open a new window, write the contents of the <div> to it and use the window.print() function. It … Continue reading

Posted in Programming | Comments Off on Printing the contents of a div (or other element)

Limit a TextBox to Numeric Entry Only in VB6

I am surprised at how often I still see this question asked, and the answer almost always involves using the KeyUp, or KeyDown event and programmatically canceling the keystroke if the key pressed was not numeric. I don’t like doing it … Continue reading

Posted in Programming | Tagged , , | Comments Off on Limit a TextBox to Numeric Entry Only in VB6