#Region "Change Background Color of MDIParent : bgcolor()"
'to change the background color of mdiparent
'for more : http://acomputerengineer.wordpress.com
Private Sub bgColor()
Dim child As Control
For Each child In Me.Controls
If TypeOf child Is MdiClient Then
child.BackColor = Color.CadetBlue
Exit For
End If
Next
child = Nothing
End Sub
#End Region
Showing posts with label background. Show all posts
Showing posts with label background. Show all posts
Sunday, 22 September 2013
Change background color of MDIParent Form in VB.Net
Sunday, 28 October 2012
Wednesday, 22 February 2012
Set background color on mouse click
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
/*
<applet code="Brighter" width=300 height=400>
</applet>
*/
public class Brighter extends Applet implements MouseListener
{
int i;
Color color;
public void init()
{
color=new Color(i,i,i);
setBackground(color);
addMouseListener(this);
}
public void mouseClicked(MouseEvent me)
{
i+=10;
if(i>255)
{
i=255;
}
color=new Color(i,i,i);
setBackground(color);
repaint();
}
public void mouseEntered(MouseEvent me)
{
}
public void mouseExited(MouseEvent me)
{
}
public void mousePressed(MouseEvent me)
{
}
public void mouseReleased(MouseEvent me)
{
}
}
Subscribe to:
Posts (Atom)
