Click here to Skip to main content
15,908,274 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Developing an election ballot box app. Pin
samflex22-Apr-16 6:23
samflex22-Apr-16 6:23 
QuestionRe: Developing an election ballot box app. Pin
ZurdoDev22-Apr-16 6:32
professionalZurdoDev22-Apr-16 6:32 
AnswerRe: Developing an election ballot box app. Pin
F-ES Sitecore24-Apr-16 3:01
professionalF-ES Sitecore24-Apr-16 3:01 
GeneralRe: Developing an election ballot box app. Pin
samflex24-Apr-16 13:21
samflex24-Apr-16 13:21 
GeneralRe: Developing an election ballot box app. Pin
F-ES Sitecore24-Apr-16 22:51
professionalF-ES Sitecore24-Apr-16 22:51 
GeneralRe: Developing an election ballot box app. Pin
samflex25-Apr-16 4:38
samflex25-Apr-16 4:38 
GeneralRe: Developing an election ballot box app. Pin
F-ES Sitecore25-Apr-16 4:49
professionalF-ES Sitecore25-Apr-16 4:49 
GeneralRe: Developing an election ballot box app. Pin
samflex25-Apr-16 5:49
samflex25-Apr-16 5:49 
GeneralRe: Developing an election ballot box app. Pin
F-ES Sitecore25-Apr-16 23:11
professionalF-ES Sitecore25-Apr-16 23:11 
GeneralRe: Developing an election ballot box app. Pin
Richard Deeming26-Apr-16 1:42
mveRichard Deeming26-Apr-16 1:42 
GeneralRe: Developing an election ballot box app. Pin
samflex26-Apr-16 5:59
samflex26-Apr-16 5:59 
GeneralRe: Developing an election ballot box app. Pin
Richard Deeming26-Apr-16 7:28
mveRichard Deeming26-Apr-16 7:28 
GeneralRe: Developing an election ballot box app. Pin
samflex28-Apr-16 8:04
samflex28-Apr-16 8:04 
GeneralRe: Developing an election ballot box app. Pin
Richard Deeming28-Apr-16 8:08
mveRichard Deeming28-Apr-16 8:08 
GeneralRe: Developing an election ballot box app. Pin
samflex28-Apr-16 9:59
samflex28-Apr-16 9:59 
GeneralRe: Developing an election ballot box app. Pin
Richard Deeming28-Apr-16 11:03
mveRichard Deeming28-Apr-16 11:03 
GeneralRe: Developing an election ballot box app. Pin
samflex28-Apr-16 11:58
samflex28-Apr-16 11:58 
GeneralRe: Developing an election ballot box app. Pin
Richard Deeming29-Apr-16 2:04
mveRichard Deeming29-Apr-16 2:04 
GeneralRe: Developing an election ballot box app (SOLVED). Pin
samflex2-May-16 3:22
samflex2-May-16 3:22 
QuestionUpdate progressbar with wcf webservice Pin
Member 1247474222-Apr-16 1:05
Member 1247474222-Apr-16 1:05 
SuggestionRe: Update progressbar with wcf webservice Pin
Richard Deeming22-Apr-16 1:15
mveRichard Deeming22-Apr-16 1:15 
Questionpls Help me..binding dropdown like Country,State,City..when im selecting any one country it showing me all country's state and city.. Pin
sunil321-Apr-16 0:28
sunil321-Apr-16 0:28 
AnswerRe: pls Help me..binding dropdown like Country,State,City..when im selecting any one country it showing me all country's state and city.. Pin
John C Rayan21-Apr-16 0:55
professionalJohn C Rayan21-Apr-16 0:55 
Questionc# Image Processing from byte[] to image, centering the image on a square canvas Pin
jkirkerx20-Apr-16 13:47
professionaljkirkerx20-Apr-16 13:47 
AnswerRe: c# Image Processing from byte[] to image, centering the image on a square canvas Pin
Richard Deeming21-Apr-16 2:40
mveRichard Deeming21-Apr-16 2:40 
How about something like this:
C#
if (oWidth <= t_Width && oHeight <= t_Height)
{
    cWidth = oWidth;
    cHeight = oHeight;
}
else if (oHeight < oWidth)
{
    cWidth = t_Width;
    cHeight = (int)Math.Round((oHeight / (float)oWidth) * t_Width);
}
else
{
    cHeight = t_Height;
    cWidth = (int)Math.Round((oWidth / (float)oHeight) * t_Height);
}

int x = (t_Width - cWidth) / 2;
int y = (t_Height - cHeight) / 2;




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


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.