May 29, 2024, 01:21:14 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Need some help!

Started by LarryMc, April 17, 2012, 03:20:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LarryMc

One on the primary features of the new IDE is that it will not use any registry entries.

I'm now presented with a problem: the registering of file extentions

Currently, when the existing IDE is closed you can double-click an iwb file and the IDE opens and the file is opened.
That is because the iwb file extension has a registry entry which tells it to use a special exe file to open the file.
The special program resides in the iwbdev\bin folder and it looks at the registry entry to find where IWB is installed.
That entry will no longer exist.
Without the special helper file I can make double-clicking a file open the IDE and load the file if the file extension is in the registry.
But each new double-clicked file will open a new instance of the IDE.

So, here's where we're headed:
If you install IWB3 on a stick and use it on a computer that you can't access the registry then you will not be able to double-click on a file and have it open the IDE or(if the IDE is already open) open the file.  You will, however, be able to open the IDE and drag-and-drop files into the IDE.

If you do have access to the registry you can register the file extension but double-clicking a file creates a new instance of the IDE in each case.

I have some code that I can use to tell whether or not the IDE is already open and either open it or bring it to the top.
What I need is:
Some code that will send a message from one application and simulate a drag-and-drop in the IDE application.

I'm going to proceed with some trial and error coding to see what I can do with what I know but if anyone has a good solution I would really appreciate it.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Hi Larry,

I have some samples of code, I'm not sure they are what you are after but may give you some ideas.

Attached are:

Setup.iwb - this detects which version of Windows (XP,Vista or 7) is running
If it's Vista or 7 then it will execute another program with the "Run as Administrator" elevation.

KillProcess.iwb - this lists running processes and stops a process of your choice
This one I find very useful because when you make a change to the registry it needs to be "re read" by Windows.

So I make a change to the registry say in one program then run KillProcess to stop "Explorer.exe".
Windows will then automatically restart Explorer.exe thus re-reading the registry and enabling the new registry change.

Loaduser.iwb - this elevates the programs rights to read / write to certain parts of the registry.
This may be useful if you are trying to work with the registry but it's not working for some reason - if that is the case do this first before making a registry change.

AdminTest.iwb - this will tell you what type of user account you are running - Admin or Standard.
Standard users cannot access certain parts of the registry.

For these programs you need the Registry.inc file which is also attached in my second reply.

Hope this does not send you off in the wrong direction, but just thought that detecting a process, re-reading the registry and using elevation of programs might help you.

Finally, sorry if this does not help at all or i'm telling you what you already know!

Andy.
:)



Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

Larry,

Attached is the Registry.inc file.

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

Thanks

I think I've narrowed down what I want/need to do.
Some of your posted code covers the area I need to address.

You can be sure I will glean everything I can from your code and appreciate every line of it.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

No problem!

Just hope it can help you in some way.

Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.