Windows Forms Snippets


Shows how to focus a control in a Windows Form. If you are working with Web forms it is very simple, you just use "WebControl.Focus()" but this does not work for Windows Forms.

10 December, 2013   

VB.Net code for Fullscreen

01 March, 2011   

Mouse Move Paint . A simple program for drawing using mouse move event in vb.net 2005 version... This code is compatible with : VB 2005, VB 2008, VB 2010 Steps For Creation:- --------------------------- 1. Change the background color of the form1 as white. 2. Then, double click the form and change the event as mouse move click event. 3. Now,...

By default Symfony displays forms in tables, with each new input being a table row. If you want to display your forms more semantically with fieldsets and lists, Symfony has a list formatter built in. You can tell an individual form to display as a list using the code below.

23 January, 2013   

Adjusted for daylight saving or standard time as appropriate.

It's an unfortunate necessity that you need to write different code for windows sometimes or at the very least load different libraries since there is no fork(), etc. This is how you can tell.

06 July, 2013   

Draws angled text on a canvas at position X,Y.

03 January, 2013   

Choose a color scheme as found in the Display control panel applet

Here's how to invoke a click on a Windows Start button from code.

his snippet was created under the inspiration of using the django-multilingual package. Also an additional code is used to solve the problem of saving the many-to-many relations in embedded forms (http://trac.symfony-project.org/ticket/5867#comment:21). The idea is that in all embedded I18n forms appears checkbox "delete" for each...

19 June, 2012   

Adjusts the brightness of a color by a specified amount in range -255..255.

27 February, 2013   

An example code for tableless forms

13 December, 2011   

You can use to find and replace text in a variable. This script created by Bruce Phillips, one of the leading posters at MacScripter.

'The following code snippet displays the "Shut Down Windows" dialog. 'Is uses undocumented API function in shell32.dll

This tip shows how to extract the associated icon and draw it into a small area of the form (e.g. Notepad icon)

13 October, 2012   

You need to give each element a sequentially numbered tab index value in order for this script to work properly.

20 August, 2014   

Javascript function to check or uncheck all the checkboxes in a form.

06 February, 2012   

ASP Forms and User Input from HTML form

01 June, 2013   

How to Embed code for Windows Media

Delphi snippet details dynamically calling windows apis with encryption.