Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1149
Put a progressbar in the alert
posted

Dear sir/madam,

I need to show some "work in progress" animation so the user can understand  something is happening.

Is it possible to show a progressbar in the UltraDesktopAlert ?
Or any other suitable control?

Or, is it possible to insert some html code to perform any kind of wait animation? If yes could you share an example?

Thanks in advance

Ciao
Gianni

Parents
No Data
Reply
  • 4940
    Verified Answer
    Offline posted

    One way to do this would be to use the UltraActivityIndicator with the UltraDesktopAlert by retreiving the UltraDesktopAlertWindowInfo from the Show method.

    Code example below:

     

    // Create a UltraDesktopAlert and UltraActivityIndicator
    UltraDesktopAlert dalert = new UltraDesktopAlert();
    UltraActivityIndicator aindicator = new UltraActivityIndicator();
                
    // Configure the size of the activity indicator
    aindicator.Size = new System.Drawing.Size(100, 20);
    
    // Set the desktop alert style
    dalert.Style = DesktopAlertStyle.Office2007;
    
    // Call the Show method of the desktop alert and grab the returned window info
    UltraDesktopAlertWindowInfo ainfo = dalert.Show("Your Caption", "Process is running...");
    
    // Get the window control
    Control desktopalertwindow = ainfo.DesktopAlertWindow;
    
    // Give the activity indicator a location on the desktop alert
    aindicator.Location = new Point(desktopalertwindow.Width - 105, desktopalertwindow.Height - 25);
    
    // Add the activity indicator to the desktop alert
    desktopalertwindow.Controls.Add(aindicator);
    
    // Start the activity indicator animation
    aindicator.Start();
    

     

Children