View Issue Details

IDProjectCategoryView StatusLast Update
0005621JEDI VCL00 JVCL Componentspublic2012-09-10 14:15
ReporterralfiiiAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.40 
Target VersionFixed in Version3.46 
Summary0005621: TJvFormStorage overwrites predefined Form.WindowState
Description*) Create a VCL-Form-Application
*) Set the Windowstate of the mainform to wsMaximized
*) Drop a TJvFormStorage on the form wire it to an AppStorage (e.g. a TJvAppRegistryStorage)

When you now run the application for the very first time no "old" placement info is available in the registry -> TJvFormStorage should use the predefined window position values -> the form should come up maximized

BUT: The form comes up with wsNormal.
Additional InformationBugfix (var declaration and one line of code inserted, one line changed):

unit JvJVCLUtils
procedure InternalRestoreFormPlacement
var
  OldShowCmd: UINT;
..
  GetWindowPlacement(Form.Handle, @Placement);
  OldShowCmd:=Placement.ShowCmd; //!

    Placement.ShowCmd := AppStorage.ReadInteger(AppStorage.ConcatPaths([StorePath, siShowCmd]), OldShowCmd); //! SW_HIDE);
TagsNo tags attached.

Activities

obones

2011-09-21 11:57

administrator   ~0018936

Please provide the zipped sources of a sample application showing this

ralfiii

2011-09-21 13:58

reporter   ~0018950

I add the content of the dfm, so source needed besides that...

---

object Form1: TForm1
  Left = 0
  Top = 0
  Caption = 'Form1'
  ClientHeight = 444
  ClientWidth = 632
  Color = clBtnFace
  DefaultMonitor = dmDesktop
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  ShowHint = True
  WindowState = wsMaximized
  PixelsPerInch = 96
  TextHeight = 13
  object JvFormStorage1: TJvFormStorage
    AppStorage = JvAppRegistryStorage1
    AppStoragePath = '%FORM_NAME%'
    StoredValues = <>
    Left = 304
    Top = 224
  end
  object JvAppRegistryStorage1: TJvAppRegistryStorage
    StorageOptions.BooleanStringTrueValues = 'TRUE, YES, Y'
    StorageOptions.BooleanStringFalseValues = 'FALSE, NO, N'
    Root = 'Software\%APPL_NAME%'
    SubStorages = <>
    Left = 304
    Top = 280
  end
end

2011-09-21 14:02

 

bug.zip (1,421 bytes)

ralfiii

2011-09-21 14:02

reporter   ~0018951

ok, also uploaded the project.

obones

2011-09-21 14:15

administrator   ~0018955

thanks

obones

2012-02-23 11:44

administrator   ~0019508

Uploaded zip is bogus, but DFM is good, seeing the bug

obones

2012-02-23 11:50

administrator   ~0019510

This is now fixed in SVN

Issue History

Date Modified Username Field Change
2011-07-19 10:24 ralfiii New Issue
2011-09-21 11:57 obones Note Added: 0018936
2011-09-21 11:57 obones Status new => feedback
2011-09-21 13:58 ralfiii Note Added: 0018950
2011-09-21 14:02 ralfiii File Added: bug.zip
2011-09-21 14:02 ralfiii Note Added: 0018951
2011-09-21 14:15 obones Note Added: 0018955
2011-09-21 14:15 obones Status feedback => acknowledged
2012-02-23 11:44 obones Note Added: 0019508
2012-02-23 11:44 obones Status acknowledged => confirmed
2012-02-23 11:50 obones Note Added: 0019510
2012-02-23 11:50 obones Status confirmed => resolved
2012-02-23 11:50 obones Fixed in Version => Daily / SVN
2012-02-23 11:50 obones Resolution open => fixed
2012-02-23 11:50 obones Assigned To => obones
2012-09-10 14:15 obones Fixed in Version Daily / SVN => 3.46