I use Delphi XE2 on Windows 8. I have ported an D2009 application to XE2 and suddenly the save dialog (TSaveDialog) is very slow.
When Project/Options/Application/Runtime Themes is set to Enable Runtime Themes:
=>
When I open the save dialog the window freezes for about a minute (sometimes I can close the window but have to wait about a minute until I can open the dialog again (or another TOpenDialog). The new Vista style save dialog is shown.
If I try to run this exe on a PC with Windows 7, the app hangs upon start (I did also try with XP compatibility mode without success).
When Project/Options/Application/Runtime Themes set to none:
=>
Save dialog works well (fast) but the old style dialog is shown, se example below:
This exe works well on a PC with Windows 7 (though with the old style dialog).
Ps. My old exe-file compiled with D2009 on a Win 7 PC works however well on both the Win 7 and 8 PC:s, and shows the dialogs correctly using the new Vista dialog style.
Could it be some permission rights in Win 8/7 causing this? I use IDE FIX PACK 5.4,
Thanks,
Thomas
I found what the problem is. I use {$MAXSTACKSIZE $4000000} and this causes the save dialogue to freeze for about a minute.
The reason for this hefty stack size is that I use a recursive algorithm (that I now probably need to remake).
Reproduce as follows (XE2):
Create a new VCL forms application
Place a TSaveDialog1 on the form
Place a Tbutton with OnClick event
`
Begin
if SaveDialog1.Execute then
MessageDlg('ok', mtInformation,[mbOk], 0);
end;
`
4: Open the project source file and put the following rows:
//{$MAXSTACKSIZE $3500000} //this is a decimal value of 5 5574 528 OK!
{$MAXSTACKSIZE $4000000} //this is a decimal value of 6 7108 864 Not OK!
Run and click the button. Give a dummy file name and press save. Nothing happens. Keep on clicking the button for 60 seconds. The dialogue will finally close.
Change to the smaller stack size $3500000. Now the program works well. Thanks for all tips.
Related
After upgrading from Delphi Tokyo 10.2.x to Rio 10.3.1, the tabs for the files in the editor now have close icons:
Close icons in Delphi Rio 10.3.1 - Mouseover makes others visible/active
No close icons in Delphi Tokyo 10.2.x
Especially with shorter file names, I regularly click on the little x when I want to switch to a specific file in the editor.
If the file has pending edits, I can click Cancel to stop it from closing, but often I find myself having to reopen it.
It's a bit of a nuisance.
Can these close icons be disabled in the IDE?
Can these close icons be disabled in the IDE?
No.
What you can do is to completely disable new themes. But that will require editing registry.
Head to following registry key
Computer\HKEY_CURRENT_USER\Software\Embarcadero\BDS\20.0\Theme
and change following key-value entry:
Key: Enabled
Value: 0
If you wish to enable themes again just change Value back to 1.
Note: Unthemed IDE is no longer officially supported so you may have issues while using such IDE.
we are working on Delphi 7. Recently we have moved from Windows Server to windows 7. we are handling all the error messages in our application through MessageBox. MessageBox appearance is different in Windows Server 2003 and windows 7. Please find below screen shots, which shows difference in windows server 2003 and windows 7.
we want windows 7 message box to display same like windows server.
The MessageBox API is implemented by the system. It is a dialog implemented by Win32 in the user32 module. So you are just picking up the standard Windows dialogs. If you try to replicate the old XP/2003 dialogs on Windows 7, your application will look out of place.
Now, if you are absolutely desperate to replicate the XP/2003 appearance, then you cannot do that through MessageBox. You would need to create your own dialog. Create a form. Add a TImage for the icon, a label for the text, and whatever buttons you need. Show the form with ShowModal. Indeed, the Dialogs unit has a function that creates just such a form, CreateMessageDialog.
var
MessageBoxForm: TForm;
....
MessageBoxForm := CreateMessageDialog('Your message goes here', mtError, [mbOK]);
Try
MessageBoxForm.ShowModal;
Finally
MessageBoxForm.Free;
End;
And there's even a simple wrapper that allows this one-liner:
MessageDlg('Your message goes here', mtError, [mbOK], 0);
That is how to do what you ask but I cannot endorse that as being a good idea. Times change, and it is usually best to move with the times.
I'm having a really strange problem with the Delphi 6 IDE running on Windows 7 (64-bit edition). I just can't find the Code Explorer window pane. Usually it's docked against the left side of the Code Editor window. If not there, then you can find it by opening the View menu and selecting Code Explorer. But the Code Explorer is not docked to the Code Editor and when I drop down the View Menu the Code Explorer option is simply not there. All the other options are: Project Manager, Object Inspector, Object TreeView, etc. but just not the Code Explorer. Everything else about the IDE works great. Has anybody else had this problem and if so, what can I do to get it back? I rely on that view quite heavily.
Also, once I undock a view it doesn't seem to want to dock again. I hover over the usual areas in the edit window and it won't accept it the orphaned view as a docking client.
-- roschler
I can't reproduce the missing Code Explorer menu item. It works fine for me.
Regarding the non-dockable windows have you tried right clicking on the troublesome floating window and making sure that Dockable is ticked?
One thing to try when Delphi's IDE is giving you grief is to delete any .dsk files.
Finally, Delphi 6 pre-dates UAC and assumes that you can write to the installation directory. Have you made sure that Delphi is able to do this one way or another?
Sorry I don't have a definitive answer, but this is all I can think of.
For the record,
I had the same problem as you Robert.
Configuration:
Delphi 6 Enterprise, installed to a custom location.
Update Pack 2
Several Third Party Components
Windows 7, Spanish and English languages in Regional and language settings, and keyboard layout settings. Default language 'spanish',
default keyboard distribution 'english'.
Issues:
No 'code explorer' context menu item,
In editor, no 'complete class at cursor'.
Ctrl+Shift+C not working
Ctrl+Shift+Up/Down Arrow not working.
I uninstalled Delphi, uninstalled English language, removed keymappings to change keyboard layout (Ctrl+Shift).
Then I installed Delphi again, custom location, execute the installer as administator -> no issues.
I installed the third party components -> no issues
To install the update pack, this time, I opened the exe with winrar, decompressed the file, changed the files 'setup.exe', '_ISDel.exe' and '_BDEL.EXE' to execute always as administrator for all users. Run 'setup.exe' as administrator.
I don't know exactly which step did the trick but now I have no Issues.
I just tried with Delphi 6 on Win64, and have all the windows. And all expected menu items. Sometimes, there is some problems of refresh, but when I restart the IDE, everything is back there.
But I've installed:
Delphi 6 Suite Entreprise;
Update pack 2;
DDevExtension;
Delphi SpeedUp;
CnPack.
All is installed not in C:\Program Files but in a custom C:\Progs directory, which has all security rights set for all authenticated users. You should not install Delphi 6 under C:\Program Files, in all cases.
Works like a charm. Perhaps one of the add-ons fixed the issue.
Win7/x64, Delphi 6 Prof.
Win7 drives me crazy with his side effect. I describe it:
When I force the suggestion with Ctrl+Space, or Delphi do this automatically, the Delphi don't show the suggestion dropdown listbox, he is only bring my all opened forms to front, one by one.
This causes that what I typing is not going to editor window: it is going to any property of the active form, of the active control.
For example.
Ctrl+Space+"ShowMes..."
I don't got ShowMessage with suggestion listbox, I type ShowMess into my main form's caption.
Many times I need to make update pack's because the buttons, caption, etc got "ShowMes" or "Excep" or other property, because I type into these windows...
This function is sometimes broken on win7.
May I can restore the normal working mode without "bring all opened form to front"?
Thanks:
dd
You can disable UAC in Windows 7, see here:
http://www.petri.co.il/disable-uac-in-windows-7.htm
Also running Delphi 6 in Windows XP compatibility mode should do the trick.
See this discussion on the embarcadero forums, it's about Delphi 7, but it's the same issue:
https://forums.codegear.com/thread.jspa?messageID=204928&tstart=0
Finally see here how to run a program in XP compatibility mode:
See: http://www.w7forums.com/application-compatibility-mode-t314.html
Or: http://www.sevenforums.com/tutorials/316-compatibility-mode.html
Has someone else experienced something like this with Delphi and if so is there a known workaround!
I'm using the Delphi 2010 Rad Studio on Windows 7 64 bit.
A few times when editing the IDE hangs and I can't do any action either by keyboard or mouse. But there is a error-beep sound from windows like there is a modal window open somewhere, but hidden behind the ide it self.
Only by ending the ide via Task manager can I make this hidden modal window visible.
I see this often with various other dialogs as well.
Pressing "Alt-Tab" and reselecting Delphi you will cause the dialog to appear in the front again.
Note: This happens with other versions of Delphi as well.
I have the same problem with older versions of Delphi like D6.
My solution is use another tool like WinExp –Windows Explorer– or WinResQ to explore the existing active windows on system and reactivate it (BringToTop).
With this solution I get the Delphi IDE on Top and appears the window that cause the lock. This is the only option I have worked for me.
Regards.
Alt+Tab works, but you have to select another application, then Alt+Tab to return to Delphi, and then the dialog will show in front.