I'm developing an application that passes some information to users who are running it. The main idea is to make an informative track, but I have two problems that should be simple, which I would like as soon as I start to enter the words on the left, they immediately appear on the right, as is the majority.
The code is for clarification.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void timer1_Tick(object sender, EventArgs e)
{
string text = System.IO.File.ReadAllText(@"\...\Texto de Exemplo.txt", Encoding.UTF7);
label1.Text = text;
label1.Left -= 7;
if (label1.Left < 0 && (Math.Abs(label1.Left) > label1.Width))
{
label1.Left = this.Width;
}
}
private void Form1_Load(object sender, EventArgs e)
{
label1.Left = Screen.PrimaryScreen.Bounds.Width;
timer1.Start();
int c = Screen.PrimaryScreen.BitsPerPixel;
int w = Screen.PrimaryScreen.Bounds.Width;
int h = Screen.PrimaryScreen.Bounds.Height;
int altura, largura;
altura = h - 77;
largura = w - 10;
Width = largura;
Top = altura;
Left = 4;
string f;
f = "teste";
}
}
}