473,668 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form events problem

13 New Member
Hello!

I have a problem. I have to change the size of a control added to a Form when the user resizes the Form. I use the Resize event and change the size of the control in the method which is called with the Resize event. So I implemented the docking behaving of the control because it is a part of a third-party library and it doesn't have the docking property. But if the user changes the size of a Form that the control doesn't fit in the form after resizing so the width must decrease, the control totaly collapses. I solved this with use of the ResizeBegin event. When it is called, the controls size changes to width=1, height=1 and then when the Resize event is triggered, the control get resized to the proper size. Everything goes well but the problem still remains when the user maximizes the Form and then Restores it. In that case the ResizeBegin event isn't triggered and the control does not resize to widht=1, height=1. So what I want is to resize the control to widht=1, height=1 before the Form gets resized when the user Restores the Forms size but I didn't find any event that will do this job. My problem could be solved by overloading a method that is called when the user wants to Restore the Form's size but I didn't find any to do this.

Thanks for any suggestions!

Regards.
Mar 17 '08 #1
6 1843
Plater
7,872 Recognized Expert Expert
Does that control not have the Anchor property?
Mar 17 '08 #2
Funky
13 New Member
Unfortunately no. It's a part of a third-party library.
Mar 17 '08 #3
Plater
7,872 Recognized Expert Expert
Hmm so that thirdparty is wrapping some native win32 components and they're not managed controls?
Mar 17 '08 #4
Funky
13 New Member
I'm using the toolStripEx control from the Syncfusion Essential Studio. I wrote them about docking for this control, they said that it has not implemented. Maybe It'll be in the future :).

I'm searching for a work-around. I could fire a trigger befor the form gets Resized or to overload/re-implement a method that Resizes the Form but don't know how could be this reachable :\.
Mar 17 '08 #5
Plater
7,872 Recognized Expert Expert
You can try checking WindowState (minimized/maximized/etc) and see if this helps?

What features does toolStripEx offer over the .NET toolstrip?
Mar 17 '08 #6
Funky
13 New Member
Actually it has docking option but it doesn't work.

I tried with maximized state but it is not helpful to check it. I just have to catch the moment before the Form gets restored.

I searched the functionality of the control (it's called toolStripEx) for any property that would not let the control to collapse if the parent container gets smaller than the control itself.

:\ damnit
Mar 17 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2030
by: David C. Barber | last post by:
upsized an MDB to ADP/SQL Server 2000 under Access 2000. All the DAO code that I've changed to ADO code is working fine, HOWEVER the form Record Source itself does not seem willing to return data. I've set the Record Source to both the query, and the SQL contained within the query, and although the system pauses long enough to have gone out and retrieved the data, I can't see it. The form itself remains gray. In addition: ...
19
3603
by: Raposa Velha | last post by:
Hello to all! Does any of you want to comment the approach I implement for instantiating a form? A description and an example follow. Cheers, RV jmclopesAThotmail.com replace the AT with the thing you know ;-) After discovering that access 2000 support form properties (I'm a
0
1865
by: jphelan | last post by:
I have a subform that works fine until you import it into a new database when it crashes if you try to open it in either disign or form view. The form, "Attendees_Subform" in my application was pattern after the same form used in the MS template, "Event Management.mdb" application that is downloaded from the MS Template Gallery on their website. I narrowed down the problem to the Control Source in the, "Attendees_Subform using the...
8
12090
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the combobox. What is the solution? Thank you in advance.
12
12931
by: swingingming | last post by:
Hi, in the NorthWind sample database, when clicking on the next navigation button on the new order record with nothing on the subform (order details), we got an order with nothing ordered. How can we prevent this from happening? Thanks. ming
10
4942
by: Drakier Dominaeus | last post by:
This is my first time posting here, so please forgive me if I do anything incorrectly. I've been learning C# and working with different things and decided I wanted to get into Multi-Threading. My problem is that I must not be doing it right because only some of the stuff works as would be expected. I'll post what exactly is happening, then I'll post the sample code I'm using that is giving me the problems. I'm sure its something I've...
2
3004
by: Aaron Queenan | last post by:
Is there any way to know whether the OnItemCheck is being called in response to a user action (mouse or keyboard) as opposed to the form loading? I have a class which derives from System.Windows.Forms.ListView. Among other features, it enables the checkboxes and overrides the OnItemCheck() method. I have placed this ListView on a form and use form.ShowDialog() to display it whenever the user presses a certain button. If the user...
7
23058
by: Scott Emick | last post by:
How can I disable events for the controls on a form? I tried setting the form's enable property to false, but that doesn't stop events from firing on its controls. I need to temporarily disable a form and load values into controls without any events firing, then re-enable the form. -- Scott Emick Web Programmer
0
2417
by: hmm | last post by:
Hi all I have two problems: Problem #1: I'm using a .NET Form with the property 'FormBorderStyle' set to 'None'. The idea is to completely cover the area of that Form with a UserControl. In order to be able to move that Form around with the mouse I have to implement EventHandlers for the MouseDown, MouseUp and MouseMove event. Now the problem I have is these Events will never be fired because the entire dialog is covered by the...
4
2135
by: Joergen Bech | last post by:
Just out of curiosity: What is your favorite method of making sure that anything that happens on a form, only happens in response to a single, external event? Take the example below. I have made it as simple as I could: Put two textboxes on a form, paste the code and run it. The idea is that whatever is typed in one box is displayed in the other box, only reversed. This is a simple example of two repre- sentations of the same data on...
0
8893
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8799
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8586
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5681
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4380
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2026
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1786
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.