|
Hi,
first create a class inheriting from CollectionEditor and override CreateNewItemTypes. The result should be an array of types which should be choosable.
Then add this attribute to your collection class:
[Editor(typeof(CriteriaCollectionEditor), typeof(System.Drawing.Design.UITypeEditor))]
public class CriteriaCollection : CollectionBase {
}
If you are lucky that's all you need to do .
Robert
|
|
|
|
|
WOW, nice 1, works a dream
Thanks, that has been the downfall of app and now its all working great.
I would have never worked that out by my self
Mark
|
|
|
|
|
I’m i bit stuck in my design.
It’s just that I not very familiar with XML programming in .NET.
Things is I’m creating a XMPP library in .NET. I have a working version dut I does not macth my demants.
What I want is a base xmpp element which it self extends some kind of XML element. This way I can easily set parameters en add sub element. But now the question, which element should I extend. I’ve tried XmlElement, but I don’t have a general XmlDocument in my project, nor can I. I could extend XmlDocument but this is overkill. I use the XmlTextReader to grab XML from the stream. I tried to extend XmlNode but I had no idea how to implement the abstract methods like name en such
Can any one point me in the write direction?
Tnx Remmelt
|
|
|
|
|
Hi
In my project i want to use an grid control which has abillity to add, edit, and remove rows
in the same manner what it do watch window in visual studio. In the beggining i suppose
what it can be achived throught ListView control, but unfortunately this control rather diffrent from my objective: one not have ability to add and remove rows in run-time and when i try to edit an column it is necessary what cell arlready have an value (at that this occur in creeper manner,
when i click by item which pretend to edit one responde only through an signifficant time).
Please advice me is exist an control which imitate VS Watch Window and where i can download one???
Or maiby some one already implement customization of ListView for similary purpose.
Thank.
|
|
|
|
|
hi all
i'm trying to access data from a datagrid. the datagrid contains the data of a datatable. how can i do it???
another problem is that i'm trying to show the contents of the datatable in a combo box.
the code i'm using is
if(results != null)<br />
{<br />
Databasecb.DataSource=results;<br />
}
the result is vey odd. instead of displaying the values in the datatable, the combo is filled with
System.Data.DataRowView
a multiple no of the times.
reply soon
|
|
|
|
|
to select data from datagrid try out
dataGrid1[row number,column number].ToString();
and to bind combo box try
Databasecb.DataSource=results.Table["table name"];
Databasecb.DisplayMeember="column name to display";
rahul
|
|
|
|
|
rahul
i tried doing what u sugested with the combo bue there is no option of results.Table["Table name"] so i tried Databasecb.DataSource=results.TableName;
however this gives me the following exception
Complex DataBinding accepts as a data source either an IList or an IlistSource
Saira
|
|
|
|
|
if Databasecb is datatable or dataview then try
Databasecb.DataSource=results;
Databasecb.DisplayMember="column name to display";
rahul
|
|
|
|
|
thanks rahul
u just solved the problem
Saira
|
|
|
|
|
My project requires to change Default Web Site of IIS to other name (example: medi) for browse http://medi instead of http://localhost. I don't know how to code in C#. Please give me a clue to solve.
Thanks.
|
|
|
|
|
Perhaps you can add the domain in the host file if you only want the name on your local machine.
If it is a network wide setting, you have to do it in your dns settings.
|
|
|
|
|
Hi,
Recently I have been working on creating an ActiveX DLL (for performing Image Scan using TWAIN and C#) which could be invoked using a Javascript call from an HTML page and the scanned image could be displayed within the page. I got most of the things but when I invoke the TWAIN driver, it displays the scanning control, I can perform New Scan multiple times within it but when I click at Accept nothing happens, the same code works perfectly when I invoke it from a Windows Form.
I trapped Windows Messages, it seems that when I do a call to the ActiveX from HTML it does not send any message back when I click Accept in the Scanning control.
The code for using TWAIN scanning using C# writtem by NETMaster was the guide for my current activity.
Help would be highly appreciated.
Regards,
|
|
|
|
|
Hi,
I developed P2P file transfers application using C#.NET in PC its working fine , but in Windows Mobile 5.0 , the chunks downloading is not complete, after downloading 4 or 5 chunks(32kB), its stopping.How to speed up the application?..
Anybody have idea?please help me..
|
|
|
|
|
Hi Sri harini,
being a bit more specific would be helpful. What kind of protocol are you using (TCP or UDP)? How do you buffer the chunks? How does it stop, with an exception? Maybe you should also post relevant parts of your code.
Regards
Sebastian
|
|
|
|
|
Hi Sebastian
We are using the following code to Read data,using TCP protocol.How to set the receive timeout option in Windows Mobile.Bcoz its throwing exception when we use SetSocketOption Method.
Please advise.
public void ReadData()
{
Byte[] buffer=null;
Socket s=null;
int port = threadVars.port;
int chunksize=threadVars.chunksize;
int cid = threadVars.cid;
int fileid = threadVars.fileid;
string hash = threadVars.chnkhash;
readlocked = false;
s=new Socket( SocketAddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
s.Bind(new IPEndPoint(IPAddr, port));
s.Listen(1);
Socket actualReader = s.Accept();
NetworkStream DataStream = new NetworkStream(actualReader);
int offset = 0;
int bytesActuallyRead = 0;
int i=0;
do
{
i = i++;
bytesActuallyRead = DataStream.Read(buffer, offset, buffer.Length - offset);
offset += bytesActuallyRead;
if (bytesActuallyRead == 0)
{
break;
}
Thread.Sleep(10);
}
while(actualReader.Connected && i<1000);
parentController.SocketReadComplete(false,cid, fileid, buffer,chunksize,hash);
}
DataStream.Flush();
DataStream.Close();
s.Close();
}
Thanks
Sri harini
|
|
|
|
|
Does anyone know how I can start or get more info on how to capture an A/V (audio/visual) stream? either directly like from a mic or a (web)cam or from a file.
Any clues?
Much appreciated.
Got a coding problem? Hand it to the CodeDevil!
______________________
Its the idiot who stops learning and the wise that keep asking you questions!!!!
|
|
|
|
|
Hi,
I have devolped one .net application using c#.net, according to my application requirement it should run only in 1024*768 resolution..
so, how can i get the resolution for a particular machine and change it to my desired resolution?
is that possible?
Jaydeep
|
|
|
|
|
for getting current resolution of system u can use
Screen.PrimaryScreen.Bounds.Height;
Screen.PrimaryScreen.Bounds.Width;
to change the resolution of system there is no direct way u have to use some window API's
rahul
|
|
|
|
|
It is generally bad practice to change the resolution on your users' machines. However, here is a good article about how to do it in C#:
Using P/Invoke to Call Unmanaged APIs from Your Managed Classes[^]
See the section: Task 2: Changing the Display Resolution
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Hello,
Friends, I want to pass parameters to a process while starting. And in process get
that parameters. How to do that.
Rahul Kulkarni
|
|
|
|
|
RahulRKulkarni wrote: I want to pass parameters to a process while starting
Use overload of Process.Start that takes an arguments parameter.
RahulRKulkarni wrote: And in process get that parameters
Change the main method of application to Main(String[] args) . args will conatin the passed command line parameters.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thank You very much.
It works fine...
Rahul Kulkarni
|
|
|
|
|
I am having a problem on MS Vista with balloon tips not showing, even with simple code like:
notifyIcon1.ShowBalloonTip(3000, "Test", "This is a test ", ToolTipIcon.Info);
Is there a new peice of code I should be using?
Thanks, Ben.
|
|
|
|
|
Are you using the Enable Visual Styles in your application?
[STAThread]<br />
static void Main() <br />
{<br />
Application.EnableVisualStyles();<br />
Application.Run(new Form1());<br />
}
|
|
|
|
|
hi,
how can i hide the exit, minimize and maximize buttons that appear on the top right side of the scree inside the title bar of the form. And if it is possible, also tell me how to modify the code and the action that those button do when clicked.
thanks in advance
jamil abou khalil
|
|
|
|