Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Elegant Ribbon Tech Support » Full Screen Mode Collapse All
Subject Author Date
d a Feb 5, 2010 - 5:01 AM

In .Net Forms to put a form into full screen mode including covering the Windows Start/Task Bar you set the property FormBorderStyle of the Form to None and set the WindowState to Maximised. However doing this with the ribbon bar fails to work aswell as the ribbon bar failing to paint correctly. I assume this is due to the Title bar missing from the Form.


eg



WindowState

FormBorderStyle

= FormWindowState.Maximized;= FormBorderStyle.None;

 



Is there a way this can still be achieved? 

d a Feb 10, 2010 - 8:16 AM

I appreciate the sample is not perfect such as being able to press the maximize more than once and no proper checking, but demonstrates the steps neccesary in order to get a ribbon bar application to full screen and paint correctly and then perform the same action again and to get it to repaint correctly which is what it now does.

As for the size the app after clicking "Restore" , you probably have to save some additional state or have some proper coding as this is only a sample.

Cheers

PS - I’m not one of the Prof-uis Support Guys and was only trying to be helpful in case others had issues with getting apps to full screen and COVER the windows Task bar

d a Feb 10, 2010 - 8:16 AM

I appreciate the sample is not perfect such as being able to press the maximize more than once and no proper checking, but demonstrates the steps neccesary in order to get a ribbon bar application to full screen and paint correctly and then perform the same action again and to get it to repaint correctly which is what it now does.

As for the size the app after clicking "Restore" , you probably have to save some additional state or have some proper coding as this is only a sample.

Cheers

PS - I’m not one of the Prof-uis Support Guys and was only trying to be helpful in case others had issues with getting apps to full screen and COVER the windows Task bar

Abdallah Gomah Feb 10, 2010 - 7:09 AM

I tried your code but when pressing the maximize button in full screen mode then press the minimize, the form height become very large.


Steps to reproduce the bug:


- Run the application.


- Press the maximize button.


- Press the maximize button again.


- Press the minimize button.


You will find the height of the form is too large.


 

d a Feb 9, 2010 - 2:50 AM

This is an Excellent example. Also thanks for the update you guys provided which I have included here for others
The following should replace the code in the mainframe, otherwise the app will not maximize correctly after the first time and there is a paint issue when the application loses focus using dual monitors



private void maximizeButton_Click(object sender, EventArgs e)
{    
    _heightBeforeMaximizing = Height;    ribbon1.CustomTitleBarEnabled = false;    
    if (formFrameSkinner != null)        
        formFrameSkinner.Dispose();    
    FormBorderStyle = FormBorderStyle.None;    
    //Have to make sure the app is not maximized before we attempt to maximize    
    //otherwise Ribbon Bar positions itself too high and partly covers the QAT icons.    
    //Also the Application will not cover the Windows Task Bar - this functionality is     
    //also the same for applications NOT using the Ribbon bar    
    if (WindowState == FormWindowState.Maximized)        
        WindowState = FormWindowState.Normal;    
    WindowState = FormWindowState.Maximized;
}

private void restoreButton_Click(object sender, EventArgs e)
{    
    FormBorderStyle = FormBorderStyle.Sizable;    
    ribbon1.CustomTitleBarEnabled = true; // also creates FormFrameSkinner for the paren form    
    WindowState = FormWindowState.Normal;    Height = _heightBeforeMaximizing;    formFrameSkinner =     FormFrameSkinner.GetFrameSkinnerByForm(this);
}

Note I have added an additional check for the Window State not provided by "Prof-UIS Technical Support", in order to get the windows application to behave correctly

PS I tried using the Code Snippets but the Preview looked terrible, so all in plain text - sorry

Technical Support Feb 8, 2010 - 8:02 AM

We prepared a project that illustrates how to use Elegant Ribbon with a borderless form. If you have any questions with it, please let us know.


RibbonOnBorderlessFormTest