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

VFP6 exe and File Description 1

Status
Not open for further replies.

JackTheC

Programmer
Feb 25, 2002
324
NL
I still develop programs in version 6 of VFP.

Today I noticed something strange. I created a form with an OleDragOver/OleDragDrop object on it.
In the development environment, the vfp IDE, everything worked fine as expected.
But in the compiled executable the Drag and Drop did not fire. Even the drag icon did not appear. Only the black STOP icon showed up.

I made a new test project and in this one the Drag and Drop did also work in the EXE.
But in the original project the EXE refused to work, no matter what I changed.

After hours of testing and debugging I found the solution. In the File Description box, you can see that under the Version button when compiling to an executable, I had some text and one word of that text seems to be a trigger word for VFP6. The word was "update".
When I deleted that word in the File Description, everything worked just fine.

Another hint is the icon of the exe or shortcut. If "update" is in the description a shield is visible in that icon. But I never expected that the exe would behave different with or without that shield. It never did untill today. But now it did with drag and drop.

So that leaves the question: Are there more words than "update" that act as a trigger word? Anybody info on that?



 
I never heard that about the file description. But back when Vista and UAC was new, Microsoft decided to categorize any EXE with setup or update or install in the name to be an installer needing elevation. And that's also causing the shield sign on the EXE icon.

I am not aware this has influence on OLE, but maybe it has indirectly through elevated mode.

Chriss
 
I've never heard of this either. But Chris might well have a point, although I can't see why it should have that particular effect.

A small point, Jack: You say " Drag and Drop did not fire ... Only the black STOP icon showed up". If the icon you are referring to is the black circle with a diagonal line though it, that suggests that the drag-and-drop is functioning correctly - or least, the OLEStartDrag correctly fired. It's just that the mouse pointer is currently over an object that does not have its OLEDropMode correctly set.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Hi Chriss. You're right about elevation.

If I run any VFP6 compiled EXE "As Administrator" the OLE Drag/Drop doesn't work anymore...
And that is also true for the VFP6 IDE.
 
Mike, yes it is the black circle with a diagonal line though it.
 
Yeah, I just noticed that when I compile the project in VFP9, the shield sign does not show up and the drag/drop behaviour is normal. But when I run that EXE as administrator the drag/drop does not work.
So people should be carefull running VFP executables as administrator, they might not work as expected.

And this could indeed mean that VFP6 automatically runs an EXE elevated when the word "install" is in the file description and VFP9 does not.

And Chriss you are right, besides UPDATE, SETUP and INSTALL are also trigger words for the VFP6 compiler.
 
This is all good stuff to keep in mind. I can't say I have ever had any trouble running a VFP executable as administrator, but it has been a while since I used drag-and-drop. The last major application where I used it was quite a few years ago now. I frequently tested it when running as administrator, but that was probably under XP, which is probably why the problem didn't arise.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top