|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
VS 2005: Forms Designer Clears CancelButton and AcceptButton on CompileI have a pretty standard Windows Form with 2 relevant buttons: btnOK
and btnCancel. I set both buttons' DialogResult properties appropriately. I then set the form AcceptButton and CancelButton properties appropriately. However, whenever I click the Play button, the 2 properties get reset back to their defaults (nothing). Does anyone have any idea why this might be happening? I'm particularly annoyed because I got this right on another form and cannot remember what I'm doing wrong. Josh Kodroff wrote:
> Does anyone have any idea why this might be happening? I followed through the steps just as you described on a form in VB2005, and it didn't behave as you stated, the DialogResult properties were left unchanged. Are you finding that after you stop the project and examine the button properties in the Properties window that they have both changed? Or are the buttons just not behaving as you expect when you click on them? -- (O)enone Oenone wrote:
> Josh Kodroff wrote: Visual Studio is literally changing the AcceptButton and CancelButton> > Does anyone have any idea why this might be happening? > > I followed through the steps just as you described on a form in VB2005, and > it didn't behave as you stated, the DialogResult properties were left > unchanged. > > Are you finding that after you stop the project and examine the button > properties in the Properties window that they have both changed? Or are the > buttons just not behaving as you expect when you click on them? > properties from the values I selected to blank. I've even tried checking in the file to souce control, but to no avail. My next idea is to manually write code for btnCancel that just sets the DialogResult and hides the form, but I'm a little concerned that VS is changing these settings without my say-so. JK To answer my own question, the issue was that I was using Form.Show and
not Form.ShowDialog from the calling form. However, I am still perplexed as to why VS was changing those properties on my behalf. I'm not going to stay awake at night worrying about it, though. Josh Kodroff wrote: Show quoteHide quote > Oenone wrote: > > Josh Kodroff wrote: > > > Does anyone have any idea why this might be happening? > > > > I followed through the steps just as you described on a form in VB2005, and > > it didn't behave as you stated, the DialogResult properties were left > > unchanged. > > > > Are you finding that after you stop the project and examine the button > > properties in the Properties window that they have both changed? Or are the > > buttons just not behaving as you expect when you click on them? > > > > Visual Studio is literally changing the AcceptButton and CancelButton > properties from the values I selected to blank. I've even tried > checking in the file to souce control, but to no avail. > > My next idea is to manually write code for btnCancel that just sets the > DialogResult and hides the form, but I'm a little concerned that VS is > changing these settings without my say-so. > > JK
MDI Min Max - still there
Q: closing forms CURRENT INDEX of Iteration on ILIST collection ? da.update bool--> yes/no 1.1 equivalent for Drawing.Icon.ExtractAssociatedIcon? Accessing the Class Name of a Shared Method Writing Custom DLLs in VB.net 2 Help with using bits in an integer copy and paste into webbrowser use try catch to check a text box |
|||||||||||||||||||||||