| | | StrataFrame User
       
Group: Forum Members Last Login: 02/04/2008 8:43:02 AM Posts: 176, Visits: 1,519 |
| | I am setting e.Cancel = true; in the BeforeDelete event and I am still being prompted with the message "Are you sure you wish to delete the current record". It appears that the setting of the cancel property is working becuase it dosen't matter what I answer to the question, the record is NOT deleted. I am guessing that the message shouldn't be displayed if the delete was canceled, right. Am I doing something incorrectly or not understanding how it works? |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Today @ 9:09:33 AM Posts: 2,661, Visits: 1,876 |
| This actually has to do with the way .NET handles events... your event handler is attached before the event handler in the application framework. Since you cannot specify which event handler is called in which order, it can produce unpredictable results. Your best bet is to disable the AutoDeleteConfirmation property on the form and show a delete confirmation on your own.
www.bungie.net |
| | | | StrataFrame User
       
Group: Forum Members Last Login: 02/04/2008 8:43:02 AM Posts: 176, Visits: 1,519 |
| | Will do. Thanks for the info. By the way, I am using the messageform class and in the help file it looks completly different then what is showing up. On my screen it is a pink window, in the help file it look like a Windows themed window. Why is that? Is it a setting on my machine? |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Today @ 2:43:51 PM Posts: 4,241, Visits: 4,285 |
| | The pink is the transparent color. It is possible that this could come from your machine if there is some type of video driver ignoring the .NET transparency. Are you calling the MessageForm directly or through a localization key? You might give me an example of how you are calling the window and a screen shot. If you are having an issue I would like to work through it and see if we can reproduce the problem. Thanks. |
| | | | StrataFrame User
       
Group: Forum Members Last Login: 02/04/2008 8:43:02 AM Posts: 176, Visits: 1,519 |
| | I am even seeing this behaivor in the sample application. In my project I am calling MessageForm directly, here is the code and screen shot: loItem = new MessageItem(); loItem.Title = "Delete Aborted"; loItem.EventID = ""; loItem.MessageFunctionality = MessageFunction.OK; loItem.MessageIcon = MessagingIcon.StopSign; loItem.MessageSound = MessagingSounds.ErrorSound; loItem.Text = ""; if (this.CategoryBO.BrokenRules.Count > 0) foreach (BrokenRule loRule in this.CategoryBO.BrokenRules.ToArray()) loItem.Text += loRule.Description; else loItem.Text = "Delete Aborted"; MessageForm.ShowMessage(loItem); 
Thanks Scott |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Today @ 2:43:51 PM Posts: 4,241, Visits: 4,285 |
| | I will see if we can prevent this from happening. THe reason this is occuring on your computer has somthing to do with video drivers. In .NET, you can set a transparency color and set the .AllowTransparency to True on a form. This prevents some flicker when instantiating. I assume you are having the same problem with a WaitWindow and the InfoBox then, is that correct? To see if you get the same error on an InfoBox, open the sample application, the open the Customers Maintenance form. Click New, then Save. You should get an error message at the bottom left of the window. Let me know if this is pink as well. I will look at the MessageForm's transparency and see if we can just turn it off. However, that will be more difficult for a WaitWindow and the InfoBox. These windows actually use the transparency in depth since there is fading and scrolling involved. That is why I would like to see if it happens on them as well. Thanks. |
| | | | StrataFrame User
       
Group: Forum Members Last Login: 02/04/2008 8:43:02 AM Posts: 176, Visits: 1,519 |
| | Here is a shot of the infobox.
|
| | | | StrataFrame User
       
Group: Forum Members Last Login: 02/04/2008 8:43:02 AM Posts: 176, Visits: 1,519 |
| | And here is the video info:
|
| | | | StrataFrame User
       
Group: Forum Members Last Login: 02/04/2008 8:43:02 AM Posts: 176, Visits: 1,519 |
| | Here is something else that might be related to the transparency issue. This is the Database connection configuration form all I see are the controls, no "form" they just kind of float there in space.
|
| | | |
|