Shaped forms (1 Viewer)

Status
Not open for further replies.

___

¯¯¯¯¯
Local time
Today, 23:16
Joined
Nov 27, 2003
Messages
595
Unzip the folder to your desktop and open the db :)
 

Attachments

  • ExampleA2000.zip
    51.4 KB · Views: 4,519

popeye

Work smarter, not harder.
Local time
Today, 15:16
Joined
Aug 23, 2004
Messages
75
I like the idea.

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.
 

KenHigg

Registered User
Local time
Today, 18:16
Joined
Jun 9, 2004
Messages
13,327
Pretty snazzy... Wonder if you can do anything usefull with it? You should do Flash stuff :):):)
 

___

¯¯¯¯¯
Local time
Today, 23:16
Joined
Nov 27, 2003
Messages
595
KenHigg said:
Pretty snazzy... Wonder if you can do anything usefull with it? You should do Flash stuff :):):)


Maybe create several car shaped forms and use DoCmd.MoveSize on a timer event to race them around the screen....We could have bets and everything :rolleyes:

:D
 

StevenS

Registered User.
Local time
Tomorrow, 00:16
Joined
Apr 14, 2005
Messages
21
Very Nice!
Is there a way to open the form with the access environment to take a look at the code you used?

Steven
 

alastair69

Registered User.
Local time
Today, 15:16
Joined
Dec 21, 2004
Messages
562
Click once on the database and then holding the shift key double click only let go of the shidt key when the database windows is visable.

Alastair
 

___

¯¯¯¯¯
Local time
Today, 23:16
Joined
Nov 27, 2003
Messages
595
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.

To do this, all your forms will need to be set up as pop up = Yes, Modal = Yes and all your error handling must be correct or your database will open without being visible and you'll need to reboot to amend the errors because it will not even be visible in the Task Manager.

Copy and past the following into a new module.

Code:
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 it as follows from the Load event of your pop up/ modal startup form

Code:
    Call fSetAccessWindow(0)
 

Ashfaque

Student
Local time
Tomorrow, 03:46
Joined
Sep 6, 2004
Messages
894
:confused: Well, it looks nice but we can not close the image appearing on screen. Only way remains to restart pc.

And even by holding shift key while opening the db, we can't get in to see the db window.

Second thing, if we dont see the access db window, how can we run other forms in the same db?

There must be some way..Whats that ?

With kind regards,

Ashfaque
 

alastair69

Registered User.
Local time
Today, 15:16
Joined
Dec 21, 2004
Messages
562
ASHFAQUE,
You can close the database by clicking on the indicator "X", To look at the programing behind the database hold shift down and double click on the database.

Hope this helps you.
Alastair
 

Ashfaque

Student
Local time
Tomorrow, 03:46
Joined
Sep 6, 2004
Messages
894
Thanks alastair69,

I can play with it now...

Regards,

Ashfaque
 

popeye

Work smarter, not harder.
Local time
Today, 15:16
Joined
Aug 23, 2004
Messages
75
Does it work with reports?

Thanks a million

I added your little baby to several of my forms and immediately the whole thing looks like its just been given a birth into the world of my other programs. I mean seeing my database forms with my desktop behind it instead of the access environment is SWEEET.

Question.

The only hold up i find now is with my reports. The access environment still has to run and open up in order for me to preview them. I checked the report property to add the codes in the on load event but there isnt a load event for reports, do you have a solution to that?
it would be great if i could get my reports to open like the forms; without the access background visible.
 

___

¯¯¯¯¯
Local time
Today, 23:16
Joined
Nov 27, 2003
Messages
595
You can use the snapshot viewer control on a form :)
 

Attachments

  • ReportOnFormA2K.zip
    22.1 KB · Views: 1,258
Last edited:

GRose

Registered User.
Local time
Today, 23:16
Joined
Mar 4, 2004
Messages
21
Can someone convert it to Access 97 please and then repost it.

Thanks
 

wazz

Super Moderator
Local time
Tomorrow, 06:16
Joined
Jun 29, 2004
Messages
1,711
haven't tried to open in 97...
 

Attachments

  • ExampleA2000_97.zip
    60.9 KB · Views: 716

Fear Naught

Kevin
Local time
Today, 23:16
Joined
Mar 2, 2006
Messages
229
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.
 
Last edited:

dazza61

Registered User.
Local time
Today, 23:16
Joined
Feb 7, 2006
Messages
60
Hi Shadow:)

Nice code!! - Converted all my forms and used snapshots for my reports (as you suggested though I had to fiddle with the code a lil coz I was using a custom filter routine for my reports)...

Couple of questions though...

Would it be possible to modify the code to hide the access environment so that forms don't have to be set to popup?

My reasoning is that I use e.g. requery within the activate event and popups don't fire the activate event. One of my forms in particular has 20 or so custom timers on which I deactivate the timers when other forms are displayed and reactivate when the form is shown again...

I used to run my app one window open at a time (which would be a workaround to the above as forms are automatically requeried when opened) but sometimes looked messy when switching from large to small forms, etc...

Any ideas would be appreciated.

dazza61
 

___

¯¯¯¯¯
Local time
Today, 23:16
Joined
Nov 27, 2003
Messages
595
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.

The folder where you put the db needs to have a sub folder called 'Interface' containg the image. So if you put the db in C:\Test\ the image would need to go in c:\Test\Interface\
 

___

¯¯¯¯¯
Local time
Today, 23:16
Joined
Nov 27, 2003
Messages
595
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

Unfortunately, no. :(

I believe this to be the only way to hide the Access environment.
 
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom