0
I’m developing an application that passes some information to users who are running it. The main idea is to make an informative track, however I have two problems that should be simple, what I would like as soon as the words start to enter the left, they immediately appear on the right, as is the majority.
The code remains for further 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";
}
}
}
has some outline / q model you want ?
– Rovann Linhalis
@Rovannlinhalis do not have a specific, I searched but did not find one that fits what I want, I found several that are equal or close to mine
– M. Marins
@M.Marins For Marquee you get the effect, at a certain cost, using a same Timer... but this "phantom presentation" form I have no idea how you could do
– Leandro Angelo
@Leandroangelo I’m researching a lot, I found an effect called Ishittestvisible that has to be used in WPF, however I’m not able to use it outside, and to do what I did in WPF is not so simple, and I’m not sure if it gives...
– M. Marins
I imagine something like this: https://www.quackit.com/html/codes/html_marquee_code.cfm but for windows Forms. but clarify "as soon as the words start to enter the left, they immediately appear on the right", in which position this would be on the screen ?!... where your current screen ?
– Rovann Linhalis
@Rovannlinhalis I edited the publication to facilitate...
– M. Marins