Click here to Skip to main content
15,885,278 members
Home / Discussions / C#
   

C#

 
GeneralRe: Downloading problem using c sharp Pin
Expert Coming16-Apr-08 19:39
Expert Coming16-Apr-08 19:39 
QuestionTechnology Choice? Pin
Expert Coming16-Apr-08 19:23
Expert Coming16-Apr-08 19:23 
AnswerRe: Technology Choice? Pin
Thomas Stockwell17-Apr-08 1:16
professionalThomas Stockwell17-Apr-08 1:16 
QuestionHow to get the last day of the month. Pin
dougins16-Apr-08 19:15
dougins16-Apr-08 19:15 
GeneralRe: How to get the last day of the month. Pin
Expert Coming16-Apr-08 19:19
Expert Coming16-Apr-08 19:19 
GeneralRe: How to get the last day of the month. Pin
Luc Pattyn17-Apr-08 0:19
sitebuilderLuc Pattyn17-Apr-08 0:19 
Questionchanging the image DPI keeping the same size Pin
Faysal16-Apr-08 18:41
Faysal16-Apr-08 18:41 
GeneralRe: changing the image DPI keeping the same size Pin
Rojan Gh.16-Apr-08 19:05
professionalRojan Gh.16-Apr-08 19:05 
Hi,
First you have to know that, as much as I know, in GDI+, the exact size of the image is in pixels and it is being calculated by (DPI * demention(in pixel unit)) so you have to calculate the current size in pixel, then calculate the new size and then use this code to create the new image by new size and then set the new DPI:
<br />
Bitmap screenshotBitmap = new Bitmap("c:\\image.jpg");<br />
<br />
Bitmap newBitmap = new Bitmap(screenshotBitmap, newWidth, newheight);<br />
<br />
newBitmap.SetResolution(1200, 1200);<br />

I remember that in some GDI+ coding I had the same problem and I used somthing like this and it worked for me.
Good luck and have fun. Wink | ;)

Sojaner!

QuestionRe: changing the image DPI keeping the same size Pin
Faysal17-Apr-08 1:07
Faysal17-Apr-08 1:07 
AnswerRe: changing the image DPI keeping the same size Pin
Rojan Gh.17-Apr-08 5:05
professionalRojan Gh.17-Apr-08 5:05 
QuestionWebBrowser question Pin
Rojan Gh.16-Apr-08 18:34
professionalRojan Gh.16-Apr-08 18:34 
GeneralRe: WebBrowser question Pin
Luc Pattyn17-Apr-08 0:20
sitebuilderLuc Pattyn17-Apr-08 0:20 
AnswerRe: WebBrowser question Pin
Rojan Gh.17-Apr-08 4:43
professionalRojan Gh.17-Apr-08 4:43 
QuestionWorking with percentages in C# Pin
dougins16-Apr-08 18:21
dougins16-Apr-08 18:21 
GeneralRe: Working with percentages in C# Pin
Christian Graus16-Apr-08 18:34
protectorChristian Graus16-Apr-08 18:34 
GeneralRe: Working with percentages in C# Pin
Vikram A Punathambekar16-Apr-08 18:39
Vikram A Punathambekar16-Apr-08 18:39 
AnswerRe: Working with percentages in C# Pin
Simon P Stevens16-Apr-08 23:10
Simon P Stevens16-Apr-08 23:10 
Generalstring to float problem Pin
Xmen Real 16-Apr-08 18:03
professional Xmen Real 16-Apr-08 18:03 
GeneralRe: string to float problem Pin
Christian Graus16-Apr-08 18:33
protectorChristian Graus16-Apr-08 18:33 
GeneralRe: string to float problem Pin
Brady Kelly16-Apr-08 22:35
Brady Kelly16-Apr-08 22:35 
GeneralRe: string to float problem Pin
Xmen Real 16-Apr-08 22:43
professional Xmen Real 16-Apr-08 22:43 
GeneralRe: string to float problem Pin
ChrisKo17-Apr-08 7:56
ChrisKo17-Apr-08 7:56 
GeneralProblem in Update dataset to database using oledbadapter Pin
cocoonwls16-Apr-08 17:22
cocoonwls16-Apr-08 17:22 
GeneralRe: Problem in Update dataset to database using oledbadapter Pin
cocoonwls16-Apr-08 21:29
cocoonwls16-Apr-08 21:29 
QuestionComparing enums? Pin
kumar.bs16-Apr-08 14:29
kumar.bs16-Apr-08 14:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.