Click here to Skip to main content
15,921,606 members
Home / Discussions / Windows Forms
   

Windows Forms

 
AnswerRe: how to make window form control scale with the form Pin
dan!sh 17-Aug-10 7:36
professional dan!sh 17-Aug-10 7:36 
AnswerRe: how to make window form control scale with the form Pin
johannesnestler26-Aug-10 3:44
johannesnestler26-Aug-10 3:44 
QuestionChange .exe icon Pin
Abdullah S. Abdelhay15-Aug-10 0:17
Abdullah S. Abdelhay15-Aug-10 0:17 
AnswerRe: Change .exe icon Pin
Richard MacCutchan15-Aug-10 1:13
mveRichard MacCutchan15-Aug-10 1:13 
AnswerRe: Change .exe icon Pin
ignrod15-Aug-10 5:51
ignrod15-Aug-10 5:51 
Questionclose form from its usercontrol Pin
Marcel Vreuls (www.agentbase.nl)13-Aug-10 11:18
Marcel Vreuls (www.agentbase.nl)13-Aug-10 11:18 
AnswerRe: close form from its usercontrol Pin
Matt U.13-Aug-10 12:43
Matt U.13-Aug-10 12:43 
GeneralRe: close form from its usercontrol Pin
Eslam Afifi13-Aug-10 14:29
Eslam Afifi13-Aug-10 14:29 
One small issue with this is that the parent might not be the Form, it might be, for example, a Panel that might also be a hosted in another Panel. So if this scenario is possible (now or later in the future), the OP should either keep looking for the Form as in the code below or just give the UserControl a reference to the Form during initialization or something so it closes it directly, which is better (constant time instead of linear time).

var parent = this.Parent;
while (!(parent is Form))
    parent = parent.Parent;
parent.Close();

Eslam Afifi

GeneralRe: close form from its usercontrol Pin
johannesnestler26-Aug-10 3:49
johannesnestler26-Aug-10 3:49 
GeneralRe: close form from its usercontrol Pin
Eslam Afifi26-Aug-10 9:57
Eslam Afifi26-Aug-10 9:57 
AnswerRe: close form from its usercontrol PinPopular
Luc Pattyn13-Aug-10 14:35
sitebuilderLuc Pattyn13-Aug-10 14:35 
GeneralRe: close form from its usercontrol Pin
Matt U.13-Aug-10 16:14
Matt U.13-Aug-10 16:14 
AnswerRe: close form from its usercontrol Pin
Marcel Vreuls (www.agentbase.nl)14-Aug-10 10:00
Marcel Vreuls (www.agentbase.nl)14-Aug-10 10:00 
GeneralRe: close form from its usercontrol Pin
johannesnestler26-Aug-10 3:55
johannesnestler26-Aug-10 3:55 
QuestionMDI form with child and child-child forms Pin
Marcel Vreuls (www.agentbase.nl)13-Aug-10 11:12
Marcel Vreuls (www.agentbase.nl)13-Aug-10 11:12 
AnswerRe: MDI form with child and child-child forms Pin
Matt U.13-Aug-10 12:42
Matt U.13-Aug-10 12:42 
AnswerRe: MDI form with child and child-child forms Pin
Dave Kreskowiak13-Aug-10 17:50
mveDave Kreskowiak13-Aug-10 17:50 
GeneralRe: MDI form with child and child-child forms Pin
Richard Blythe14-Aug-10 5:11
Richard Blythe14-Aug-10 5:11 
Questionhow do i malloc in c# windowform? Pin
neodeaths11-Aug-10 9:42
neodeaths11-Aug-10 9:42 
AnswerRe: how do i malloc in c# windowform? Pin
Eddy Vluggen11-Aug-10 10:00
professionalEddy Vluggen11-Aug-10 10:00 
AnswerRe: how do i malloc in c# windowform? Pin
Luc Pattyn11-Aug-10 10:21
sitebuilderLuc Pattyn11-Aug-10 10:21 
AnswerRe: how do i malloc in c# windowform? Pin
Dave Kreskowiak11-Aug-10 13:06
mveDave Kreskowiak11-Aug-10 13:06 
AnswerRe: how do i malloc in c# windowform? Pin
johannesnestler26-Aug-10 4:01
johannesnestler26-Aug-10 4:01 
QuestionMinimize window to gain memory space??? Pin
Heinz_10-Aug-10 19:14
Heinz_10-Aug-10 19:14 
AnswerRe: Minimize window to gain memory space??? Pin
Eddy Vluggen10-Aug-10 20:40
professionalEddy Vluggen10-Aug-10 20:40 

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.