How keep the debug layout the same as the desktop layout - delphi

I try to have a similar layout during editing as well debugging. When running the program my structure and object inspector disappear. I did create my own desktop speedsetting, set the debug desktop to it as well, but as soon as the program runs structure and obejct inspector disappear. How can I prevent that?
A question related to this: the edit menu changes as well. A right click on a procedure name results in a popup menu with the first item being "find declaration". When debugging the first item is "close page". I find the find declaration item a fast way to find some code. Apart from that it is frustrating to lose one's code because you click "no" on the question to save the information (I know, it's my fault but menu's shouldn't change in my opinion).
Thanks,
Arnold

What version of Delphi? Dialogs and menus change between versions (and even between SKUs of the same version).
For the first, open Tools->Options->Environment Options and uncheck Hide designers on run in the Running group box (D2010, XE, and XE2), or Tools->Options->Environment Options and unchecking Hide designers on run in the Compiling and Running group box (D2007).
For the second: The right-click menu is called a context menu, meaning it displays what is appropriate in the context of when it's being shown. It's entirely appropriate for it to change depending on when and how you're using it; that's the way it's supposed to work.
Right-clicking on a .zip file in Windows Explorer is different than right-clicking on a Word .doc file, because they have different options based on context - a zip file has an 'Extract to...' option that the Word document doesn't have, because 'extracting' a Word document doesn't apply. Same applies to right-clicking a .exe file, which has the Run as Administrator option (Win7), as opposed to right-clicking a .pas file, which doesn't offer that option.

Related

File sort order lost in IDE

I'm constantly losing the sort order for the files in my Delphi projects:
How can I fix this? Is there a bug in my Delphi 10.4.2 IDE?
(Self answering because I finally found it, and I want to spare others the frustration)
You need to follow a specific sequence because the IDE interface closes the Sort By popup menu after every action:
If you click on e.g. Name, the IDE sorts the files once. The submenu closes immediately (i.e. no visual feedback) and nothing is remembered.
The trick is to first click on Auto Sort, then reopen the submenu, then click on Name.
Now when you save the project, the settings are written to the .local file and applied in later sessions:
<ProjectSortOrder AutoSort="-1" SortType="1">

How to remove the function minimize sidebar in Visual Studio 2019

How can I remove the little sidebar to the left of the code in Visual Studio 2019? I mean the little minus signs that appear next to each function or code block header and, if clicked, minimize that function or code block.
Is there a way to disable these?
The feature is known as "outlining" and enabling/disabling it is language-specific. In all cases, use the "Options" command from the "Tools" menu and then, in the left-hand pane of the displayed pop-up box, open the "Text Editor" node.
For C/C++ files, the option is under the "View" sub-node:
For C# files (and also Basic, F# and Python), it's under "Advanced":
For other languages, it's likely to be in one or other of those places, but I can't guarantee that. In all cases, changes only come into effect on files that are opened after the option is changed.
If you have another specific language for which you can't find this option, just let me know and I'll try to help.

How to close all IDE "New Edit Windows" (some of which are not visible)

Recently in the D7 IDE, I started using the "New Edit Window" option.
Now, it seems that I have several non-visible edit windows, because sometimes the title bar for a particular window will have the filename followed by a colon and number, as shown below.
This can be confusing, since sometimes use File, Open to open a .pas file and nothing seems to happen, because, I suspect the code is already in an open (but hidden) windows.
I've tried closing all the windows I can see, etc, but these title bars with a number following the filename keep re-appearing, sometimes floating over other editing windows.
Is there a surefire way to close all edit windows so I'm back to just having one?
Additional information in response to comments:
I am able to close the individual files (tabs) in window with the standard Ctrl-F4. And when the last file is closed, the window disappears as it should. But sometimes when I open a new file, it opens in a new editing window (as if I'd actually clicked on the "New Edit Window" option in the context menu.) It appears that there are several windows that were created by "New Edit Window" commands that are hidden and sometimes are used to display newly opened files.
Cause:
This is due to the Autosave Editor files option in the environment settings.
When this is enabled, windows that aren't explicitly closed within the project session are indeed remembered by that option. Although, there really are no hidden windows, just the count of previously created windows is stored.
Solution:
Delete the corresponding Delphi Desktop File (*.dsk) from the project folder, or manually edit that file and rewrite EditWindowCount=4 to EditWindowCount=1 within the [Modules] section.

Turn off context menu for Component applied by CnPack (design time)

After I installed cnPack, right clicking on a component in my form seems to have taken away any specific items that the component itself may have applied.
eg, right clicking on any Dev Express component will usually bring up version details. Now I get a bunch of other context menu items and the Dev Express ones have disappeared.
Is there a wizard or some other option I can disable to stop this? I can't find one anywhere.
Thanks
EDIT
Restarting Delphi fixed it in the short term - but has come back again so I'd still like to find a resolution to this....
Right-click menus are controlled by component editors, and AFAIK there can only be one component editor registered to a particular class type at a time. If CnPack's design-time package is loaded after DevExpress's design-time package, then CnPack's component editor will be the last one registered and take priority.

i lost windows 7 effects after accidently modifiying 'compiled resource script '?

my forms look dull and windows 95 like in a large project that i have been programming(cant program all over again) i accidently modified 'comiled resource script ' for that project using a text editor,when i reopened my project it asked if i want to recreate some file to which i clicked yes. now my form look dull and windows 95 style, adding xpmanifest component does bring them back to xp theme but what about windows 7,i do not have windows7/vista so i cant test if my forms behave like win7 forms on win7 or not(but probably they'l look and feel like xp) how to make them win 7 style again
help!
i am using delphi 2010
Under the Project | Options menu, select the Application Section, then make sure there is a check box in Enable runtime themes.
With this enabled your forms should look good in Vista and Windows 7.
This replaces the need for the XpManifest component.
You can further enhance the look by adjusting the property of GlassFrame on each form.
First check "Project/Options/Application/Enable runtime themes" checkbox; it should be checked to enable Vista/Win7 "look and feel"
Updated
Open your project in IDE. Click "Project" from the main menu. From the "Project" menu click "Options..." - it is the last item. Now "Project Options" dialog appears. On the left panel click "Application". On the right panel you should see "Enable runtime themes" checkbox. It should be checked to enable theme support.
By deleting *.res file you can loose some project settings, but you can restore these settings from the "Project Options" dialog.
More important than ALL the advice on how to fix it. GET A REVISION CONTROL SYSTEM! And mistakes like this will be easy to fix. Two popular ones that are easy to use
git
svn (this is actually a shell extension that includes SVN)

Resources