views:

235

answers:

2

So I am not sure if I am asking this correctly; let me explain:

IS there a way I can run my MDE without the access shell around the forms/reports? The part that provides the menu, and the little application title. I think it is the overall presentation layer form that all my access stuff sits on, but I am not sure. I am just wondering if you can get rid of it.

Thanks

+1  A: 

This is how it can be done using VBA.

Setting Start-Up Options Using VBA

Otherwise look under the current database options for something like Allow Full Menus and Allow Default Shortcut Menus and turn them off.

astander
thanks....think my question was not clear. I was looking for a method to totally remove the entire access shell around the forms/reports when running the mde. not just the menu.
Justin
+1  A: 

If you want to further “hide” the fact that your application is written in access there are a few other things you can do. If you place a bitmap image in the same folder and call it exactly the same thing as your database i.e. “MyDatabase.mde” and “MyDatabase.bmp” then access will use that as a splash screen and not display its only.

Also here is some code to change the icon that appears next to the form caption on every form

'place this sub in each forms "Load" event 
Private Sub Form_Load() 

SetFormIcon Me.hWnd, Left(CurrentDb.Name, Len(CurrentDb.Name) - Len(Dir(CurrentDb.Name))) & “\myicon.ico"
‘if the icon file is stored in the same directory as the db
‘or
SetFormIcon Me.hWnd, "C:\Icons\Icon1.ico" 'Location of icon file 

End Sub 

'copy below code in a new public module 
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long 

Private Const WM_SETICON = &H80 
Private Const IMAGE_ICON = 1 
Private Const LR_LOADFROMFILE = &H10 
Private Const SM_CXSMICON As Long = 49 
Private Const SM_CYSMICON As Long = 50 

Private Declare Function LoadImage Lib "user32" Alias "LoadImageA" (ByVal hInst As Long, ByVal lpsz As String, ByVal un1 As Long, ByVal n1 As Long, ByVal n2 As Long, ByVal un2 As Long) As Long 
Private Declare Function Long, ByVal wMsg As Long, ByVal wParam As Long, LParam As Any) As Long 

Public Function SetFormIcon(hWnd As Long, strIconPath As String) As Boolean 
Dim lIcon As Long 
Dim lResult As Long 
Dim X As Long, Y As Long 

X = GetSystemMetrics(SM_CXSMICON) 
Y = GetSystemMetrics(SM_CYSMICON) 
lIcon = LoadImage(0, strIconPath, 1, X, Y, LR_LOADFROMFILE) 
lResult = SendMessage(hWnd, WM_SETICON, 0, ByVal lIcon) 
End Function

SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As 
Kevin Ross
very cool....i am going to be using this. THANKS!
Justin