|
Let us hope so. btw are you aware of this[^]? MVP 2010 - are they mad?
|
|
|
|
|
Richard MacCutchan wrote: btw are you aware of this[^]?
Yes, thanks, I'm just rising above it.Cpianism: I have a negative number in my Rep so please fix it.
Chris Maunder: That isn't a bug.
|
|
|
|
|
|
|
روي صفحه كليك ميكنم پيغام ميده
please dont steal my stuff!!!!
|
|
|
|
|
|
|
|
گلم امروز نميتونم ببينم فردا ميام حتما ميبينم
|
|
|
|
|
|
Good day.
I have a problem with shell context menu register on x64 pc.
My shell extension working well on 32 bit, but in 64 bit not working.
I search google ,msdn , but can't find answer.Please help me.
My code parts :
<br />
Assembly executingAssembly = Assembly.GetExecutingAssembly();<br />
RegistrationServices services = new RegistrationServices();<br />
services.RegisterAssembly(executingAssembly, AssemblyRegistrationFlags.SetCodeBase);<br />
<br />
.................<br />
<br />
RegistryKey key2 = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer", true);<br />
key2.SetValue("DesktopProcess", 1);<br />
key2.Close();<br />
key2 = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved", true);<br />
key2.SetValue(myguid, mytext);<br />
key2.Close();<br />
<br />
key2 = Registry.ClassesRoot.CreateSubKey(@"Drive\shellex\ContextMenuHandlers\"+mytext);<br />
key2.SetValue("", myguid);<br />
key2.Close();<br />
Thanks for reply.
Nematjon.
|
|
|
|
|
Shell extensions get loaded into every process with a file open dialog; but there can be only one .NET runtime per process.
Shell extensions written in .NET are dangerous: they can break applications using other versions of .NET.
Read this post for more details: http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/1428326d-7950-42b4-ad94-8e962124043e/[^]
Do not write shell extensions in .NET unless you are 100% sure that none of your users use any .NET 1.x applications.
For your x64 problem: are you aware that 32-bit and 64-bit processes have separate registries? Make sure your registration process is running as 64-bit process so that it writes to the same registry that explorer is reading from.
|
|
|
|
|
Thanks for your reply Daniel .
Yes , i know 32 bit app and 64 app registration different place.
I rebuild my app under x64.I check registry and they are i found my settings.
But not yet working shell menu .
I'm using Vista 32 bit , Visual Studio 2008.
Testing pc is Windows 7 , 64 bit.
Please help me this issue .
Thanks.
Nematjon.good
modified on Monday, February 8, 2010 9:08 AM
|
|
|
|
|
Hi i seem to be getting an argumentException on the indicated line for no reason that i can see.
There is a perameter not valid message however it is, as i create the rectangle and add it straight away.
Rectangle rectangle = new Rectangle(5, 5, 10, 10);
Rectangle textBacking = new Rectangle(m_expandBox.Width + (m_gap * 2),
m_gap - (int)(m_gap * 0.5), Size.Width - m_gap, Size.Height - m_gap);
-----> m_gpExpandBox.AddRectangle(rectangle);
m_gpTextBacking.AddRectangle(textBacking);
Does anyone know why this is happening. I cannot see any information on the net that would reveal the cause of the problem.
Thanx George
|
|
|
|
|
We would probably need to know more about whatever m_gpExpandBox is, and what it's AddRectangle method is declared as. If Barbie is so popular, why do you have to buy her friends?
Eagles may soar, but weasels don't get sucked into jet engines.
If at first you don't succeed, destroy all evidence that you tried.
|
|
|
|
|
Yep thats kwl:
GraphicsPath.AddRectangle(); (standard method .net)
Takes a rectangle as perameter and adds it to graphics path
private GraphicsPath m_gpExpandBox;
public Node(string name)
{
m_name = name;
m_childNodes = new List<Node>();
-----> m_gpExpandBox = new GraphicsPath();
m_gpTextBacking = new GraphicsPath();
m_fontLocation = new Point(0, 0);
m_size = new Size(60, 20);
m_location = new Point(0, 0);
}
There is too much code to include every reference to m_gpExpandBox. It is a graphics path i add to in order to draw an expansion box on a node of a tree view control.
Do you think this could be a cause of the problem even though it complains of an invalid perameter.
Thanx George
|
|
|
|
|
My bad - I missed the hungarian notation and GraphicsPath reference.
gwithey wrote: Do you think this could be a cause of the problem even though it complains of an invalid perameter.
Don't know - have you stuck a breakpoint on and looked at the actual values of the rectangle?If Barbie is so popular, why do you have to buy her friends?
Eagles may soar, but weasels don't get sucked into jet engines.
If at first you don't succeed, destroy all evidence that you tried.
|
|
|
|
|
Yes i think it may be related to the graphics path as all its variables have an exception before the line in question is reached. I will have to try and find where it is going wrong.
Thanx George
|
|
|
|
|
public int Draw(Graphics g)
{
DrawNode();
Font nodeFont = new Font(FontFamily.GenericSansSerif, 10f, FontStyle.Regular);
if (m_selected)
{
g.FillPath(Brushes.Red, m_gpTextBacking);
g.DrawString(m_name, nodeFont, Brushes.White, m_fontLocation);
}
else
{
g.DrawString(m_name, nodeFont, Brushes.Black, m_fontLocation);
}
if (m_hover)
{
g.DrawPath(Pens.Black, m_gpTextBacking);
}
g.FillPath(Brushes.Gray, m_gpExpandBox);
g.DrawPath(Pens.Black, m_gpExpandBox);
------>
------>
Thank you for the help found the soulution.
It now works when comment out the indicated lines
|
|
|
|
|
semartens
|
|
|
|
|
Please stop treating this as a chat room - it is intended for programming questions on C# only. If Barbie is so popular, why do you have to buy her friends?
Eagles may soar, but weasels don't get sucked into jet engines.
If at first you don't succeed, destroy all evidence that you tried.
|
|
|
|
|
jojoba
bebin be man chi migan
|
|
|
|
|
Translate:
jojoba, see what they say.
|
|
|
|
|
You deserve a medal for translating this rubbish.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
راستي فردا كه اومدم ميلمو باز كردم دوست دارم عكستو فرستاده باشي ببينم چقدر دوستم داري ارزش دارم برات كه عكستو بفرستي
|
|
|
|