KenHigg said:Pretty snazzy... Wonder if you can do anything usefull with it? You should do Flash stuff
popeye said:How is that done? Ive wanted to be able to run my forms without the access environment and this somehow shows that as a very real possibility.
Option Compare Database
Option Explicit
Global Const SW_HIDE = 0
Global Const SW_SHOWNORMAL = 1
Global Const SW_SHOWMINIMIZED = 2
Global Const SW_SHOWMAXIMIZED = 3
Private Declare Function apiShowWindow Lib "user32" _
Alias "ShowWindow" (ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long
Function fSetAccessWindow(nCmdShow As Long)
Dim loX As Long
Dim loForm As Form
On Error Resume Next
Set loForm = Screen.ActiveForm
If Err <> 0 Then
loX = apiShowWindow(hWndAccessApp, nCmdShow)
Err.Clear
End If
If nCmdShow = SW_SHOWMINIMIZED And loForm.Modal = True Then
MsgBox "Cannot minimize Access with " _
& (loForm.Caption + " ") _
& "form on screen"
ElseIf nCmdShow = SW_HIDE And loForm.PopUp <> True Then
MsgBox "Cannot hide Access with " _
& (loForm.Caption + " ") _
& "form on screen"
Else
loX = apiShowWindow(hWndAccessApp, nCmdShow)
End If
fSetAccessWindow = (loX <> 0)
End Function
Call fSetAccessWindow(0)
Fear Naught said:I have tried to load the form but I keep getting the error:
"Background image for form not found."
I assume this is the file car.bmp which I have put into the same directory as the mdb. I even tried chaning the code so that the function call on form load sends the optional path to the function but to no avail.
Help please coz this sounds excellent.
PS. You can close this down without re-booting the PC by going into the processes screen of Task Manager and ending the MSACCESS process.
dazza61 said:Would it be possible to modify the code to hide the access environment so that forms don't have to be set to popup?
dazza61