|
You might want to take a look at this[^] article from MSDN. You will need to use 0x20 as the value of your Contexts registry key so that it only works on links.
Once you've added the necessary registry keys, you're going to need to write a script that loads your C# application and passes it the information about the link clicked (take a look at number 2 of the "Implementation Steps" section of the link above for some links about writing this script).
Hope this helps
Cheers,
Will H
|
|
|
|
|
Hi
sorry for the late reply but it took sometime for me to test it.
i managed to create and run a script that knows the URL new shortcut (its great!)
but since i'm so bad in javascript , i dont know how to execute my EXE (c#) with that parameter(url shortcut).
how can i do it?
Thanks alot,
Ran Z.
R.Z
|
|
|
|
|
I'm sorry but I have no experience with JavaScript at all. It seems to be quite difficult to launch an external program from a script though, for security reasons.
I did, however, find this[^] discussion. There is one part that may interest you:
IF you have access to each client to add a regsitry key you can do what you want seamlessly ...
To execute c:\my prog\prog.exe %a %b %c
Add to a new key to HKEY_CLASSES_ROOT called 'myprog'
Add an empty string to this key called 'URL Protocol'
Add the sub-keys: \shell\open\command
Set the value of the default string inside the command key to: "c:\my prog\prog.exe %1"
On your web page have your link as:
<A HREF="myprog: %a %b %c">run myprog</A> (%a, %b and %c are arguments i think).
I know you are doing this from a script, but you can probably do some sort of redirect to call the link. I have no idea, but
location.href= "myprog: %a %b %c"; might work.
Maybe you could try asking about how to run a program on the client computer when you have access to the registry in a JavaScript specific forum.
Sorry I can't be of more help.
Cheers,
Will H
|
|
|
|
|
nice idea man
i have done something else.
since the script is local on my computer, it do not alert any security issues when i execute a program using Shell.run("blabla.exe")
so i just add a parameter to the execution with the current link.
its working. now i draged it into c# issue and it will be easier for me.
thanks alot,
Ran Z.
R.Z
|
|
|
|
|
ranzask wrote:
since the script is local on my computer, it do not alert any security issues when i execute a program using Shell.run("blabla.exe")
That seems like a much better way than my idea.
I'm glad you've got it sorted
Cheers,
Will H
|
|
|
|
|
Hi guys...
when i use "RowFilter" property of a DataTable that's created from a simple select statement(without join i mean) i can filter my DataGridView but when i use join in my select statement it doen not respond.
Could you please tell what to do , its so urgent.....
THANK YOU
|
|
|
|
|
can anyone tell me is there anyway by which I can convert a String to a DateTime? I have a DateTime object and I store it into a String object, is there any possible way to convert that String back to its DateTime?
|
|
|
|
|
I helped myself this time using Convert.ToDateTime()
|
|
|
|
|
Try this function:
DateTime.Parse(string)
Best regards, Alexey.
|
|
|
|
|
Hello!
I have developed a program in C# (VS.NET 2003) for which I want to generate a makefile that I can use to get the .exe file to run the project. kindly tell me how to generate the makefile in windows?
|
|
|
|
|
progmatic icon wrote: le i
With .NET 2, you've got the msbuild program located in the %windir%\microsoft.net\framework\v2.x\ directory which can process csproj files as if they are makefiles. At least, that's my understanding of it, I haven't actually used msbuild just yet.
|
|
|
|
|
Microsoft have their own version of make in the SDK, named nmake.exe. Unfortunately you will have to write the makefile yourself, AFAIK there is nothing in the IDE to produce them. You will though find some samples in the SDK and in the documentation.
Regards, Graham.
|
|
|
|
|
hi all,
am wanting to write a program that will sit in tray and wait for a key combination. when the combination is detected it will maximise my winform.
should i be using global hooks? or is this acheivable another way in c#?
kind regards,
g00fy
|
|
|
|
|
I beleive a Global Keyboard Hook is the answer.
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
yes thank you,
i found a cp article (or two) that will work just fine.
the program i am creating is to take screen dumps. what i would also like is to be able to (on hotkey) change the cursor and draw a bounding rectangle for the image.
any ideas on how to draw a rectangle outline onto the screen ?
kind regards,
g00fy
|
|
|
|
|
Hi,
I am trying to build my custom listbox control. The problem i am having is
that, if my list box shows 10 items and i have for suppose 20 items in it. now
when a user scroll down using lstBox 'VScroll' control then my application
doesn't know that the user has scroll down. Any Suggession without using
"Selected IndexChange " or "Click Event" or "Key Down" Events.
|
|
|
|
|
How are you creating your custom listbox?
Are you designing it from scratch or inheriting from the existing listbox control?
Ed
|
|
|
|
|
hi Ed,
Sorry for the ambiguity in my question. Yes, I am inheriting from the listbox control. I am having the problem metioned earlier. Thanks for the reply.
|
|
|
|
|
In that case can't you just override the OnDrawItem method?
protected overrides void OnDrawItem(DrawItemEventArgs e)
{
}
If you need to resize each item based on their contents then you can override the OnMeasureItem method.
This should automatically display the scroll bars as and when they're needed, you only need to take care of drawing one item at a time also.
Ed
|
|
|
|
|
hi Ed.Poore,
I am posting this message just by reading yours, so plz hear out my problem in detail. I hope your suggestion works. Now problem i am having is when ever a user scroll down or up, some items also go up/down. Now i have to find out when user used the scroll bar of the list box, how far down/up he went. Then i can use the topIndex property to map my items as mapping is done in sql Server diagrams. I hope i did explained myself clearly.
Thanks again.
|
|
|
|
|
Ah, I see it clearly now, you will have to trap some events for the scrolling. Looking through the documentation it might be easier to create a composite control which has a listbox, and a couple of buttons for going up and down a page. This would also be more intuitive if there is a delay in the loading.
Ed
|
|
|
|
|
Hi,
I am trying to build my custom listbox control. The problem i am having is
that, if my list box shows 10 items and i have for suppose 20 items in it. now
when a user scroll down using lstBox 'VScroll' control then my application
doesn't know that the user has scroll down. Any Suggession without using
"Selected IndexChange " or "Click Event" or "Key Down" Events.
|
|
|
|
|
I know this is a cheesy solution, but perhaps you could periodically check if the listbox's TopIndex [^] has changed?
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
hi Ravi,
plz tell me which method or event of the listbox will going to help me in checking the top index periodically. Hoping to get the reply soon.
Thanks.
|
|
|
|
|
You'll need to set a timer and check the ListView 's TopIndex property every time the timer goes off.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|