Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Drawing;
- using System.Windows.Forms;
- namespace R805ImagenScroll
- {
- public partial class Principal : Form
- {
- public Principal()
- {
- InitializeComponent();
- }
- private void Principal_Load(object sender, EventArgs e)
- {
- string texto = "C#es un lenguaje de programación orientado a objetos.";
- using (Font font = new Font("Trebushet", 20))
- {
- Bitmap bmp = new Bitmap(600, 600);
- using (Graphics g = Graphics.FromImage(bmp))
- {
- g.FillRectangle(Brushes.White, new Rectangle(0, 0, bmp.Width, bmp.Height));
- for (int i = 0; i < 10; i++)
- {
- g.DrawString(texto, font, Brushes.CadetBlue, 50, 50 * i * 60);
- }
- }
- pbxImagen.BackgroundImage = bmp;
- pbxImagen.Size = bmp.Size;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement