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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

REMOVING ACCESS ICON

Status
Not open for further replies.

RezaNana

Programmer
Dec 18, 2002
80
MY
Does anybody know how to remove the Access icon logo from the mdb's?I mean tottally remove it! And i DONT WANT to replace it with other ICons. Just leave it the same color with the window bar.And it will also take effect on the status bar/ task bar (i dun realy know the name,but the bar in line with the start button).So if anybody knows please help..
 
You might try poviding a little further info/detail? To get rid of all Access stuff, you could just uninstall Access, but I doubt that's what you're looking for.. [wink]

Stephen [infinity]
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV
 
Rez,

I have to credit ACEMAN1 for this but this works for me.

If you want your form or forms to be blank just download an icon editor, create a blank icon and Set your path to that blank icon.


Open a new module in the modules window. Then copy/paste the following code:

CODE
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 SendMessage Lib "user32" _
Alias "SendMessageA" _
(ByVal hWnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
LParam As Any) _
As Long

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

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


Next . . . copy/paste the following code in the On Open event of any form you wish to control the icon (you substitute Path\FileName with the full path & filename of the *.ico file):

CODE
SetFormIcon Me.hWnd, "Path\FileName"


Good Luck!

Thanks, Rib

Bartender:Hey aren't you that rope I threw out an hour ago?

Rope:No, I'm a frayed knot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top