|
Yes - the easiest way is:
1) Right click on you solution in the Solution explorer window.
2) Hover the mouse over "Add", and select "Existing Project".
3) Use the dialog as you would expect.You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
How can i change the form Header heigh ? ( in C# )
|
|
|
|
|
If you mean the titlebar, then the answer is you can't. However, you can create your own custom titlebar very easily by using components from the toolbox (panels, buttons etc.), and you can make your titlebar as big as you want. Just set the FormBorderStyle to none to hide all borders (including the titlebar), and you're ready to go. Kristian Sixhoej
"You can always become better." - Tiger Woods
|
|
|
|
|
Hello all,
Am creating mouse events. My application allows the user to draw a line. Then a will convert that line into a rectangle. The user may start drawing from anywhere with any angle. So using the draw rectangle i cannot draw that. because, when user draws a line, i should convert that line to a rectangle by drawing 2 lines parallel to the user's line, each on both the sides. and then join those points to form a rectangle.
So i need to draw a line parallel to existing line. How can i do that.....?
|
|
|
|
|
that is simpel. As you draw with original line, other line shoud have two point more or less than original, other two should be same
|
|
|
|
|
|
As the user draws the line, create two more lines with same X coordinate but different Y coordinates. To draw line above the user's, use a lesser value of Y coordinate and higher value to draw below it.
To draw the other two lines to complete the rectangle, draw lines with following coordinates:
Line 1: From start X of any of the lines(since they are same) and Y coordinate of top line to same start X and Y coordinate of lower most line.
Line 2:End X and Y coordinates of top and lowermost line.
|
|
|
|
|
|
v17.poornima wrote: he user may start drawing from anywhere with any angle. So using the draw rectangle i cannot draw that.
Yes you can!
private Point startPoint = new Point(0,0);
private Point endPoint = new Point(0,0);
private bool drawing = false;
private void panel1_MouseDown(object sender, MouseEventArgs e)
{
startPoint = e.Location;
endPoint = e.Location;
panel1.Invalidate();
drawing = true;
}
private void panel1_MouseMove(object sender, MouseEventArgs e)
{
if (drawing)
{
endPoint = e.Location;
panel1.Invalidate();
}
}
private void panel1_MouseUp(object sender, MouseEventArgs e)
{
drawing = false;
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
if (!((startPoint.X == endPoint.X) && (startPoint.Y == endPoint.Y)))
{
Rectangle r = new Rectangle(startPoint.X, startPoint.Y, endPoint.X - startPoint.X, endPoint.Y - startPoint.Y);
e.Graphics.DrawRectangle(Pens.Black, r);
}
}
This only draws the rectangle in one quadrant of the four possible, but it is a simple matter to ensure it draws in all four.You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
If I understand you correctly, you want to draw a rectangle at the angle defined by a line.
You will need to do some Cartesian geometry and draw 4 lines to construct a rectangle.
Graphics.DrawRectangle() will not help in this case.
Nick----------------------------------
Be excellent to each other
|
|
|
|
|
|
Hi All,
After posting a question on here a day ago I kept on wondering did I use the right terminology to communicate my problem? Am I confusing you all by what I'm trying to convey? What wording should I be using to convey the subject matter at hand? These are my questions I have for this post. For instance saying I'm calling a CR 11.5 object in my win application, is that the correct way of putting it? Here's the post:
I have this Crystal Reports Utility that is helping us convert reports from 9 to 11.5 and then up to CR2008. I know this sounds strange but it was the time line of when the utility was created in. Ok so in this application both CR 11.5 and CR 2008 objects (dlls) are being used. The app first calls 11.5 reportdocument object, does some work and attempts to close the com object with Marshall.Interop.Release(com object) and then proceeds to call a CR2008 object. When it does try to instantiate a CR2008 object I get a com error. It seems as if, one the GC is not disposing of 11.5 reportdocuement object yet and two there must be some common crystal reports dll being shared between the two versions. Does this sound like a fair assessment of the situation? Outside of shutting down the app and running each procedure separately which just confirms the dll conflict. How else can I confirm that this is happening?
So I'm not interested so much about this issue as I am in trying to explain it. This means a lot to me since communication is one of the keys to being a good programmer. At least in my eyes.
DotNetMan
|
|
|
|
|
You get points for the creative repost. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Nope I'm being truly honest here. I'm more interested at this point in knowing if
I'm getting the point across.
DotNetMan
|
|
|
|
|
Did you stop to think that maybe no-one knows the answer to your original question, which is why there were no responses.
After reading your original question the only thing I could think of was why would you be doing it, this doesn't help you with the problem you have so I didn't post a response.
|
|
|
|
|
At least he's making sure he phrased his question correctly. Many of the people that post here don't care, or are completely incapable of posting a correctly phrased question..45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: Many of the people that post here don't care, or are completely incapable of posting a correctly phrased question.
This is true, unfortunately.
|
|
|
|
|
Guys I'm being very sincere in this post. I'm just asking am I using the right terminology in describing my issue, that's it. I'm not trying to be tricky in trying to get my orig post answered.
I was at Barnes and Nobles yesterday reading "Coders at Work" by Peter Seibel which talks about what certain great coders practices are like. One of the take aways from the book is good communication. Which got me thinking, am I using the right terminology in describing my issues(posts)?
I just want to know can you understand what I'm trying to convey? Which no one has answered yet. lol
DotNetMan
|
|
|
|
|
There wasn't anything wrong with your terminology, at least as far as I was concerned.
Keep in mind though, that communication isn’t just your ability to accurately describe what you need to get across but also to comprehend what others are trying to communicating to you.
|
|
|
|
|
It would seem that what I really want to do is move around a child form based on mouse coordinates and keep the focus on the parent form. The movement of the child form would be referenced to the cursor. Any guidence would be appreciated.
|
|
|
|
|
OK I've figured this out. Thanks.
|
|
|
|
|
The proper response should have been to include the solution so anyone with a similar issue could see it as well. Short of that, since no one had responded delete the post, which you can't do now. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
how can i create Documentation for SQL server Database ?(like access )
|
|
|
|
|
Use NotePad
What type of documentation are you referring to? I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Something like :
Tools--->analyze---->Documenter in ACCESS Database modified on Saturday, March 13, 2010 1:06 PM
|
|
|
|