Serious clipboard issue

Adrian510

Registered User.
Local time
Today, 19:40
Joined
Nov 24, 2005
Messages
38
Hello all

I was looking for a way to clear the clipboard and after searching the site followed a link to candace tripp's site. After downloading the example below I was trying to work out how it had been done when i encountered a problem which has stopped my DB from working. In that the acCmdPaste has stopped working.

I know it is not malicious and i am not implying that in any way but i am over my head here and need to reset everything to how it was before i downloaded the sample database (i can live without the clear clipboard function until i understand it more). I am pretty sure its because kernel level stuff has been altered so that a clearclipboard function can be created but when i see stuff to do with kernel's i back off.

Can anybody help?

Regards

Adrian

http://www.candace-tripp.com/download/clipboard2k.zip

Option Compare Database
Option Explicit

Declare Function clt_OpenClipboard Lib "USER32" Alias "OpenClipboard" (ByVal hwnd As Long) As Long
Declare Function clt_GetClipboardData Lib "USER32" Alias "GetClipboardData" (ByVal wFormat As Long) As Long
Declare Function clt_GlobalAlloc Lib "kernel32" Alias "GlobalAlloc" (ByVal wFlags As Long, ByVal dwBytes As Long) As Long
Declare Function clt_GlobalLock Lib "kernel32" Alias "GlobalLock" (ByVal hMem As Long) As Long
Declare Function clt_lstrCpy Lib "kernel32" Alias "lstrcpyA" (ByVal lpString1 As Any, ByVal lpString2 As Any) As Long
Declare Function clt_GlobalUnlock Lib "kernel32" Alias "GlobalUnlock" (ByVal hMem As Long) As Long
Declare Function clt_CloseClipboard Lib "USER32" Alias "CloseClipboard" () As Long
Declare Function clt_SetClipboardData Lib "USER32" Alias "SetClipboardData" (ByVal wFormat As Long, ByVal hMem As Long) As Long
Declare Function clt_EmptyClipBoard Lib "USER32" Alias "EmptyClipboard" () As Long
 
The kernel32 stuff here is just declaring some system functions that are required to use the clipboard functions. At worst they are just going to allocate some memory.

Could it be that the code is out of date? MS have added significant functionality to the clipboard, it might just need tweaking.
 
Thanks for the reply Steevie

I am still at a loss as to why the acCmdPaste has stopped working after i downloaded the sample DB though and i am not sure what else might have happened.

Can anybody help me out?

Adrian
 
Please ignore

Sincere apologies

I have commitied the cardinal sin and not rebooted the machine. Its the first thing i ask people to do. Its the first thing you should do. It solves 99% of all problems and i didn't do it.

Everything is cool now as you probably gathered i went into a huge panic (deadlines, directors etc) and lost my cool.

Thanks

Adrian
 
Adrian -

Not to worry! Think we've all done that (more than once).

If all else fails, reboot!!!

Bob
 

Users who are viewing this thread

Back
Top Bottom