|
If you remove the container, you'll lose it's contents. Where were you hoping they would go ? You'd need to replace them with conventional menus and toolbars, and I don't think there's an automated way to do that.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thought so. I dropped the MenuStrip, ToolStrips (2) and a StatusStrip on a form. Later I added a ToolStripContainer (with four panels). Didn't like it so now I want to remove it.
Mark
|
|
|
|
|
need to know hw 2d dwt wrks for images hv a class in 1d form.
|
|
|
|
|
u shd wte cplet stcs or we dnt undsnd u
modified 12-Sep-18 21:01pm.
|
|
|
|
|
There's a full 101 key keyboard in front of you. Use it.
TXT speak is frowned upon here because it makes your posts difficult to understand. All I could pick out was something about 2D drawing?
|
|
|
|
|
Dave Kreskowiak wrote: There's a full 101 key keyboard in front of you. Use it.
Hey, the subject of the post is "compression". Maybe he's proposing some sort of text compression algorithm. Lossy, obviously...
Anyway, your guess is as good as mine...
Sean
|
|
|
|
|
|
how do can i open excel charts(in Excel 2007)in .net with C#?
|
|
|
|
|
The Microsoft Tools for Office give you the ability to interact with Office.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I generally use this method to update buttons cross-thread, but ToolStripButtons don't have the InvokeRequired property.
delegate void UpdateStartDelegate(bool newState);
private void updateStartButton(bool newState)
{
if (startButton.InvokeRequired) // is cross-thread update
Invoke(new UpdateStartDelegate(updateStartButton), new object[] { newState });
else
startButton.Enabled = newState;
}
Is there an easy way to do the same thing with a ToolStripButton?
|
|
|
|
|
((Control)btn).InvokeRequired
only two letters away from being an asset
|
|
|
|
|
All ToolStripItems (suach as ToolStripButton) are only of type Component. They don't inherit from Control.
Regards.
|
|
|
|
|
You're correct, my mistake
only two letters away from being an asset
|
|
|
|
|
use a synchronous calls using a timer
|
|
|
|
|
I apologize for posting on an old thread, but I had the exact same question, and there did not seem to be an answer to this one. Someone mentioned using a timer, but my cross-thread could take several seconds, several minutes, or several hours.
I think I came up with an answer, so for future searchers I decided to post. I would test the ToolStrip that contained the button. This code seems to work to enable a toolstripbutton when a thread is done.
public void Enable()<br />
{<br />
if (toolStrip.InvokeRequired)<br />
{<br />
EnableButtonCallback d = new EnableButtonCallback(Enable);<br />
toolStrip.Invoke(d, new object[] { });<br />
}<br />
else<br />
{<br />
button.Enabled = true;<br />
}<br />
}
|
|
|
|
|
Hi,
I am designing a paint brush type program…..for drawing area where I can draw something then I used pictureBox…..like as
Pen p = new Pen(Color.Red, 5);
g = pictureBox2.CreateGraphics();
g.DrawEllipse(p, e.X, e.Y, 5, 7);
in this program I can draw anything but when I want to save this drawing by the help of this command: pictureBox2.Image.Save(saveFileDialog1.FileName);
then an error occur : “NullReferenceExpection was unhandled !”
“Object reference not set to an instance of an object.”
I need your help………can anybody solve my problem
Thanks
|
|
|
|
|
I'm guessing that Image is null. From what I remember if you want to save what's been drawn you need to do it another way, can't remember off the top of my head.
|
|
|
|
|
I am constantly amazed at what people do with picture boxes.
zeeShan anSari wrote: g = pictureBox2.CreateGraphics();
This does one thing and one thing only. It allows you to draw something temporary on top of a picture box. What it plainly does not do, is change the image inside the picture box. You should never do this, unless you're drawing a rubber band ( something you want to lose ). If your form is invalidated, what you drew will be lost.
What you need to do, is create an actual image, draw on it, and put it into the picture box. As someone else said, Image defaults to null, you did not change it, it is still null.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
solution is here:
Bitmap bmp = new Bitmap(pictureBox2.Width, pictureBox2.Height);
Graphics g = Graphics.FromImage(bmp);
Pen p = new Pen(Color.Red, 5);
g.DrawEllipse(p, e.X, e.Y, 5, 7);
pictureBox2.Image = bmp;
|
|
|
|
|
Can anybody send me the solution how to get Max value from a nodelist in C#. 4002-9568-F47910C94602}</CreatedBy>
<EffDate offset="">3/1/2007</EffDate>
<Effective offset="">3/19/2007 9:43:57 AM</Effective>
<Expiration />
<Id>{1A1678C9-8E9F-4779-B794-BB8B9B44067B}</Id>
<Modified />
<ParentId>{153EB717-9DB0-4DEC-9951-F38E0A6F8800}</ParentId>
<PolicyTermPremium offset="1405.00">0</PolicyTermPremium>
<Process offset="">3/1/2007</Process>
<ProRatedChangePremium offset="1405.00">-1104.33</ProRatedChangePremium>
<Status offset="">Cancelled</Status>
<SuppressPrint />
<TotalProRatedChangePremium offset="1405.00">300.67</
TotalProRatedChangePremium>
<Type offset="">Pro-rate</Type>
<UnitNumber>3</UnitNumber>
<VersionedId>{1A1678C9-8E9F-4779-B794-BB8B9B44067B}</VersionedId>
file:///C|/Documents%20and%20Settings/mdowdy/Desktop/Packaging/Interfaces/PolicyCancel.xml (56 of 57)4/17/2007 1:52:18 PM
file:///C|/Documents%20and%20Settings/mdowdy/Desktop/Packaging/Interfaces/PolicyCancel.xml
</Transaction>
</Policy>
Since <UnitNumber>3</UnitNumber> it is maximum my <Action offset="">Cancel</Action> and
<Status offset="">Cancelled</Status> tells me that my Transaction is Cancelled.I need this "Cancelled" word.
|
|
|
|
|
You got so wrapped up in providing more info than we might look at, that you forgot to ask your question...
|
|
|
|
|
yes,My Question is how I get the combination of Action and Status based on the max UnitNumber.
I need the cancelled or this sort of string from the Action and Status.
|
|
|
|
|
You keep asking these specific XML questions, and the answer to all of them, appears to be Xpath. Go to the w3 website, or any other site with XPath tutorials, and work through them.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Unless you only need this once, or that's the only thing you're going to need from this, I'd personally build an XML serializable model so you can deserialize your XML to objects and work with them. Then your model can provide anything from the data. You could use the abominable XSD.exe or something like Skeleton Crew[^] to build your model from your sample XML.
I'd tend to use this approach anyway (I love XML serialization), but if you only need one piece of info or you only need to look at files once then maybe XPath would be quickest.
|
|
|
|