|
Hi,
I haven't done this, but maybe you can:
1. use a Panel, and draw lines on it with Graphics.DrawLine
2. put a RichTextBox on top of it, and set its BackColor to transparant.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
When setting a RichTextBox BackColor to transparent I get an error "Control does not support transparent background colors."
The code I was using was: richTextBox1.BackColor = Color.FromArgb(100, Color.White);
Unless I did something wrong with the way I did this, looks like this idea is out. I've tried playing with transparent controls before and I'm always dissapointed that there deosn't seem to be more native support in this area!
Thanks for the suggestion though!
Chris
|
|
|
|
|
WPF (Windows Presentation Foundation) is the next generation UI toolkit. It provides rich support for documents, animation, imaging, video and other nice things. It is .NET 3, yes.
|
|
|
|
|
Hi all
I'm calling a non-.net web service and getting myself confused.
The object that is being created from the WSDL includes and out_msg, which is basically the return value. Within out_msg, there is an array of deal objects, however it's not a true array as I can't enumerate it - how do I convert this return value in to something useful (XML, generic list, well, anything really!).
/// <remarks>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
public partial class out_msg {
private object itemField;
/// <remarks>
[System.Xml.Serialization.XmlElementAttribute("deals", typeof(deal[]))]
[System.Xml.Serialization.XmlElementAttribute("errors", typeof(out_msgErrors))]
public object Item {
get {
return this.itemField;
}
set {
this.itemField = value;
}
}
}
Thanks
Ben
|
|
|
|
|
Look in the debugger the type, and cast it...
xacc.ide
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|
|
Thanks Leppie - think I was having a Friday brain melt-down. Had already tried casting to an ArrayList and a generic list of deals objects.
But, of course, it was just a good old fashioned array.
Cheers
Ben
|
|
|
|
|
Bjohnson33 wrote: Friday brain melt-down
Thats ok Happens to everyone
xacc.ide
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|
|
You can tweak and change the xsd file to suit your needs. The xml serializer is very leniant. Just do your best to make it match the input schema.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: The xml serializer is very leniant.
But not forgiving! Ever had to debug that lame generic XML serialization exceptions? You have to drill down into about 45 inner exceptions to get to the root of the cause
xacc.ide
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."
|
|
|
|
|
Hi all...
It's not a proper C# question, but my app is developped in C# and I didn't find a better place to post...
I finally joined the moment to deploy my App.... Easy: everything works fine! But I'd like to have the install process in 3 different languages, and I couldn't figure out where and how can I do this!
Any suggestion? Tnx a lot!
|
|
|
|
|
|
I thought that could be done in Visual Studio Setup project...
I don't like so much the SDK... but let's try anyway!
Tnx for the answer!!!!
|
|
|
|
|
Does anyone know places where I can learn more about visuals for C#, like, blurring, softening and things like that? Also, is there a way to set events for graphics you've drawn, like click and hold? Finally, are there any sounds that are already on the computer besides system sounds to use? Thanks in advance.
The most knowledge doesn't mean the most wise...
|
|
|
|
|
MasterSharp wrote: Does anyone know places where I can learn more about visuals for C#, like, blurring, softening and things like that?
That depends on if you are talking about graphics, windows forms or WPF.
MasterSharp wrote: is there a way to set events for graphics you've drawn, like click and hold?
Graphics that you have drawn are just differently coloured pixels, they can't handle events. If you want evens, you need controls.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Ah... I mean graphics. Well, I had an idea where you could grab a circle by clicking and holding and move it, and release the click to drop it... It's for another simple game I thought I could achieve...
The most knowledge doesn't mean the most wise...
|
|
|
|
|
Here's [^] about as simple an example as I can find.
|
|
|
|
|
Hey, I'll take anything. Thanks a lot!
The most knowledge doesn't mean the most wise...
|
|
|
|
|
Also, is there any way to make lines in an app anti-aliased?
The most knowledge doesn't mean the most wise...
|
|
|
|
|
MasterSharp wrote: Also, is there any way to make lines in an app anti-aliased?
Yes. If you are drawing in a graphics container, you can set the SmoothingMode to AntiAlias. This will not affect the text, but will affect lines in the container. Check out the MSDN documentation for Graphics.SmoothingMode.
Marshall
If you continue to do the same things you always did, don't be surprised if you get the same results you always got.
|
|
|
|
|
Where is smoothingmode? Is it an extra using statement? Also, do you know the code to, while the mouse is clicked over a picturebox, that you can drag it around? I checked out the drag and drop events, but I don't see... Thanks, tough.
The most knowledge doesn't mean the most wise...
|
|
|
|
|
I found smoothingmode. Thanks, but can you still help with the other thing?
The most knowledge doesn't mean the most wise...
|
|
|
|
|
Can I use more than one of the coices in smoothingmode at once?
The most knowledge doesn't mean the most wise...
|
|
|
|
|
No you can't use more than one choice.
Marshall
If you continue to do the same things you always did, don't be surprised if you get the same results you always got.
|
|
|
|
|
Do you know anything about the dragging thing?
The most knowledge doesn't mean the most wise...
|
|
|
|
|
Pardon me for saying so, but it sounds to me like you are in way over your head. You are simply writing code without any understanding of what it means. I suggest you slow down, read and understand the documentation. Then think about how each object works and how you can manipulate it to accomplish your goal. If you do that, you will quickly see the answer to your question. Getting fast answers on the web is not going to help you in the long run.
I am not trying to insult you and hope you see that. I am only trying to give you good advice.
Marshall
If you continue to do the same things you always did, don't be surprised if you get the same results you always got.
|
|
|
|