Facebook Sayfamızı Beğenin

28 Şubat 2016 Pazar

Ekran Koruyucu Yapımı - Csharp

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
 
namespace MyScreenSaver
{
 public partial class Form1 : Form
 {
 public Form1()
 {
 InitializeComponent();
 }
 Graphics g;
 private void Form1_Load(object sender, EventArgs e)
 {
 g = this.CreateGraphics();
 Cursor.Hide();
 }
 
private void timer1_Tick(object sender, EventArgs e)
 {
 Random rnd = new Random();
 
Font fnt = new Font("Tahoma", 12);
 
TextureBrush tbr = new TextureBrush(Image.FromFile("kaplan.jpg"), System.Drawing.Drawing2D.WrapMode.Tile);
 
g.DrawString("COELHO", fnt, tbr, rnd.Next(0, 1024), rnd.Next(0, 768));
 }
 
private void Form1_MouseDoubleClick(object sender, MouseEventArgs e)
 {
 this.Close();
 }
 }
}

Hiç yorum yok:

Yorum Gönder