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

RadForm NOT a drop-in replacement for a Widows Form ?

10 Answers 192 Views
Form
This is a migrated thread and some comments may be shown as answers.
erwin
Top achievements
Rank 1
Veteran
Iron
erwin asked on 22 Jul 2009, 05:02 PM

excuse the typo in the topic title ...

2009 Q2
When I simply change a Form to inherit from RadForm instead of standard WinForm Form, a lot of things don't work as expected anymore. For example Saving and Restoring Windows Position etc. does not work identically.

Also I have a problems with RadForms that were created with earlier Versions of the Controls. Here, anchored Buttons suddenly do not appear at the right place at runtime. I guess it has something to do with the non-client area drawing / sizing as the child controls seem so be moved upwards about the height of the window title bar.
These issues I cannot reproduce with sample code as it would mean setting up a development machine with older versions.

10 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 23 Jul 2009, 10:54 AM
Hi Erwin,

Thanks for writing. Regarding the Location issue I would like to ask you for some more details which I can use to test the scenario and reproduce any issues that you experienced. I have also performed a simple test on my machine by creating a RadForm, saving its initial location in a variable in the form constructor and restoring this location upon a button click - everything seems to work as expected.

However, we found some issues with anchored controls on a RadForm. We have addressed these issues and you can find the fixes in the latest internal build that we uploaded on our website.

I would be thankful if you try it out and see whether you still experience the undesired behavior with the anchored controls. Thanks for your time. I am looking forward to receiving the requested details.

Greetings,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
erwin
Top achievements
Rank 1
Veteran
Iron
answered on 23 Jul 2009, 01:25 PM
Deyan,

thanks for the quick response. The anchor problem seems to be fixed in the interim build.

The other issues I cannot test quicky, because I converted the affected windows (particulary the main window of the application) back to standard Form.
I'll write a little test appliction with my simple location persitence code in both RadForm and Standard Form when I find the time.

Would also be a nice feature for RadForm / Ribbon Form to be able to persist/restore its location/size correctly (including multi-montor support and decent fallback if monitor configuration has changed). Many apps fail to do this correctly, even some Microsoft apps. Very annoying if  windows open outside the current display or very close to the border or so that you cannot reach the app window tilte/menu.

Regards
Erwin
0
Deyan
Telerik team
answered on 24 Jul 2009, 02:04 PM
Hi Erwin,

I am happy that the Anchor issues are resolved. Regarding the location issue, I am not quite sure whether I have correctly understand you. Do you experience an undesired form behavior when setting the Location property of the RadForm control or the issues are related to Multi Monitor setups when the monitors are dynamically activated/deactivated?

Basically, the operating system should take care to place the form on the primary screen if the secondary one is detached. I am looking forward to receiving the requested details.

All the best,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
lkeel
Top achievements
Rank 1
answered on 01 Aug 2009, 04:26 AM
I am experiencing the same problem.  It is very easy to reproduce by saving the location in a project settings, then on startup set the location = new Point() created from the value stored in the settings.  This does not work though it does work on windows forms and even on ShapedForm.

-Lee
0
Deyan
Telerik team
answered on 03 Aug 2009, 02:35 PM
Hello lkeel,

Thanks for writing. Could you please try setting the StartPosition of the RadForm control to Manual before setting the Location property.

Basically, the value stored in the Location property is used just before the Form is shown on the screen. If you change this value earlier and if the Form StartPosition is defined to be different than Manual, you will not get the desired behavior. I have tested this by using a standard Windows Form and a RadForm - they both seem to behave the same way in my scenarios.

However, I would appreciate any details that might help me reproduce the kind of undesired behavior that you experience.

Thanks for your time.

Best wishes,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
lkeel
Top achievements
Rank 1
answered on 03 Aug 2009, 04:36 PM
This did fix my problem.  Thanks!
0
sayyed mahdi khadishi
Top achievements
Rank 2
answered on 03 Sep 2009, 12:44 PM
hi
2009 Q2
i make a userform that Inherited from radform. appearance of userform is true but my application form that Inherited from userform is not true (appearance ).
appearance of userform is standard form.
excuse me for bad english.
best regards
0
Deyan
Telerik team
answered on 03 Sep 2009, 01:26 PM
Hello Sayyed,

Thanks for writing. I am not quite sure that I correctly understand the issue you are experiencing. Could you please give us more details on your case so that we can check it out and see how we can help? Thanks for your time.

Kind regards,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
sayyed mahdi khadishi
Top achievements
Rank 2
answered on 03 Sep 2009, 07:05 PM
hi
i make a user form Inherited from radform:

public 

 

partial class UserForm : Telerik.WinControls.UI.RadForm //System.Windows.Forms.Form

 

 

{
}
then i used UserForm for application form:
public class FRMUsers : UserForm

 

 

{
}
appearance of UserForm is a RadForm but appearance of FRMUsers is not a RadForm.

thank you for your help.
good luck

0
Deyan
Telerik team
answered on 04 Sep 2009, 08:07 AM
Hello Sayyed,

I have performed a small test by creating a sample Windows Forms application with two standard forms - Form1 and Form2. I have changed the base class of Form1 to RadForm and the base class of Form2 to Form1. I was not able to reproduce any inheritance issues, both forms - Form1 and Form2 are RadForms.

However, if you continue experiencing this issue, I would like to ask you to prepare a similar sample project which I can use to investigate the case. Please note that you will have to open a new support ticket in order to be able to attach files.

Thanks for your time. Do not hesitate to write back if you need further assistance.

Best wishes,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Form
Asked by
erwin
Top achievements
Rank 1
Veteran
Iron
Answers by
Deyan
Telerik team
erwin
Top achievements
Rank 1
Veteran
Iron
lkeel
Top achievements
Rank 1
sayyed mahdi khadishi
Top achievements
Rank 2
Share this question
or