473,385 Members | 1,449 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Form events problem

13
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 1829
Plater
7,872 Expert 4TB
Does that control not have the Anchor property?
Mar 17 '08 #2
Funky
13
Unfortunately no. It's a part of a third-party library.
Mar 17 '08 #3
Plater
7,872 Expert 4TB
Hmm so that thirdparty is wrapping some native win32 components and they're not managed controls?
Mar 17 '08 #4
Funky
13
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 Expert 4TB
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
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
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....
19
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...
0
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...
8
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...
12
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...
10
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....
2
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...
7
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...
0
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...
4
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.