|
There's examples of this all over the web. A simple Google search comes with over 25,000 hits...
Google results...[^] take your pick.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to draw simple rectangle , how can i do this??
Is there smth. similar to "CPaintDC"(in C++)
m0n0
|
|
|
|
|
I hope....you're asking for C#
well all you have to do is to get a graphics object say naming it g
and then g.drawRectangle(....);
then dispose g
....I suggest to get to google and search for GDI+ programming...there are many cool tutorials!
GaMBiT---> aND ReVeNGe WiLL Be
|
|
|
|
|
|
Hi everybody , i have written program in C# , and compiled using "Release", but now i want to take my program to a computer where Studio.Net is not installed , should i copy any *.dll files with my program , or what should i do in order to run my program??
Regards
m0n0
|
|
|
|
|
Hi
First of all C# is on the .NET Platform.
Secondly...you can copy and install only a small part of the .NET dlls but...I would rather suggest you to install the full .NET Platform, as to ensure stability!
If I were you I would install the full .NET platform...come on only 25Mb...not a big expense!
....I'm not sure about this.....but Windows XP Service Pack II incorporates the most basic and fundamental dlls....but I'm not so sure!
GaMBiT---> aND ReVeNGe WiLL Be
|
|
|
|
|
Hi!
.NET Framework is a must. Period.
Once that's installed, however, you usually can just copy all the DLLs and EXEs from your build directory to an arbitrary directory on the other computer and it should work.
That's called XCOPY deployment, btw.
Regards,
mav
|
|
|
|
|
How can i programatically get, current date and time ??
Regards
m0n0
|
|
|
|
|
string t = "";
t += DateTime.Now.Date.Day.ToString();
t+= "/";
t+= DateTime.Now.Date.Month.ToString();
t += "/";
t += DateTime.Now.Date.Year.ToString();
string t2 = "";
t2+= DateTime.Now.Hour.ToString();
t2+= ":";
t2+= DateTime.Now.Minute.ToString();
t2 += ":";
t2 += DateTime.Now.Second.ToString();
GaMBiT---> aND ReVeNGe WiLL Be
|
|
|
|
|
DateTime.Now is correct, but the formatting is a mess...;P
DateTime has many wonderful (and culture-sensitive!) methods for formatting the output, there's no need to use 12 lines when you can simply write
string t = DateTime.Now.ToString("dd/MM/yyyy");
string t2 = DateTime.Now.ToString("HH:mm:ss"); Regards,
mav
|
|
|
|
|
I am using Graphics to draw a rectangle to indicate a new location of a control as the users move the cursor around.
Now the thing is my rectangle, when moving over other controls, is covered by other controls. How do i change the z order of the graphics so that i can see the whole rectangle while moving it over a control?
Thank you so much for reading and please help me out
Elapid For The Win
|
|
|
|
|
There are two methods inherited from Control to perform this:
BringToFront() and SendToBack() . They do what their names imply.
Regards,
mav
|
|
|
|
|
i have found the code here (http://www.codeproject.com/dotnet/CSharpWhiteboard.asp) ,but it only can be used by two users . unfortunately, i need one which can support many users (i know that it need a server ,and need to use SOCKET) .
how to finish it ??? need to help !
thanks !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
can u send me some useful things about it ?
my email------------- saxon_100@hotmail.com
need helps . i know there are many master-hand
|
|
|
|
|
hii all;
am facing a real problem. i need directx help with c# but every time i download SDK i find only help with c++.
where do i find SDK with C#?
thanx form your time.
marcoryos
|
|
|
|
|
The SDK contains C# help and C# samples. If you don't see them, you've not downloaded the latest SDK. Actually, I think when you install the SDK you need to choose the managed stuff. Certainly when you install the runtime, you need to include the /manageddx switch, or you get nothing.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Is it possible to get leeters of the drives of the system, but only hard-drivaes (no cd, dvd etc)? I only could find a method that reads all system drive letters no matter what they are.
//Kordzik
|
|
|
|
|
Take a look at the System.Management namespace.
With a WMI search like "select * from Win32_Volume " for a ManagementObjectSearcher you can get all the volumes attached to the system and then query their properties.
Regards,
mav
|
|
|
|
|
Since you want specific drives, you would have to check the drive type. The way I would do it is by using the System.Management namespace and execute a WqlEventQuery to check the drive type (e.g. type 5 means it's a cd-rom). Check
this[^] for more info. Hopefully it will clear a bit things out for you.
Polis
|
|
|
|
|
i got an application that contains a text box, i want to draw lines depending on the TextBox input. I know how to draw, but how could I make the drawings dependent on TextBox input.
thnx in advance
|
|
|
|
|
You could elect to only draw the lines after there was input from the user, and you could use the user's input to determine where to draw the line?
Why not provide text boxes for start and end coordinates, and a button to initiate the drawing of a line. By pressing the button, the user would be indicating that they are satisfied with their origin/termination coordinates. The logic to draw the line would simply convert the text input from the user to integer values, and use those values when rendering the line.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Hello,
I am trying to upgrade an existing Dental application by adding visual-representation of the human jaw, and allow the user (dentist) to be able to color each tooth. (For instance, a red sign on one of the tooth's corner would designate a filling).
More specifically, I need to find resources for finding out the best way for:
1. Representing the jaw (e.g. a bitmap for each tooth, or one bitmap for the whole jaw)
2. Being able to actually paint different parts of each tooth with different colors
3. Being able to store the new drawings for each tooth in the database with the rest of the patient's info (MS Access DB)
ANY help from anyone who had to do something like this before, or anyone who has any ideas would be greatly appreciated.
Thanx
Polis
|
|
|
|
|
Sounds interesting. In how many dimensions you want that visual representation? 2D or 3D? (assuming computer will have some better graphics card)
From the top of my head, I'd say #3 you don't store anything... draw it from information already in DB, no? There is no need to store information twice. Or do I miss something?
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Since this is purely a Dental application, there is no need in over-complicating things, so it's going to be a 2D visual representation (at least for start )
Regarding my #3: The user (dentist) will have limited options in the designs he/she can do on a tooth (for instance, 1 specific design for a filling, or a big red "X" sign over a tooth designating that the specific tooth is absent on the specific patient). It won't be a free-hand painting or something like that. Therefore, a there is a table in the DB which contains all of the possible designs and each time the doctor alters a tooth, that new (predefined) design will be stores in the patient's table as well.
Hope I've clear things a bit.
Polis
|
|
|
|
|
hmm my understanding is that there already is DB with information like fillings/missing tooth etc. for every tooth. (As you said you want to do visual representation, not to rewrite DB schema ) So you'll take these information from DB and render jaw from information you have there... example: in DB is that user #123 has one missing tooth at position 5 (or something, dunno). So you have somewere bitmaps for tooth OK, tooth with filling, missing tooth etc. ( not for every patient, only once!) and render all of them according to information form DB. After some change (e.g. on visual model you right click and set filling for tooth on position 7) you change this information in DB, like you did without visual representation. Maybe some kind of misunderstanding is going on?
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Yes David, what you are saying is making sense to me. You are right, I got the whole thing wrong in my mind.
So, what you are saying is that I keep a folder with all the possible bitmpaps for each tooth. Then, in the application the doctor selects the bitmap for the specific tooth (e.g. by right-clicking on the tooth) and apply it. Then, this change is saved in the Patients table for the specific patient (e.g. by saving the bitmap filename). Correct?
However, I am still wondering what is the best way for representing the jaw thing on the form. What do u think? A series of bitmaps (1 for each tooth) would be solution that fits the above logic right?
Any ideas on where I can get some resources? e.g. all-ready made bitmaps of a human jaw etc? Cause my research didn't really pay off.
Polis
|
|
|
|