|
CP rules! Thanks guys. Your suggestions were great . . . and that set article is terrific!
|
|
|
|
|
I’m not familiar with the Modified property but the locked property, from what I understand, is only used by the designer. I find that it comes in handy when you don’t what a control to get moved by mistake.
Did you write the designer in C#? I’m not trying to be cute, but perhaps you should make this “bug” a “feature”.
|
|
|
|
|
Hey Zero,
Sorry to get off topic but I tried to create a designer in C# about a year ago and gave up. The problem that I ran into was:
1)Place a control onto the workspace.
2)Place a second larger control that completely covers the first control.
3)Click and do a rubber band select of the second control (the rubber band rect completely surrounds both controls.)
4)Release the mouse.
Now both controls should be "highlighted" to show that they are selected. You should see the highlight of the fist control appear on top of the second control - even though it is totally "under" the second control and not visible. (That's how it works in visual studio.)
I overrode every thing I could think of and even tried doing things in the WndProc to get the first control’s "highlight" rect to appear on top of the second control but nothing I did would make it appear because the second control was always drawn over the first’s highlight rec.
How did you accomplish it?
|
|
|
|
|
The Visual Studio IDE is used by Developers. These kinds of people dislike being restricted.
|
|
|
|
|
My web service methods return some non-string value(for example DateTime) , I want when some error(Exception) happend in my method I retuurn that error to the client. How can I report it to the client,for example send a string messsage error?
Mazy
No sig. available now.
|
|
|
|
|
One way could be to always return an XML string that could contain one of the following elements:
<ERRORS>
or
<RETURNVALUE>
Cheers,
Simon
"Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.
animation mechanics in SVG (my first abstract photo)
|
|
|
|
|
Thanks Simon.
How can I do this in my web service code?
Mazy
No sig. available now.
|
|
|
|
|
You'd need to wrap the error/return value into a string manually.
Not sure how you could automate that. Maybe using an HTTPHandler?
Cheers,
Simon
"Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.
animation mechanics in SVG (my first abstract photo)
|
|
|
|
|
hmmm..I'll try it.
Mazy
No sig. available now.
|
|
|
|
|
I would like to make a usercontrol with a datasource. How is this possible?
|
|
|
|
|
Inherit your control from ListControl. It contains the base implementation for binding a control to a list. If you just want to bind your control to a single value, take a look at the Control.DataBindings property.
|
|
|
|
|
Okay,
I am doing Conway's Life on my own to get familiar with doing graphic drawing. I have a picture box named world. I have a routine NewView() which will
- create a black pen (death), blue pen (birth), and red pen (living)
I was planning to just draw points on the pictureBox for each point in the 500x500 array area. Unfortunately I am lost as to just how to start out. I know I create my System.Drawing.Pen(Color.Black), etc. and I think I have to create a System.Drawing.Graphic object. But beyond that I'm lost as to the next step to have that Graphic bound to the pictureBox and having the points drawn.
Any help and tutorials that can step me through it (in C#) would be appreaciated!!!
Thanks,
MJ
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
theRealCondor wrote:
I know I create my System.Drawing.Pen(Color.Black), etc. and I think I have to create a System.Drawing.Graphic object. But beyond that I'm lost as to the next step to have that Graphic bound to the pictureBox and having the points drawn.
Override the OnPaint method and use the Graphics object provided.
leppie::AllocCPArticle(Generic DFA State Machine for .NET);
|
|
|
|
|
Well....I cannot override a method of a control in my form from my form. But that was the start of my searching.
First I hooked into the Paint event for the control and used control.Invalidate() to fire that event. It worked somewhat but I had a result that was not all that visible and I was having problems drawing points.
My second attemt did work though which I extended from the DrGUI article on doing Conway's Life.
I created a Bitmap object Bitmap img; , created a graphics object Graphics g = Graphics.FromImage(img); then I just set my pictureBox.Image = img once I drew my graphics inside the image. Works great.
Now all I have to do is get factor in form resizing, image scaling, and I have it all done!
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
Hi guys,
My application opens and saves files in a particular format. I have added the entries in the registry to associate this file type with my application (by extension). When you double-click one of these files in Windows Explorer, my application launches which is great. Now, how do I get the path of the file that was clicked? I've checked the arg[] passed into the Main method and it's not there. How do I get it so I can open the file? Also, how can I open the clicked file in a currently running instance of my application?
Thanks in advance
Andy
|
|
|
|
|
BigAndy wrote:
I've checked the arg[] passed into the Main method and it's not there.
Of course its there. Whats your code that you check it?
Mazy
No sig. available now.
|
|
|
|
|
Oh no they're no...
static void Main(string[] Args) <br />
{<br />
StreamWriter objSW = new StreamWriter("C:\\Args.txt", false);<br />
objSW.WriteLine("Args Start------");<br />
for(int x = 0; x < Args.GetLength(0); ++x)<br />
{<br />
objSW.WriteLine(Args[x]);<br />
}<br />
objSW.WriteLine("Args End------");<br />
objSW.Close();
.....
The file (Args.txt) has the "Args Start------" line and the "Args End------" line but nothing in between. Any ideas? I'm using Windows XP Pro.
Andy
|
|
|
|
|
How did you create the registered extention?
Your example works fine here.
Rocky Moore <><
|
|
|
|
|
OK, I found the problem. The exe path in the registry needs to have a %1 after it to denote the file path ("C:\Program Files\A Folder\Program.exe" "%1"). Thanks for the help.
|
|
|
|
|
hi,
if any one has seen the code given for the MIDI and compiled the same it gives an error of some header file .Can you suggest form where to get that dmusicc.h file.
also if it could be clarified if MIDI can be accessed by another Application Software.If,yes how is it possible?
Regards
design engg
|
|
|
|
|
You seem to be in the wrong area. This the C# not C++.
The file is a DirectX and would be were ever you installed the SDK.
Rocky Moore <><
|
|
|
|
|
I found an awesome licensing product for .NET
Take a look at it http://www.xheo.com/Products/Licensing/[^]
Just a few months back I couldn't find anything that would support .net
Does anyone know of any other similar products?
|
|
|
|
|
I am using getValues
lets say in SQL its a bit field which I believe is a SqlByte class I think
and lets say the field is a boolean
Is there anyway using getType and the like to do autmatic conversion without using switch statements to determine the type.
a way using reflection to query the two types and convert them to the compatible type?
links or examples most welcome
nick
|
|
|
|
|
the SqlDataReader GetValues method by the way
|
|
|
|
|
How do I make a list box automaticly scroll down to the bottom of the list?
/\ |_ E X E GG
|
|
|
|