VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Remembers your forms location and size...

by The Manic Mouse :<@ (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 6th October 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Remembers your forms location and size...

API Declarations


Dim YY As Single

Rate Remembers your forms location and size...



Path = Trim(Path)
If Right(Path, 1) = "\" Then
CheckPath = Path
Else
CheckPath = Path & "\"
End If
End Function

Private Sub Form_Load()
Dim vLeft As String, vTop As String, vWidth As String, vHeight As String, vState As String

Open CheckPath(App.Path) & "pos.ini" For Input As #1

 Line Input #1, vLeft
 Line Input #1, vTop
 Line Input #1, vWidth
 Line Input #1, vHeight
 Line Input #1, vState
Close #1

Me.Move Val(vLeft), Val(vTop), Val(vWidth), Val(vHeight)
Me.WindowState = Val(vState)
End Sub


Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

Dim vLeft As String, vTop As String, vWidth As String, vHeight As String, vState As String

Open CheckPath(App.Path) & "pos.ini" For Output As #1

 Print #1, Me.Left
 Print #1, Me.Top
 Print #1, Me.Width
 Print #1, Me.Height
 Print #1, Me.WindowState

Close #1
End Sub



Download this snippet    Add to My Saved Code

Remembers your forms location and size... Comments

No comments have been posted about Remembers your forms location and size.... Why not be the first to post a comment about Remembers your forms location and size....

Post your comment

Subject:
Message:
0/1000 characters