Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form position slips

Status
Not open for further replies.

ZOR

Technical User
Jan 30, 2002
2,963
GB
I have a form with its properties as:

popup=Yes
Modal = No
Borderstyle = sizable
Controlbox = No

In the form open event I use:

DoCmd.Maximize
fAccessWindow "Minimize", False, False

The form opens up in a maximised state but allows the taskbar to be visible (users request)

However If I click on the blue top border of the form, the form reduces in size and drops down in a southeast direction. This does not recover, and because its size has changed, the exit button at the bottom left of the form gets hidden.

It has to be closed with the task manager.

How do I resolve it, any ideas, thanks.
 
Thought I would post the function that gets called on the form open event in cas there is a wobbly bit in there. As I say if you click on the form top border the form moves. Thanks

Public Function fAccessWindow(Optional Procedure As String, Optional SwitchStatus As Boolean, Optional StatusCheck As Boolean) As Boolean
If Procedure = "Hide" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
End If
If Procedure = "Show" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
End If
If Procedure = "Minimize" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMINIMIZED)
End If
If SwitchStatus = True Then
If IsWindowVisible(hWndAccessApp) = 1 Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
Else
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
End If
End If
If StatusCheck = True Then
If IsWindowVisible(hWndAccessApp) = 0 Then
fAccessWindow = False
End If
If IsWindowVisible(hWndAccessApp) = 1 Then
fAccessWindow = True
End If
End If
End Function
 
I think my problem is because the form borderstyle is set to sizeable. If I change it to none, then there is no border top to click on. However my main problem which I thought had been put to rest a while ago by the function previously posted, but obviously not, is that the form when maximised covers the taskbar. Is there a way to make the taskbar visible, really desperate to fix the problem. Thanks
 
It seems the only way I can keep the taskbar visible is if I keep my form the same, ie borderstyle=sizeable. If I put a command button on the form with code DoCmd.Maximise, it recovers the form back after double clicking the top form border. Is there any event that triggers when the top border/title bar of the form gets clicked that I can put me Docmd.Maximise in so it always returns to full sixe? Thanks
 
Answered myself, I put the maximise command into the on resize event, and it recovers. All day on it!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top