Click here to Skip to main content
15,892,927 members
Home / Discussions / C#
   

C#

 
AnswerRe: To implement password rememberance in Windows application? Pin
Judah Gabriel Himango29-Dec-05 4:25
sponsorJudah Gabriel Himango29-Dec-05 4:25 
GeneralRe: To implement password rememberance in Windows application? Pin
MudkiSekhon29-Dec-05 20:57
MudkiSekhon29-Dec-05 20:57 
GeneralRe: To implement password rememberance in Windows application? Pin
Judah Gabriel Himango30-Dec-05 4:36
sponsorJudah Gabriel Himango30-Dec-05 4:36 
QuestionProblem in selected row after sorting in datagridview Pin
Mertli Ozgur Nevres28-Dec-05 23:01
Mertli Ozgur Nevres28-Dec-05 23:01 
AnswerRe: Problem in selected row after sorting in datagridview Pin
Judah Gabriel Himango29-Dec-05 4:27
sponsorJudah Gabriel Himango29-Dec-05 4:27 
GeneralRe: Problem in selected row after sorting in datagridview Pin
Mertli Ozgur Nevres30-Dec-05 4:02
Mertli Ozgur Nevres30-Dec-05 4:02 
GeneralRe: Problem in selected row after sorting in datagridview Pin
Judah Gabriel Himango30-Dec-05 4:31
sponsorJudah Gabriel Himango30-Dec-05 4:31 
QuestionFlickering during customized resizing of the form Pin
Saanya28-Dec-05 21:00
Saanya28-Dec-05 21:00 
I am stuck with this problem from past one week .
Problem definition :A form shall have a minimum size .When the user changes the width of the form ,the height must also change by the same amount .Similarly when the height of the form changes the width must change by the same amount . In the below code only the width change and its corresponding height change is implememnted . The height change is yet to be done .

My Solution :
Overriding the OnSizeChanged

//This function shallbe contained in a simple Windows form
private bool bWidthCheckSize = true;
protected override void OnSizeChanged(EventArgs e)
{
count ++ ;
base.OnSizeChanged (e);
try
{
/*When the width is changed ,proportionately the height is also changed proportionately in the second if cond . But when the height is changed this event is triggered again .Hence bWidthCheckSize is made false before changing the height . Hence when this function is triggred due to change of height it just returns back ,by resetting the bWidthCheckSize flag*/

if(bWidthCheckSize == false)
{
bWidthCheckSize = true;
return;
}
/*Though the height is updated ,the updated height is lost as the event is called by itself .Hence every time the height is updated with the previous height . This is the cause of the flickering .I am wondering is there any work around .Moreover this logic does not hold good if I put the code for handling Fom Height change .*/
this.Height = this.prevHeight;

//Form Size Changed by width ,if current width is not equal to previous width
if(prevWidth!=this.Width)
{
//Get the difference in Width
int diffInWidth = (this.Width - prevWidth);
//Update the previous width
prevWidth =this.Width;
bWidthCheckSize = false;
//Update the prevHeight by the same amount ,the height would be increased
prevHeight += diffInWidth;
//Increase the height by the same amount
this.Height += diffInWidth;
}
return;
}
catch{}
}



Thanks in Advance ,Hope to receive a earlier response
AnswerRe: Flickering during customized resizing of the form Pin
Judah Gabriel Himango29-Dec-05 4:55
sponsorJudah Gabriel Himango29-Dec-05 4:55 
QuestionActive Directory Connection Pin
HolyGrandFather28-Dec-05 20:33
HolyGrandFather28-Dec-05 20:33 
AnswerRe: Active Directory Connection Pin
Judah Gabriel Himango29-Dec-05 4:29
sponsorJudah Gabriel Himango29-Dec-05 4:29 
QuestionCould someone please explain currencyManager to me Pin
kourvoisier28-Dec-05 20:22
kourvoisier28-Dec-05 20:22 
AnswerRe: Could someone please explain currencyManager to me Pin
Judah Gabriel Himango29-Dec-05 4:35
sponsorJudah Gabriel Himango29-Dec-05 4:35 
GeneralRe: Could someone please explain currencyManager to me Pin
kourvoisier29-Dec-05 5:11
kourvoisier29-Dec-05 5:11 
QuestionRegarding Setting Registry Value Pin
A.Grover28-Dec-05 20:21
A.Grover28-Dec-05 20:21 
AnswerRe: Regarding Setting Registry Value Pin
Judah Gabriel Himango29-Dec-05 4:37
sponsorJudah Gabriel Himango29-Dec-05 4:37 
AnswerRe: Regarding Setting Registry Value Pin
Dave Kreskowiak29-Dec-05 5:47
mveDave Kreskowiak29-Dec-05 5:47 
QuestionWhen adding refrences to other dll's...... Pin
kourvoisier28-Dec-05 20:20
kourvoisier28-Dec-05 20:20 
AnswerRe: When adding refrences to other dll's...... Pin
imsathy28-Dec-05 22:25
imsathy28-Dec-05 22:25 
AnswerRe: When adding refrences to other dll's...... Pin
Dave Kreskowiak29-Dec-05 5:44
mveDave Kreskowiak29-Dec-05 5:44 
Questionhow to capture file name opened by the user in a PC Pin
m_mazhar28-Dec-05 19:36
m_mazhar28-Dec-05 19:36 
AnswerRe: how to capture file name opened by the user in a PC Pin
Dave Kreskowiak29-Dec-05 5:42
mveDave Kreskowiak29-Dec-05 5:42 
QuestionHow can I get my project directory? Pin
tiancaidao28-Dec-05 17:58
tiancaidao28-Dec-05 17:58 
AnswerRe: How can I get my project directory? Pin
S. Senthil Kumar28-Dec-05 19:31
S. Senthil Kumar28-Dec-05 19:31 
GeneralRe: How can I get my project directory? Pin
tiancaidao28-Dec-05 19:52
tiancaidao28-Dec-05 19:52 

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.