|
Just make your application as a service. Your application run in background without a window.
|
|
|
|
|
Hi,
I have three listview controls list view one i filled on loading and listview two i filled by selecting name and moved them in listview two now i am in problem i need to show all ID of listview two values for this i am trying by loop but i couldn't make it
I am trying to fill this by for loop but i couldn't make it.
Kindly do replay.
Thanxxxxx
|
|
|
|
|
I'm sorry, but this is a nonsense. You need to post code to show us what you're doing wrong.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
you will never find a fruitful answer unless you clearly explain your question.
Am assuming that,
you hve a 3 ListView controls LV1, LV2 LV3...
LV1 fields are filled while loading your form.. and you gotta select items from LV1 to fill out LV2....
And now you need to get IDs of LV2...
Is it that you want....?????
Have a Happy Coding.....
|
|
|
|
|
.I have 2 Labels in my asp.net page.The text Property of labels will be null.there will be a dropdown menu (Eg.Arabic,English).i want to pass dropdown menu value to class file and inside class file i should define labels.Label text property should be fetched from resource file(eg.ResourceEng,ResourceArab.resx)and pass text value to Labels in asp.net page.
modified on Monday, April 6, 2009 1:54 AM
|
|
|
|
|
There is a separate forum dedicated to ASP.Net is available....
You may give a try there...
Have a Happy Coding.....
|
|
|
|
|
Hello everybody,
I am having a problem to solve the following c# exercise:
You will take into account that February can be 29 days if it is during a leap year. Do NOT change the implementation of date_convert. Instead, add additional code in your main so that before you display the output of the method, if the month entered by the user is February, prompt the user for the year, and then use IsLeap to check the year and adjust the output of date_convert accordingly. Write appropriate method calls and statements within your main so that the console session may look as follows:
A valid console session may look as follows:
Please enter a month: March
The number of days in March is 31
Another session may look as follows:
Please enter a month: february
Please enter a year: 2007
The number of days in February is 28
Another session may look as follows:
Please enter a month: february
Please enter a year: 2000
The number of days in February is 29
If anybody can help me to solve the problem then i will be very greatfull.
Syed
|
|
|
|
|
This is your homework. What have you done to solve it ? Are you allowed to use the DateTime class ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
hey sah496
this will give u days in month according to month no u have passed to
<pre>
public int DaysInMonth(int nMonth)
{
int nDays = 0;
switch (nMonth) {
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
nDays = 31;
break;
case 4:
case 6:
case 9:
case 11:
nDays = 30;
break;
case 2:
int nDay=1;
int nYear=GetYear();
DateTime oDate;
oDate=Convert.ToDateTime(nDay.ToString()+ "-" +
nMonth.ToString() + "-" +
nYear.ToString() ,"dd-mm-yyyy");
if (DateTime.IsLeapYear(nYear)) {
nDays = 29;
}
else {
nDays = 28;
}
break;
}
return nDays;
}
public int GetYear()
{
// read year and return
}
akhilonly007@gmail.com
modified on Monday, April 6, 2009 5:07 AM
|
|
|
|
|
Hi,
How to sort an arraylist in decending order?
Thankyou
YPKI
|
|
|
|
|
Why would you use an ArrayList ? That's only there for legacy code. Does it not have a Sort method ( I can't remember ).
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Christian Graus wrote: Does it not have a Sort method
Yes it does (how well it works I don't know, never use arraylists)
|
|
|
|
|
Hi,
First u can sort the arraylist using the Sort() method... Then reverse the arraylist using the Reverse() method... Not sure whether this is the best solution, but it is one way of doing it...
Thanks,
ramz_g
|
|
|
|
|
I cna't seem to figure this out and I though I once did this.
I have something like this:
newImage = new Bitmap(path.ToString());
Matrix matrix = new Matrix();
matrix.Rotate(angle);
Graphics g = Graphics.FromImage(newImage);
g.Transform = matrix;
g.Save();
Bitmap newImage2 = new Bitmap(newImage.Width, newImage.Height, g);
Save();
An image is created, but it's just completely black. I am wanting to rotate an image at a specified angle, and not use the RotateFlip, which has static values.
Any ideas? Can this Graphics be converted back to a Bitmap?
|
|
|
|
|
No, a graphics cannot be 'converted' to a bitmap. newImage is already the image your graphics is drawn on. You don't save the graphics, you save the bitmap.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
That what I was doing originally, but I kept getting expetion "A generic error occurred in GDI+". I'm overwriting the the original image....so maybe I'm doing something wrong and not dispoing of the picture. At any rate, if I save to a different ABS path, then it save the image, but the transform did not appear to have taken effect. I even tried drawing a line, but nothing changes with the picture - it's the same as the orignal.
So, i'm doing something like:
newImage.Save(path);
Should I be doing something different? Is there something I'm not calling on the Graphic object to make it apply to the Bitmap?
|
|
|
|
|
Yes, that means .NET already has a lock on the file, you'd need to save to another filename
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
try this
Bitmap newImage2 = new Bitmap(newImage);
Save();
or
newImage.Save();
Assume Graphics as pencil and Bitmap as paper...Now how you gonna do conversion...
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
You can't convert a Graphics object to a Bitmap , as it doesn't contain the image. The Graphics object is just used to draw on a canvas, in this case the canvas is a Bitmap object.
You are creating a Graphics object to draw on the original image, but what you want to do is to create it to draw on the new image, then you draw the original image onto the new image.
The transform controls how the drawing is done using the Graphics object, so when you draw the original image using that Graphics object it will be rotated.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Oh god, stupid me.....
Thanks for the responses everyone. I was going in circles (and sometimes th wrong way) because I thought the graphics was not writing to the original image. In fact it was. The test line i drew wasn't appearing because the coords I gave it were not long enough and my image is so huge that when I went to look at it I never see the line and the picture never rotated. Until I finally seen a red speck.... ;-0
|
|
|
|
|
Hi,
there are some quirks you have to be aware of:
1. all errors in GDI+ will report "an internal error..."
2. Image.FromFile() locks the file until the image is disposed
BTW: Image.FromStream() does not
Bitmap bm1 = Bitmap.FromFile(filename);
Bitmap bm2 = new Bitmap(width2, height2);
Graphics g = Graphics.FromImage(bm2);
g.Transform = matrix...;
g.DrawImage(bm1);
bm1.Dispose();
bm2.Save(filename, imageFormat);
g.Dispose();
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Oh I swear, thank you SOOOO much. I couldn't figure out which object I wasn't dispoing of properly. I knew there was something wrong because if I could create a new bitmap as a new file name it would work, as it wasn't trying to write to the same STILL open file!!
Now on to figuring out to get it to rotate properly given the angle...ehhh.
Thanks for the help everyone!!
|
|
|
|
|
you're welcome.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I'm writing an app to add information to a custom database(which does not exist yet). After that, I will develop an app to work with/view the data.
As a newbie, I'm unaware of exactly what I should be studying to create a database in C#. I've figure out how to create data tables(and datasets) but I'm not sure what to even search for when I'm trying to find code samples or tutorials on how to permanently store the info and every search I do yields stuff with MySQL. Can someone please point me in the right direction?
|
|
|
|
|
You need to learn about SQL. That's basically it. That's what DBs are written in
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|