|
PC17 wrote: That i can use it for more things
Consider putting the DLLs in the GAC.
|
|
|
|
|
When all code is C#, you could create a single project holding all the source files; and add the XML file to it, with BuildAction=EmbeddedResource. Then you need a bit of code to extract the XML as a string, replacing your file reading code.
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
For the xml file, add it as an EmbeddedResource as others have already said.
For the dlls, can use ILMerge to merge them with your exe.
|
|
|
|
|
i'm trying to create 2 custom controls, once you compile, you have a nice custom control up in the visualstudio I.D.E..
i would like to achieve, the once a dragged 'MenuStrip' onto my form and start adding item, that these items are also a new created costrum control 'cToolStripMenuItem', instead of standart item
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Text;
namespace OwnerDraw_Test_3
{
class CMenuStrip : MenuStrip
{
}
class cToolStripMenuItem : ToolStripMenuItem
{
}
}
kind regards
Bad = knowing 2 much
modified on Thursday, September 24, 2009 2:41 PM
|
|
|
|
|
And your problem is?
What have you tried?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
wel, i'm trying to achieve, that items added to the menuStrip, are the items from my class and not the standart System.Windows.Forms.ToolStripMenuItem().
without anyneed to manualy moding the form1.designer.cs
this.ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem1 = new OwnerDraw_Test_3.cToolStripMenuItem();
Bad = knowing 2 much
|
|
|
|
|
Well, you are deriving your own class from MenuStrip, so you are in control of what happens in there. All you have to do is override any methods/events where a MenuItem is added/inserted/deleted. That is a lot of work, though.
Alternatively you can just create your own OwnerDraw_Test_3.cToolStripMenuItem() , as you are doing. What else you need to do will depend on whether you are only going to add them in code, or if you need design time support.
For design time support, look up the documentation for the ToolStripItemDesignerAvailability attribute. From there you should find links that will help you in designing the cToolStripMenuItem .
For code only implementation, it is surely only a matter of casting to cToolStripMenuItem wherever there is interaction with your control.
Sorry not to be more help, but my internet connection is playing up, and it takes about 5 mins to get a google search up at the moment, otherwise I would have given you more specific links.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
|
hi friends...
am working with .net 3.5,am developed one web service now i want to access that web service by using c# windows application,but there is no add web reference option in context menu when i am right clicking on root node of the application(windows application)..please..
help me...any idea to get that option..
txs
in advance..
|
|
|
|
|
priyareguri wrote: am working with .net 3.5
There is this difference between how it used to be in earlier .Net version.
From 3.5 onwards, you dont see it as Add Web Reference, but you have a menu option Add Service Reference
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Thanks for your help man, I was also facing the same problem.
|
|
|
|
|
Hi,
Does the Add Service reference the same as Add Web Reference?
|
|
|
|
|
|
I have a WinForms app. I have various DataGridViews throughout my app in which I use a combobox column. One in particular will only display the display member when that column has focus EVEN THOUGH I have set the DisplayStyleForCurrentCellOnly property to false. Has anyone encountered this and, more importantly, solved it?
modified on Thursday, September 24, 2009 1:15 PM
|
|
|
|
|
I finally discovered what was causing the error. In the DataTable definition for the column in which the combobox was not being displayed, the datatype was defined as Int16. I changed it to Int32 and it works swimmingly.
|
|
|
|
|
I do write a quiz Program and i want When start quiz,my form be fullscreen and users can't exit question form i want even TaskManager on the below this form.
Tanks
|
|
|
|
|
mansoury wrote: and users can't exit question form i want even TaskManager on the below this form
... then I don't want to be using your application! Think of yourself as the end user - if you installed a program that did this, you would be very unhappy.
|
|
|
|
|
Why would you want to do that? you can't make your form go above task manager form. You can disable such ability for system user accounts, not from code thou (well I don't know how to do from code at least)
If you want the users to not be able to exit a question form then you can hide the ControlBox (buttons with [X] in) - but really, what kind for application does not let the user exit?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Didn't you read the OP?? Obviously this is for a quiz application, for quizzing. Haven't you ever quizzed before?
Seriously, liquid nitrogen.
|
|
|
|
|
EliottA wrote: Didn't you read the OP?? Obviously this is for a quiz application, for quizzing. Haven't you ever quizzed before?
Duh! Why did I not see that? Many thanks for being on the ball!
|
|
|
|
|
You are joking, right?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I have a feeling that if you make the Window fullscreen and "always on top", then it will (almost) accomplish what you want. However the user will still be able to get to the taskbar using the Windows key. Remember if you disable everything but your app, and then the app gets into a loop or hangs, the user's only option is restart. Not a good scenario; do that a few times and they'll never use your software again.
|
|
|
|
|
No, and not worth the effort anyway.
The taker would still be able to look up answers on a nearby system.
|
|
|
|
|
hi, i'm trying to code a Adobe Cs4 lookalike menustrip.
i found some material on microsoft's MSDN.
i stripted this example to a proper visual studio 2008 project.
if i apply the ...
this.MenuStrip1.Renderer = new RolloverItemRenderer();
it does remove the border when you hover the the mouse over a parent menuItem and simply gives a blue background and white chars.
i would like to override the hoover color + border and shape of the button.
also this methode is hard to use, it would be cool if you can edit the custom draw menu from the designer and the need of event.
so i think it need a totaloverhaul somehow.
i have experience on other control, like tabcontrol, button, etc, etc.
but it seems, this needs a diffferent aproach.
any volunteers to code a cool costum menu?
i can mail the project.
http://msdn.microsoft.com/en-us/library/system.windows.forms.toolstripitem.aspx[^]
Bad = knowing 2 much
|
|
|
|
|
I need to exclude one of properties in my class from data binding. Any easy way to do that? Is there any attribute to prevent a property from binding?
|
|
|
|