finding how to generate "static" on a form or in a control

"static" the word? You want to draw the word "static" on form? "static" ???
 
control or rectangle filled with static on a form! geez, (static should be a cuss word at this point)
control or rectangle FILLED with STATIC, thats it! geez!


i just came up with a neato algorythm to make a large array/collection of random grey scale values, now i juts want to know what e.graphics,draw[shape?!]
to use to put the static grey scale(i think) values on the form without hogging the cpu at render time.

any static on a form in vb.net2005 stuff would be appreciated!:cool:

VB.NET:
[SIZE=2][COLOR=#0000ff]Public[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Class[/COLOR][/SIZE][SIZE=2] Form1[/SIZE]
[SIZE=2][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=2] rndRandom [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] Random()[/SIZE]
[SIZE=2][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=2] f1Color(9999) [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] Color[/SIZE]
[SIZE=2][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] Form1_Load([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] sender [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Object[/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.EventArgs) [/SIZE][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].Load[/SIZE]
[SIZE=2][COLOR=#008000]'generate random grayscale values i think[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] colRandColl [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Double[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] tempColorString [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] intRGBize [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]For[/COLOR][/SIZE][SIZE=2] i [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer[/COLOR][/SIZE][SIZE=2] = 0 [/SIZE][SIZE=2][COLOR=#0000ff]To[/COLOR][/SIZE][SIZE=2] 9999[/SIZE]
[SIZE=2]colRandColl = rndRandom.NextDouble()[/SIZE]
[SIZE=2]tempColorString = colRandColl.ToString()[/SIZE]
[SIZE=2]tempColorString = tempColorString.Remove(0, 2)[/SIZE]
[SIZE=2]tempColorString = tempColorString.Substring(0, 3)[/SIZE]
[SIZE=2]intRGBize = Convert.ToInt32(tempColorString)[/SIZE]
[SIZE=2]intRGBize = intRGBize - ((intRGBize \ 255) * 255)[/SIZE]
[SIZE=2]colRandColl = intRGBize.ToString[/SIZE]
[SIZE=2]f1Color(i) = Color.FromArgb(colRandColl, colRandColl, colRandColl)[/SIZE]
[SIZE=2][COLOR=#0000ff]Next[/COLOR][/SIZE]
 
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Class[/COLOR][/SIZE]
 
"static noise" it is. Change the bitmap image with its SetPixel method and display it.
 
Back
Top