|
|
that was my original plan i have managed to store the images in the database but i can only find articles that show how to display the images on a new form then but i need to be able to display them on the same userControl in a specified area.but i cant manage to find any articles or tutorials that can do this
|
|
|
|
|
|
yes very like that but the asp version of pictureBox(which is whats used here to display image)does not make it as easy to display an image in as this one seems to be
|
|
|
|
|
|
well i guess u guessed wrong... considering the fact that c# is used maybe u should RELAX
|
|
|
|
|
when i add values to comboBox i see use can change this value
how can make user can't change the value (just select value from list)
i use .Net 2.0
Palestine
|
|
|
|
|
Change the type of the combobox to a dropdownlist. You will find it in the properties.
Logifusion[^]
|
|
|
|
|
Set the DropDownStyle property to 'DropDownList'.
:josh:
My WPF Blog[^]
|
|
|
|
|
Thanksssssssssssssssss
Palestine
|
|
|
|
|
plz see this Q
http://www.codeproject.com/script/comments/forums.asp?forumid=1649&select=1569433&df=100&msg=1569433
Palestine
|
|
|
|
|
hello, I got this exception on the first line of this code in the designer:
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(3, 3);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(222, 94);
Basically i just added a picturebox to contain a jpg image. this form is common to all the applications and they work fine with the others. but the app im working on throw me back the error message. Im using VS2005 CF .net 2.0 so do the other app (which are written by me too). So i don't get it. why the others are fine but this later doesn't work.
Any suggestion?
Donkaiser
|
|
|
|
|
I have been working on a large project in VS2005, and I have come to need the System.Drawing.Point struct, and instead of having loads of stuff in the System.Drawing namespace I only have:
System.Drawing.Dimension<br />
System.Drawing.Dimension2D
I have been trying to work out what has switched this off but cannot fathom what it could be. Could some kind soul point (sorry for the pun) me in the direction of how to resolve this iritating issue, please.
Thanks.
|
|
|
|
|
I feel so stupid. As soon as I had logged this message I noticed that my project References was very low. I have now added a reference to the System.Drawing namespace and we are back in business. God knows why this became un-referenced!
|
|
|
|
|
I am optimizing application written in C#. It is apparently exceeding the user objects limit in XP.
Now I want to trace where all these user object are being created by the application.
Is there any tool available which would serve the purpose?
Or any other way?
Every bit counts
ADD
|
|
|
|
|
|
Hy,
Can anyone tell me a way to supress the paint event in Windows Forms?
I have on my form several controls and I don't want them to be redrawn when I maximize the form (for example).
Thanks
Do your best to be the best
|
|
|
|
|
Any time the state of the window changes (maximize, minimize, move a mouse, drag a form across....) it invalidates the view since that view is no longer valid. If you suppressed the Paint event then your controls would disappear from the view by the vary nature of Invalidate(). I'm curious as to the logic behind not redrawing the controls...perhaps there is another route that keeps your controls visible.
|
|
|
|
|
If you want to prevent the Paint event from firing (which is a very odd thing to do, btw), then you can override OnPaint and do not call the base implementation. The base impl fires the event.
:josh:
My WPF Blog[^]
|
|
|
|
|
Hi @all,
i have a big problem. I want to read an attribute from the following XML-File:
-------------
<main>
<equations>
<rule name = "equation1"
calc = "D=A+B+3*C"></rule>
<rule name = "equation2"
calc = "E=A*B+C*D"></rule>
<rule name = "equation3"
calc = "C=B/A"></rule>
</equations>
<values>
<rule name = "equation1">
<Source obj = "12.3"
field = "A"></Source>
<Source obj = "1"
field = "B"></Source>
<Source obj = "23"
field = "C"></Source>
</rule>
<rule name = "equation2">
<Source obj = "1"
field = "A"></Source>
<Source obj = "1"
field = "B"></Source>
<Source obj = "7"
field = "C"></Source>
<Source obj = "6"
field = "D"></Source>
</rule>
<rule name = "equation3">
<Source obj = "12.3"
field = "A"></Source>
<Source obj = "1"
field = "B"></Source>
</rule>
</values>
</main>
---------------
So tried to get the "equation1" from the first rule segment in value with the following code:
-----------------
XPathDocument document = new XPathDocument("test.xml");
XPathNavigator navigator = document.CreateNavigator();
XPathNodeIterator name = navigator.Select("main/values/rule[0]");
string i = name.Current.GetAttribute("name", string.empty);
-----------------
or:
-----------------
XPathNodeIterator name =navigator.Select("main/values/rule[0]/@name");
if (name.MoveNext())
{
string i = name.Current.Value;
}
-----------------
Nothing works! I'am getting an empty string (""). If I debug I see name->Current->HasAttribute = false.
I dont know what I can do. Can you help me please?
Thank you very much!
(sorry for my english, my native language is not english
-- modified at 9:39 Monday 10th July, 2006
|
|
|
|
|
Hy,
When I'm working with XML files I always use XmlDocument. Try this and see if it works:
XmlDocument document = new XmlDocument();
document.Load("file.xml");
XmlNode node = document.DocumentElement.ChildNodes[0];
Then use the node.Attributes[ <index or="" name="">] to get the attribute. If you want to do this for every node there is an XmlNodeList class which can be used.
Do your best to be the best
|
|
|
|
|
You can use something like this:
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("test.xml");
XmlNode equationsNode = xmlDoc.ChildNodes[0].ChildNodes[0] as XmlNode;
XmlNode valueNode = xmlDoc.ChildNodes[0].ChildNodes[1] as XmlNode;
foreach(XmlNode xmlNode in equationsNode)
{
XmlAttribute nameAttr = xmlNode.Attributes["name"];
XmlAttribute calcAttr = xmlNode.Attributes["calc"];
Console.WriteLine(nameAttr.Value + " " + calcAttr.Value);
}
foreach(XmlNode xmlNode in valueNode)
{
foreach(XmlNode sourceNode in xmlNode.ChildNodes)
{
XmlAttribute objAttr = sourceNode.Attributes["obj"];
XmlAttribute fieldAttr = sourceNode.Attributes["field"];
Console.WriteLine(objAttr.Value + " " + fieldAttr.Value);
}
}
|
|
|
|
|
Thank you very very much Karkster and stancrm!!! This will help me much more!
Thanks again!
|
|
|
|
|
i have listBox with multi coulm
how can add control to item 1 in col 2 ??
control as comboBox
Palestine
|
|
|
|
|
A listbox is not multi-collumn. So you either have a custom control or you have a DataGridView and the answer would greatly differ based on each type of control.
United States
|
|
|
|