473,379 Members | 1,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

How to write a control displayable on the toolbar of VS.Net IDE ?

To all,

Does anybody got any idea of how to write a UI control that can be
displayable on the ToolBar (ie. you can drag drop it on the Form just
like a Button Control provided in VS.Net)? Since I need to override
some functions of the Button object for the whole project afterwards;
so it is more convenient to extend the Button class but after extending
it, it can't be drag-drop on the Form.....

It should be possible, since there are 3rd party controls such as
OpenNet's framework classes that can do such things.

Any ideas? And what kind of project is it? (really a User Control
project or just a Dll project or any other thing ?)

Thanks!
From Jason (Kusanagihk)


Nov 16 '05 #1
3 1371
Hi,

Apply the properly configured ToolboxAttribute to the control.
Add the control to the IDE's toolbox with the toolbox' customization means
(Add/Remove Items from the right-click menu, then the '.NET Components' tab,
then 'Browse...' and pick the assembly containing the control).

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

<ku********@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
To all,

Does anybody got any idea of how to write a UI control that can be
displayable on the ToolBar (ie. you can drag drop it on the Form just
like a Button Control provided in VS.Net)? Since I need to override
some functions of the Button object for the whole project afterwards;
so it is more convenient to extend the Button class but after extending
it, it can't be drag-drop on the Form.....

It should be possible, since there are 3rd party controls such as
OpenNet's framework classes that can do such things.

Any ideas? And what kind of project is it? (really a User Control
project or just a Dll project or any other thing ?)

Thanks!
From Jason (Kusanagihk)


Nov 16 '05 #2
To Dmitriy,

I don't know how to set the "ToolboxAttribute" to the control class;
can you list out the steps ?

BTW, I've found a tutorial on writing design time control to facilitate
IDE drag drop; but when I follow the tutorial the end result is the
Design Time control can't be added into the ToolBar (the error saids
this dll has some dependecies with something and can't be loaded
without them -- didn't list out what's missing)

Thx!
From Jason (Kusanagihk)


Nov 16 '05 #3
Jason,

I am sorry, I misspelled the attribute name. Here's an example from MSDN:

[ToolboxBitmap(@"C:\Documents and Settings\Joe\MyPics\myImage.bmp")]
class MyControl2 : UserControl
{
}

You can find more infromation in the "Providing a Toolbox Bitmap for Your
Control" article in the "Visual Basic and Visual C# Concepts" section of
MSDN Library.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"Jason (Kusanagihk)" <ku********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
To Dmitriy,

I don't know how to set the "ToolboxAttribute" to the control class;
can you list out the steps ?

BTW, I've found a tutorial on writing design time control to facilitate
IDE drag drop; but when I follow the tutorial the end result is the
Design Time control can't be added into the ToolBar (the error saids
this dll has some dependecies with something and can't be loaded
without them -- didn't list out what's missing)

Thx!
From Jason (Kusanagihk)


Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: John Ladasky | last post by:
Hi, folks, At the beginning of 2003, I was a frustrated computer user, and lapsed programmer, with problems to solve that screamed for programming. Thanks to the Python language and community, I...
0
by: Joe Helmick | last post by:
This one has me really stumped, so I thought I'd ask publicly. I was trying to take my ASP.NET web page "template" -- banner graphic, small navigation bar, and user feedback message area -- and...
4
by: DraguVaso | last post by:
Hi, I'm having some weird behaviour, and I can't find any solution to this. I made a UserControl (uclCommands) which contains a Toolbar (ToolBar1) with Modifiers = Public. I put this...
2
by: Peter Rilling | last post by:
It seems to me that the ToolBarButton should be a control, but instead it inherits from Component. Is there a reason this could not have inherited from Control since really a ToolBarButton is...
6
by: grist2mill | last post by:
I want to create a standard tool bar that appears on all pages that is a control. The toolbar has a button 'New'. What I wolud like when the user clicks on 'New' depends on the page they are on. I...
0
by: I am Sam | last post by:
Ok whats wrong with my toolbar? When I debug I don't get an error message and the databinding is working correctly but the toolbar itself and the <iewc:ToolbarDropDownlist /> control isn't showing...
0
by: Ryan Liu | last post by:
Hi, I have this inconsistent problem for days and really get me exhausted. I have a user control with a datagrid, a small toolbar, a label and a text box on it. Toolbar has buttons to...
3
by: jaxx0rr | last post by:
This will probably look like a really stupid piece of code.. but it works My question is, how can I write the last part so there is only one extended Canvas class that can recieve a parameter for...
0
by: =?Utf-8?B?R2F1cmF2?= | last post by:
We are using the toolbar control in VS.NET 2003. The toolbar has 4 existing buttons that are left aligned. I want to add 4 new buttons at the end of the toolbar i.e. make them right aligned....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.