0

Let's take an example from android. Assume you send a message to someone and after message was send you can see (for a few seconds) kind of notification on the screen like Your message was send.

enter image description here

That is exactly what I would like to find in Winform. In my Winform app user click on the button and I would like to make kind of UI response, show him a message for a few sec, like Button clicked.

How to do it?

P.S. Actually I tried to find out how to do it, but everything that I found is kind of notification on the screen at the right bottom corner. It is not actually what I am looking for. I need something like you can see on screenshot. This text should appear in the form, not on the corner of the screen.

P.S 2 Tooltip also not what I am looking for. Tooltip is something that binded close to the button(view). I need kind of general UI response. User click on buttons and instead to show him a dialog that force user to move his mouse and close the dialog, I need kind of softy message that disappear after a few sec.

Aleksey Timoshchenko
  • 3,987
  • 2
  • 40
  • 80
  • 1
    have you **tried** anything so far? – Franz Gleichmann May 25 '20 at 10:58
  • 1
    @FranzGleichmann edited my question – Aleksey Timoshchenko May 25 '20 at 11:01
  • What about tootips https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.tooltip?view=netcore-3.1 ? – Miamy May 25 '20 at 11:03
  • You can take this thing [here](https://stackoverflow.com/a/51435842/7444103), change the shape to whatever you like and set whatever text you need. It can also be shown on top of other controls. – Jimi May 25 '20 at 11:35
  • To draw Arcs, see [here](https://stackoverflow.com/a/54794097/7444103), [here](https://stackoverflow.com/a/56533229/7444103), or [here](https://stackoverflow.com/a/54139910/7444103)... – Jimi May 25 '20 at 11:49

1 Answers1

0

I need kind of softy message that disappear after a few sec.

I think the tooltips are what you are looking for. The idea is you can programmatically control where to show a tooltip and when to hide it.

Please start a new WinForms project. Add three buttons, ToolTip and Timer to the form. Write the next event handlers (and bind them to the corresponding components):

    private void button_Click(object sender, EventArgs e)
    {            
        toolTip1.Show(((Button)sender).Text + " is pressed", this, 300, 300);
        timer1.Enabled = true;
    }

    private void timer1_Tick(object sender, EventArgs e)
    {
        timer1.Enabled = false;
        toolTip1.Hide(this);
    }

After demo starting you'll see a tooltip with certain text appearing at the same position for the 1 second.

Miamy
  • 2,092
  • 3
  • 13
  • 30