在点网中处理带对象 [英] working on band object in dot net

查看:77
本文介绍了在点网中处理带对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力在点网中创建bandobject.我已经成功创建了band对象.但是要显示任务栏中的带对象,我必须右键单击&然后单击收费栏,然后我必须选择我的bandobject.但是我的要求是自动显示乐队对象,而无需右键单击任务栏.我正在 http://www.codeproject.com/KB/shell/dotnetbandobjects.aspx?df=100&tid=2138288&forumid=3788&select=2138288
我也在band对象中使用以下代码.但是我无法以编程方式显示此bandobject.谁能帮我解决这个问题.
因为下面的寄存器函数是静态函数&;被称为shen band对象已注册,并且其他功能不是静态的,因此无法在寄存器中调用. Pleasse帮助我解决了这个问题. " B");


RegistryKey rkClass = Registry.ClassesRoot.CreateSubKey(@"CLSID \" + guid);
RegistryKey rkCatSub =(rkClass). br>
BandObjectAttribute [] boa =(BandObjectAttribute [])t.GetCustomAttributes((BandObjectAttribute),
字符串=>名称help = t.Name;
BandObjectStyle样式= 0; boa [0] .Name;

if(boa [0] .HelpText!= null)
help = boa [0] .HelpText;

[] = boa [0]样式.样式;
}

rkClass.SetValue(null,name);
rkClass.SetValue("MenuMenu",name);
rkClass.SetValue("Help <"
if(0!=(style& BandObjectStyle.Vertical))
rkCat.CreateSubKey("{00021493-0000-0000-C000-000000000046}'');

if(0!=(style& BandObjectStyle.Horizo​​ntal)) br> rkCat.CreateSubKey("{00021494-0000-0000-C000-000000000046}");

if(0!=(style& BandObjectStyle.TaskbarToolBar)子项(C). " {00021492-0000-0000-C000-000000000046}'');

if(0!=(style& BandObjectStyle.ExplorerToolbar))
\ Microsoft \ Internet Explorer \ Toolbar").SetValue(guid,name);

}

Hi,
i am working on creating bandobject in dot net. i  have created band object sucessfully. but  to show that band object in taskbar i have to right click & then click on tollbar, then i have to select my bandobject. But my requirement is to show band object automatically, without right click on taskbar. i am taking help from http://www.codeproject.com/KB/shell/dotnetbandobjects.aspx?df=100&tid=2138288&forumid=3788&select=2138288
also  i am using below code in band object. But i am unable to show this bandobject programmically. Can anybody help me out to solve this problem.
because below register function is a static function & called shen band object is registered and other functions are non static, which cannot call in register. Pleasse help me to solve this problem.



[ComRegisterFunctionAttribute]
        public static void Register(Type t)
        {
            string guid = t.GUID.ToString("B");
           
            RegistryKey rkClass = Registry.ClassesRoot.CreateSubKey(@"CLSID\"+guid );
            RegistryKey rkCat = rkClass.CreateSubKey("Implemented Categories");

            BandObjectAttribute[] boa = (BandObjectAttribute[])t.GetCustomAttributes(
                typeof(BandObjectAttribute),
                false );

            string name = t.Name;
            string help = t.Name;
            BandObjectStyle style = 0;
            if( boa.Length == 1 )
            {
                if( boa[0].Name != null )
                    name = boa[0].Name;

                if( boa[0].HelpText != null )
                    help = boa[0].HelpText;

                style = boa[0].Style;
            }

            rkClass.SetValue(null, name );
            rkClass.SetValue("MenuText", name );
            rkClass.SetValue("HelpText", help );

            if( 0 != (style & BandObjectStyle.Vertical) )
                rkCat.CreateSubKey("{00021493-0000-0000-C000-000000000046}");

            if( 0 != (style & BandObjectStyle.Horizontal) )
                rkCat.CreateSubKey("{00021494-0000-0000-C000-000000000046}");

            if( 0 != (style & BandObjectStyle.TaskbarToolBar) )
                rkCat.CreateSubKey("{00021492-0000-0000-C000-000000000046}");

            if( 0 != (style & BandObjectStyle.ExplorerToolbar) )
                Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Microsoft\Internet Explorer\Toolbar").SetValue(guid,name);

        }

推荐答案

感谢您的帖子!我建议用以下其中一种方式发布您的问题

<身体>
<身体>
<身体>
MSDN论坛»Internet Explorer开发»Internet Explorer扩展开发»如何以编程方式显示托管任务栏带对象?
位于此处: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2326541&SiteID=1 .

Thank you for your post!  I would suggest posting your question in one of the 

 MSDN Forums » Internet Explorer Development » Internet Explorer Extension Development » How to display a managed taskbar bandobject programmatically?
located here:  http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2326541&SiteID=1.


这篇关于在点网中处理带对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