473,395 Members | 1,411 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,395 software developers and data experts.

How do I remember a docked form's position?

4
Hi Guys,
I am trying to save the state of a docked form so that on restarting the program, I can restore the forms to the "last used" docked values.

What properties do I need to save and restore to achieve this.

TIA

John
Dec 4 '06 #1
1 1634
zl1jk
4
Sorted it myself.

Once I found the ManualDock Method, it was simple.

For those interested :

AnsiString S = ApplicationPath + "REGFILE.INI";
TStRegIni *R = new TStRegIni(S,true);
R->CurSubKey = "MainForm";
DLB->Index = R->ReadInteger("Panel",-1);
delete R;
.
.
.
switch (DLB->Index) // work out last panel type
{
case PW8:
DLB->Index = -1;
break;

case PW16:
DLB->Index = -1;
break;

case PW16S:
(TfrmPW16S*) DockWindow = dynamic_cast<TfrmPW16S*>(DfrmPW16S);
break;

case PW64:
DLB->Index = -1;
break;

case PW64R:
(TfrmPW64R*) DockWindow = dynamic_cast<TfrmPW64R*>(DfrmPW64R);
break;

default:
DLB->Index = -1;
break;
}
if (DLB->Index != -1)
{
DockWindow->Show();
DockWindow->ManualDock(pnlDockSite,NULL,alClient);
}
Dec 4 '06 #2

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

Similar topics

8
by: Yasutaka Ito | last post by:
Hi, Is there a way to find to which control the current control is docked against? For example, let's say I have panel1 and panel2 docked to left within a form. The panel1 is the first one on...
2
by: Dnf | last post by:
I have two panels (p1 and p2) docked on the right of the form and I want to third panel slide from right - but the problem is I want the third panel to be between p1 and p2 (under p2 and above p1)...
1
by: Bob (remove 'excise-' to reply) | last post by:
I've got a form with three controls: a left-docked richtextbox, a right-docked form, and a right-docked listview. When I resize the form, the listview increases and decreases, the splitter...
3
by: gregory_may | last post by:
Is it possible to smoothly resize a list box that is Docked? Its "Jumping" to the next text line as the form is resized. It would just look better if it smoothly resized ... like the other...
2
by: illegal.prime | last post by:
I'm surprised that I'm only know discovering this problem, but I suppose I've never needed to change the dimension that is opposite to the docking of the control. That is, when I've docked a...
0
by: nirdeshonline | last post by:
Hi, I have added a tabcontrol in windows form under c# 2.0 and docked it to FILL.then i kept a listbox on this docked tabcontrol .Listbox contains a collection of approx 10 strings as list items....
0
by: PRIYANKA BHATIA | last post by:
hi, i am making an c# application in which i hv designed a docked window form, whenever i run this application, my docked window is located on the top of desktop window, and it overlaps over the...
1
by: Julian Mensch | last post by:
My employer has developed an application in Delphi with a very complex user-interface that we may be transitioning to C# at some point. Our interface uses large numbers of tabbed sub-forms, with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
0
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...

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.