|
how can i save the images,circles,rectangle,lines or etc together..
if somebody knows it then plz explain me with some code...
i konw that image can be save via one of the Bitmap's method
i.e:
imageObj.Save(fileName);
but i want to save not only images , whole it(e.g: circles,rectangles,lines which a user is drawn on it) not a just an image.
plz dont send the source of anyother site because i m new commer
hghghgh
|
|
|
|
|
If someone knows the answer, they would answer your first post. Posting again isn't going to make things any better.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
yes i made a mistake but what should i do, when nobody anser me..
hghghgh
|
|
|
|
|
The first thing to remember is that no one here is a professional answer person. We do it to help each other. If you are not getting an answer, we don't know or can't figure out what you are trying to do.
Try google for an answer to your situation. Many times a simple google search will get you an answer faster than posting on a forum.
Try re-stating what you are trying to do in plain simple english.
Include what you have tried to do that did not work.
Patience.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
Sorry..........
i am making an image editor .....
this image editor can draw circle,rectangles and images....
the problem is that i am facing i want to save it..
hghghgh
|
|
|
|
|
I can't clearly understand what you're looking for but I think you should know what you want to save. For example if you want to save a rectangle properties you have to save it's location, size, color,... in a database (file, sql,...) and load them when user executes your application.
But if you explain some more, I think we can help you better.
|
|
|
|
|
|
The normal mechanism for performing this is to make each image item an object in its own right, possibly inheriting from a common base class, and then each item is responsible for writing the information to the serialization stream under the control of some form of "canvas". Typically, your base class might look like this:
public abstract class ImageBase
{
public int X { get; set; }
public int Y { get; set; }
public int Width { get; set; }
public int Height { get; set; }
public virtual ImageBase Save()
{
}
public virtual void Load( item)
{
}
}
|
|
|
|
|
Guys,
I send to a webservice a gift message string which can be any length. That service splits the string into 30 characters and creates a new line.
example:
I type:
Hi Jocey!! I Hope you have a stupendous 30th birthday! I'm aorry I can't make it! Suexoxo
The web service splits as follows:
Hi Jocey!! I Hope you have a s
tupendous 30th birthday! I'm s
orry I can't make it! Suexoxo
My question is, can we do something like this, if the break happens to be in a word like S orry can we fill up with spaces and send that sorry next line. I am unclear please follow up. may be some regular expression?
Thank you very much for your help guys!
|
|
|
|
|
Yes you can. Find all instances of the space character in your long string. Then only send strings based on the space not based on the character position. You can then add padding to the end if necessary.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
Use the LastIndexOf method to find the last space within the first 30 characters and split the string there. Use the PadRight method to add spaces.
Example:
string msg = "Hi Jocey!! I Hope you have a stupendous 30th birthday! I'm aorry I can't make it! Suexoxo";
List<string> lines = new List<string>();
while (msg.Length > 30) {
int pos = msg.LastIndexOf(' ', 29, 30);
if (pos != -1) {
lines.Add(msg.Substring(0, pos).PadRight(30));
msg = msg.Substring(pos + 1);
} else {
lines.Add(msg.Substring(0, 30));
msg = msg.Substring(30);
}
}
lines.Add(msg.PadRight(30));
foreach (string s in lines) Console.WriteLine("\""+s+"\"");</string></string>
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
your anser works like a miracle. one more question for you. how can I clean up the text from carriage returns and line feeds? before starting the process?
please advice.
|
|
|
|
|
I suppose that you want spaces in place of the line breaks?
msg = msg.Replace("\r\n", " ");
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi friends
How to implement union of C++ in C#
thanks in advance
-kk.tvm-
|
|
|
|
|
|
thanks 4 your reply, but i getting a error offset is error
public struct _ABC
{
[FieldOffset(0)]
public int a;
[FieldOffset(4)]
public short b;
[FieldOffset(6)]
public int c;
[FieldOffset(6)]
public int d;
}
I am getting an error while compiling above code, fieldoffset(6) is not aligned
Can u help me
-kk.tvm-
|
|
|
|
|
hmm, it works for me:
_ABC test;
test.d = 0;
test.c = 5;
Console.WriteLine("d = {0}", test.d);
outputs
d = 5
the only thing that I had to change about your struct definition is that it's missing this above it:
[System.Runtime.InteropServices.StructLayout(LayoutKind.Explicit)]
|
|
|
|
|
good afternoon to everyone out there!! I am having a setup for my app (freshly baked) and I need to install third party tool within the app so the app can work normally. I want to know if is possible somehow the setup for the third party tool be installed together with the installation of my app. I don't want to bother the clients with two setups and I want to install both (app + third party tool) in one setup. Is that possible?? Thx in advance
|
|
|
|
|
Hi all,
I am very new to c#,
My current project is on E-Learning Domain(Asp.net 2.0 and c#).
can any one suggest me which type of Design pattern is best suited for this type of Projects.
Please respond as early as possible
Thanks and regards,
Y.A.krishna Prasad.
fttyhtrhyfytrytrysetyetytesystryrty
|
|
|
|
|
Design patterns are patterns that describe sections of the software architecture. You don't just have 1 pattern that describes an entire software application. I suggest you do some reading on design patterns (if that is what you want to learn about) and try to understand how the patterns can be applied to your specific application.
Don't overuse patterns though, as they can merely increase complexity without providing any advantage.
Simon
|
|
|
|
|
try to Read GOF (Gang of Four ) Desing pattern, there types, appliclibility and consequence and then you can decide which pattern you want to use.
cheers,
Abhijit
Think Sharp | Code Sharp | C Sharp
|
|
|
|
|
Hi there! I have an app and I have a local database within the app. After I finished building, I was testing the app at my local computer and it was working fine. After that I installed on a computer without any kind of sql server instance installed on it and it didn't run at all and was giving me error that the remote connections are not allowed. Is it possible the app not to run cause there is no instance of sql server or it's something else?? Thx ahead for your advices
|
|
|
|
|
Yes, if you are using a local SQL database in the app, you will need to install SQL server on the pc for it to work. You can use SQL Express[^] to reduce the amount you need to install. SQL express is a smaller version of SQL server that just handles small database files. It is specifically designed to be redistributed with applications.
Make sure you check the restrictions on database size etc for SQL express:
http://en.wikipedia.org/wiki/SQL_Server_Express[^]
Simon
|
|
|
|
|
Thx for your interest about this issue, I have a sql express within visual studio as well, but most of the clients what will use this app are people who are not related with developing thus they do not have any VS or SQL express instance installed on the computer. You want to say that for running at their machine, installing at least sql express is mandatory?? Thx ahead for any other advice
|
|
|
|
|
Yes, you must install SQL express on their PC.
(The alternative is to use a database on a server like Guffa has suggested)
Simon
|
|
|
|