This is a migrated thread and some comments may be shown as answers.

Maximized ShapedForm larger than Screen

17 Answers 233 Views
ShapedForm
This is a migrated thread and some comments may be shown as answers.
MattLynch
Top achievements
Rank 1
MattLynch asked on 02 May 2007, 07:48 AM
Hi,

This may seem a pretty dumb question to ask, but how do you restrict a maximized ShapedForm so that it only occupies the screen space?

Eg, when it's maximised, it's about 10pixels too large on every size, and the close button is clipped.  I added 10px of padding, but it looks stupid when the form is in a normal state.  Ideally, I am looking for a form which behaves like a normal form, but has rounded edges.

I'm running on Vista 64-bit w/ multiple monitors - maybe this is platform specific?  The sample applications also experience this issue.

All suggestions are welcome...

Regards,


Matt

17 Answers, 1 is accepted

Sort by
0
MattLynch
Top achievements
Rank 1
answered on 02 May 2007, 08:11 AM
Update/Hack: I've added the following code to the Form's resize event. (Though this would seem to lose the rounded edges at startup)

private Padding _oldPadding; 

public MyForm()
{
    InitializeComponent();
   
_oldPadding = this.Padding;
}


private
void MyForm_Resize(object sender, EventArgs e)
{
   
this.SuspendLayout();

    if (this.WindowState == FormWindowState.Maximized)
    {
        _oldPadding =
this.Padding;
       
this.Padding = new Padding(10);
    }
    else
       
this.Padding = _oldPadding;

    this.ResumeLayout();
}

I'd be interested to see what others have done to solve this.

0
Kiril
Telerik team
answered on 03 May 2007, 08:01 AM
Hello Matt,

We are glad to inform you of the following actions taken to solve your problems on Vista 64-bit:

1. There are no VirtualPC setup at the moment that can handle Vista 64-bit requirements.

2. We ordered special hardware, it will be available and installed by our Admin team next week so we will be able to test/solve Vista 64-bit issues ASAP.

3. There are special cases of this behavior observed even on WinXP, so we will double check our positioning logic for the shaped form also.

Sincerely yours,
Kiril
the telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
kilhoffer
Top achievements
Rank 1
answered on 23 Aug 2007, 05:38 PM
Any progress on this? I'm having the same issue.
0
Jack
Telerik team
answered on 24 Aug 2007, 03:40 PM
Hello kilhoffer,

Thank you for your question. Yes, we have fixed this issue. It will be publicly available in our next version (Q2 2007, due in September). If this is a show stopper for you, please open a support ticket and we will send you a custom build containing fix for the issue.

 
Best wishes,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Brian Lovejoy
Top achievements
Rank 1
answered on 12 Oct 2007, 02:36 PM
I am running Vista Ultimate 32-bit with a multiple monitor config and still have this issue even though I am using Q2 2007 release.  I don't know if it has any relevance, but I am running at a wide-screen resolution (1440 x 900).

Thanks!
Brian
0
Jack
Telerik team
answered on 12 Oct 2007, 04:15 PM
Hi Brian,

We believe that this issue has been fixed, and we could not reproduce it using the latest version of our product. Are you sure you are using RadControls for WinForms Q2 2007 Service Pack 1? 

Please make sure that you have removed DLLs bearing the older version from the Global Assembly Cache. Also, verify that the versions of the DLLs in the GAC are the latest ones from the Q2 Service Pack 1.

If the problem persists after you make sure you're using the latest versions of the DLLs, please send us a sample project illustrating the behavior and we will investigate it.

Thank you for your time. We appreciate your feedback.

Kind regards,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Brian Lovejoy
Top achievements
Rank 1
answered on 12 Oct 2007, 06:16 PM
Actually no, I do not have SP1.  Downloading now.  Hope to see some improvement in some of the UI rendering (as you can tell, been seeing some strange stuff).

Stay tuned & Thanks!
Brian
0
Brian Lovejoy
Top achievements
Rank 1
answered on 12 Oct 2007, 08:56 PM
Got sp1 installed, no change.  Any ideas?
0
MattLynch
Top achievements
Rank 1
answered on 13 Oct 2007, 07:03 AM
Hi,

I can confirm that this is still a issue in RadControls for WinForms Q2 2007 Service Pack 1, however it is easily fixed by changing the padding on the ShapedForm.  If you take a look at the ShapedForm for the Examples, you'll notice that they do not have the issue.  As a quick fix, you can add some padding to the form (3-4 pixels or so).  There are a bunch of other properties that you will also want to set, such as FormBorderStyle = FormBorderStyle.Sizable, which will restore the context menu in the tray.  I would recommend that you look (very) closely at the source code for the Example solution, as the default values for many RadControls are not optimal.

