VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



To Save a Form's position to the Registry

by Angsuman Banerji (23 Submissions)
Category: Registry
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 4th January 2008
Date Added: Mon 8th February 2021
Rating: (1 Votes)

To Save a Form's position to the Registry

Rate To Save a Form's position to the Registry



        .ClassKey = HKEY_CURRENT_USER 
        ' You don't need to check if this key already exists
        ' - the class will create it for you
        .SectionKey = "Software\" & App.ExeName & "\" & frmThis.Name
        .ValueKey = "Maximized" 
        .ValueType = REG_DWORD 
        .Value = (frmThis.WindowState = vbMaximized) 
        If (frmThis.WindowState <> vbMaximized) 
            .ValueKey = "Left" 
            .Value = frmThis.Left 
            .ValueKey = "Top" 
            .Value = frmThis.Top 
            .ValueKey = "Width" 
            .Value = frmThis.Width 
            .ValueKey = "Height" 
            .Value = frmThis.Height 
        End If 
    End With 


Download this snippet    Add to My Saved Code

To Save a Form's position to the Registry Comments

No comments have been posted about To Save a Form's position to the Registry. Why not be the first to post a comment about To Save a Form's position to the Registry.

Post your comment

Subject:
Message:
0/1000 characters