If you are creating a set of solutions based on this control library, then you might want to create a new assembly that encapsulates your changes.  

 eg:

public class VistaShapedForm : ShapedForm
{
   public VistaShapedForm()
    {
        // Fix up properties here
    }
}

public class VistaGridView : RadGridView
{
    // Fix up properties again...
}
0
Jack
Telerik team
answered on 15 Oct 2007, 12:45 PM
Hi all,

Matt, thank you for the useful advice.

We made several tests with the ShapedForm on different screen resolutions and DPI. We didn't manage to reproduce this issue.

We are attaching our test case application to this message. Can you confirm that the problem persists when you're using it? We ask you to send us your application so we can investigate this specific behavior further.

Please don't hesitate to write us if you have any additional questions. Your feedback is important to us.

All the best,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
MattLynch
Top achievements
Rank 1
answered on 17 Oct 2007, 03:45 PM
Hi Jack,

I have just run your test case, and the issue does not exist in your test case.  However, I have a tool which uses the ShapedForm and the issue still exists.  I am currently trying to find the differences between my application and the your test case.

Interestingly, the RadRibbonBar extends past the bounds of the ShapedForm in your test case.  I removed the title bar and replaced it with a RibbonBar, and it falls off the sides by about 2 pixels when the RoundedRect shape is removed.

I'll get back to you shortly.
0
MattLynch
Top achievements
Rank 1
answered on 17 Oct 2007, 04:48 PM

Hi Jack,

I had uninstalled Q2 and installed Q2 SP1, the initial Q2 assemblies remained in the solution I was using.  Uninstalling the controls doesn't remove the older controls completely.

However, while trying to diagnose the differences between the test case and my own solution, I found the following new issues:

  • The ShapedForm is incompatible with a StatusStrip - You are unable to resize a form, even though the StatusStrip indicates that you should be able to.
  • When a ShapedForm with a RadTitleBar is maximized, the RadTitleBar incorrectly allows the user to resize the form.
    • Double clicking the title bar to restore the form to a maximized state also fails - the form seems to remember the coordinates from the buggy resize.
  • The default value for the ShapedForm.FormBorderStyle = FormBorderStyle.None, which is seldom useful - The system tray's context menu fails to appear with this value in place.
    • The default value for this property should be FormBorderStyle.Sizable.


Telerik does not provide any control which simulates a StatusStrip and I find that Forms without status bars look weird.  What is the most appropriate Telerik control to use for a status bar?

Cheers,

Matt

0
Jack
Telerik team
answered on 18 Oct 2007, 03:32 PM
Hello MattLynch,

Thank you for reporting these issues. We will provide a StatusStrip control in our next major release Q3.

All other issues are recorded and will be fixed for the next service pack. In order to have StatusStrip and allow form resizing of ShapedForm, do not dock the StatusStrip at the bottom of the form. Instead, anchor it and leave some free space.

If you insist on using a RadControl, use RadToolStrip.

Thank you for your time. Please contact us again, if you have additional questions.

All the best,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
MattLynch
Top achievements
Rank 1
answered on 18 Oct 2007, 04:21 PM
Hi Jack,

While you are there, are you able to get the Text property from the RadRibbonBar to sync with the ShapedForm's Text property? 

There wouldn't be many times where the window's title would be different from the title displayed in the task bar - it would always be a bug.  At the moment, you need to set both properties in order for a application to look right - when you forget, the application looks really, really wrong.

Regards,

Matt
0
Jack
Telerik team
answered on 19 Oct 2007, 10:22 AM
Hello MattLynch,

At this time RadRibbonBar's Text property can be synchronized only manually. We will correct this in our next service pack.

Thank you for the suggestion. We added 500 points to your account.

Don't hesitate to contact us if you have further questions.

Kind regards,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Cathal
Top achievements
Rank 1
answered on 02 Aug 2012, 02:00 PM
Hi,

I was wondering if this issue have been fixed for Windows 7? When i Maximize the shaped form it is larger than the screen.

Thanks,
Cathal.
0
Boryana
Telerik team
answered on 06 Aug 2012, 02:07 PM
Hi Cathal,

Since we are still unable to reproduce the issue, I kindly ask you to provide us with a sample in the General Feedback thread you have opened.

Additionally, I kindly ask you to use one support channel to contact us. Posting the same question several times slows down our response time. Thank you for your understanding and cooperation.

All the best,
Boryana
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
ShapedForm
Asked by
MattLynch
Top achievements
Rank 1
Answers by
MattLynch
Top achievements
Rank 1
Kiril
Telerik team
kilhoffer
Top achievements
Rank 1
Jack
Telerik team
Brian Lovejoy
Top achievements
Rank 1
Cathal
Top achievements
Rank 1
Boryana
Telerik team
Share this question
or