﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Role Based Security  » Questions regarding Role-based Security</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 12:42:27 GMT</lastBuildDate><ttl>20</ttl><item><title>Questions regarding Role-based Security</title><link>http://forum.strataframe.net/FindPost7819.aspx</link><description>Hello,&lt;/P&gt;&lt;P&gt;I am creating an application base that will be used for all of our WinForm executables.&amp;nbsp; Attached is the project that illustrates the following three issues:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; When applying themes to the application, the User Panel's label controls do not update with the chosen "theme" until I run the mouse cursor over the control.&amp;nbsp; Is there a way to force a refresh?&amp;nbsp; Should I have to?&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Create a new security user and save the new record.&amp;nbsp; Next Edit the same record and try to change the Permissions: Default Action and Restrictions.&amp;nbsp; Notice there should not be any permission records available.&amp;nbsp; The framework throws a Null Reference Exception:&lt;/P&gt;&lt;P&gt;NullReferenceException&lt;BR&gt;&amp;nbsp;Object reference not set to an instance of an object.&lt;/P&gt;&lt;P&gt;Source&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : MicroFour StrataFrame Security&lt;/P&gt;&lt;P&gt;Stack Trace: &lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Security.UserEditor.SaveData(TreeNode Node, SetDataPiece SetPiece)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Security.UserEditor.cboAction_SelectedIndexChanged(Object sender, EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ComboBox.WmReflectCommand(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ComboBox.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNative&amp;#119;indow.OnMessage(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNative&amp;#119;indow.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Native&amp;#119;indow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;BR&gt;&lt;BR&gt;Should these controls be available if there are no Permission records?&amp;nbsp; Is there a way to more gracefully trap this error?&lt;/P&gt;&lt;P&gt;3. Restart the application.&amp;nbsp; Use the new user created in step 2 to sign on.&amp;nbsp; A SQL exception will occur:&lt;/P&gt;&lt;P&gt;System.Data.SqlClient.SqlException was unhandled by user code&lt;BR&gt;&amp;nbsp; Class=16&lt;BR&gt;&amp;nbsp; ErrorCode=-2146232060&lt;BR&gt;&amp;nbsp; LineNumber=1&lt;BR&gt;&amp;nbsp; Message="Invalid object name 'dbo.SFSUserRolePermissionInfo'."&lt;BR&gt;&amp;nbsp; Number=208&lt;BR&gt;&amp;nbsp; Procedure=""&lt;BR&gt;&amp;nbsp; Server="DEVSVR2"&lt;BR&gt;&amp;nbsp; Source=".Net SqlClient Data Provider"&lt;BR&gt;&amp;nbsp; State=1&lt;BR&gt;&amp;nbsp; StackTrace:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlDataReader.get_MetaData()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.DbDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.SqlDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.DataLayer.GetDataTable(DbCommand Command, Boolean RegisterNotification)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Business.BusinessLayer.FillDataTable(DbCommand CommandToExecute)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Security.BusinessObjects.SFSUserRolePermissionInfoBO.FillByUser(Int32 UserPK)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Security.LoggedInUser.CreatePermissionsListRolesOnly(Int32 UserPK)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Security.LoggedInUser.CreateNew(SFSUsersBO UserInfo)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Security.Login.AttemptLogin(Object sender, EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at ApplicationBase.ETILogin.OnAttemptLogin() in C:\ETIDev\ApplicationBase\ETILogin.vb:line 30&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at ApplicationBase.ETILogin.cmdOk_Click(Object sender, EventArgs e) in C:\ETIDev\ApplicationBase\ETILogin.vb:line 282&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.OnClick(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Button.OnClick(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Button.PerformClick()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ContainerControl.ProcessDialogKey(Keys keyData)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.PreProcessMessage(Message&amp;amp; msg)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message&amp;amp; msg)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG&amp;amp; msg)&lt;BR&gt;&lt;BR&gt;I am unsure about this issue.&amp;nbsp; I do not see any tables, even in your samples that have this name.&amp;nbsp; Could this be caused by the fact I do not have any securable forms created as of yet in this project?&lt;/P&gt;&lt;P&gt;Any ideas would be greatly appreciated!&lt;/P&gt;&lt;P&gt;Ben Kim</description><pubDate>Sun, 10 Feb 2008 12:46:38 GMT</pubDate><dc:creator>Ben Kim</dc:creator></item><item><title>RE: Questions regarding Role-based Security</title><link>http://forum.strataframe.net/FindPost14251.aspx</link><description>Ben,&lt;/P&gt;&lt;P&gt;Iwas was going back through some old posts and noticed that you were getting an error when trying to manually create a security user.&amp;nbsp; I could not reproduce this and tried many different ways.&amp;nbsp; This is the code that I used when creating the new security user:&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;BR&gt;Dim user As New SFSUsersBO()&lt;/P&gt;&lt;P&gt;user.Add()&lt;BR&gt;user.us_FirstName = "Trent"&lt;BR&gt;user.us_LastName = "Taylor"&lt;BR&gt;user.us_Username = "tlTester"&lt;BR&gt;user.us_PasswordNeverExpires = True&lt;BR&gt;user.us_PasswordPlainText = "Testing08"&lt;BR&gt;user.us_ConfirmPassword = "Testing08"&lt;BR&gt;user.Save()&lt;BR&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;I beleive that you had found a work around or a resolution, but any information you could provide to reproduce would be helpful.&amp;nbsp; Thanks. :)</description><pubDate>Sun, 10 Feb 2008 12:46:38 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Questions regarding Role-based Security</title><link>http://forum.strataframe.net/FindPost7863.aspx</link><description>Ben,&lt;/P&gt;&lt;P&gt;In my MainFrame form, as a temporary workaround, I am capturing the ApplicationThemeChanged event and calling Me.Invalidate(True) to repaint the panel and themed container controls.&lt;/P&gt;&lt;P&gt;Thank you for all of your help.&amp;nbsp; I hope you find those pesky little bugs! :D&lt;/P&gt;&lt;P&gt;Just FYI,&lt;/P&gt;&lt;P&gt;Ben&amp;nbsp;</description><pubDate>Tue, 03 Apr 2007 09:08:30 GMT</pubDate><dc:creator>Ben Kim</dc:creator></item><item><title>RE: Questions regarding Role-based Security</title><link>http://forum.strataframe.net/FindPost7842.aspx</link><description>I'm glad you got it working.&amp;nbsp; It might be that we need to call invalidate when we handle that event.</description><pubDate>Mon, 02 Apr 2007 16:59:07 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Questions regarding Role-based Security</title><link>http://forum.strataframe.net/FindPost7838.aspx</link><description>Thanks Ben C.&amp;nbsp; I am using VB.NET - here is the code for those that might be interested:&lt;/P&gt;&lt;P&gt;In the InitForm method after Initializecomponent()&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;AddHandler&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; MicroFour.StrataFrame.UI.Windows.Forms.ApplicationTheme.ApplicationThemeChanged, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;AddressOf&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; ThemeChanged&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt; ThemeChanged(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; sender &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Object&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; e &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; System.EventArgs)&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; ApplicationTheme.Theme &amp;lt;&amp;gt; ApplicationThemeName.NoTheme &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;TreeGX1.BackgroundStyle.BackColor = ApplicationTheme.ThemeProperties.ThemeFormBodyGradientBegin&lt;BR&gt;TreeGX1.BackgroundStyle.BackColor2 = ApplicationTheme.ThemeProperties.ThemeFormBodyGradientEnd&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Else&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;TreeGX1.BackgroundStyle.BackColor = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Nothing&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;TreeGX1.BackgroundStyle.BackColor2 = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Nothing&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;It works just fine now with the exception of the ThemedContainer and pnlSide in the sample I sent you.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;Thanks again!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;Ben&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Mon, 02 Apr 2007 14:29:18 GMT</pubDate><dc:creator>Ben Kim</dc:creator></item><item><title>RE: Questions regarding Role-based Security</title><link>http://forum.strataframe.net/FindPost7834.aspx</link><description>You can handle the MicroFour.StrataFrame.UI.Windows.Forms.ApplicationTheme.ApplicationThemeChanged event.&amp;nbsp; It's a shared event, so you can just type in:&lt;/P&gt;&lt;P&gt;MicroFour.StrataFrame.UI.Windows.Forms.ApplicationTheme.ApplicationThemeChanged += new EventHandler(methodname);&lt;/P&gt;&lt;P&gt;Then, just reset the properties on your control to the new theme colors.</description><pubDate>Mon, 02 Apr 2007 14:01:24 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Questions regarding Role-based Security</title><link>http://forum.strataframe.net/FindPost7827.aspx</link><description>Thank you.&amp;nbsp; Regarding the ApplicationThemeChanged event, where can I find documentation on how to use this feature?&amp;nbsp;&amp;nbsp; I need&amp;nbsp;it&amp;nbsp;for a third party control that will always be displayed (ie. user can change theme and I want to repaint the control's background with the appropriate theme colors).&lt;/P&gt;&lt;P&gt;I have the following code currently on this form:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Protected&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Overrides&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt; OnPaint(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; e &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; System.Windows.Forms.PaintEventArgs)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; ApplicationTheme.Theme &amp;lt;&amp;gt; ApplicationThemeName.NoTheme &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;TreeGX1.BackgroundStyle.BackColor = ApplicationTheme.ThemeProperties.ThemeFormBodyGradientBegin&lt;/P&gt;&lt;P&gt;TreeGX1.BackgroundStyle.BackColor2 = ApplicationTheme.ThemeProperties.ThemeFormBodyGradientEnd&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Else&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;TreeGX1.BackgroundStyle.BackColor = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Nothing&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;TreeGX1.BackgroundStyle.BackColor2 = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Nothing&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;MyBase&lt;/FONT&gt;&lt;FONT size=2&gt;.OnPaint(e)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;---&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;Which appears to work "most" of the time.&amp;nbsp; Does the OnPaint event sometimes not get called when the theme is changing? To reproduce:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;1. Use the application sample I sent you earlier&lt;BR&gt;2. Add a new form - set the Window State to Maximize&lt;BR&gt;3. Add code to Launch the form from the toolbar&lt;BR&gt;4. Add a third party control (in my case I used TreeGX from DevComponents)&lt;BR&gt;5. Add code similar to the above code snippet&lt;BR&gt;6. Run the application&lt;BR&gt;7. Launch the new form&lt;BR&gt;8. Change the theme - Notice the form reacts correctly&lt;BR&gt;9. "Restore" the new form window (form resizes)&lt;BR&gt;10. Try to change the theme again&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;(OR download and run the new sample attached to this message - you can download an eval of TreeGX from &lt;A href="http://www.devcomponents.com"&gt;www.devcomponents.com&lt;/A&gt; if you do not have this control already)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;At this point the connection between the theming and the form are broken.&amp;nbsp; You can minimize the application and maximize it so it redraws the correct them.&amp;nbsp; Ideas on this one?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;Ben&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Mon, 02 Apr 2007 12:58:22 GMT</pubDate><dc:creator>Ben Kim</dc:creator></item><item><title>RE: Questions regarding Role-based Security</title><link>http://forum.strataframe.net/FindPost7825.aspx</link><description>1. &amp;nbsp;I will check the labels and see if an Invalidate() needs to be called when the ApplicationThemeChanged event is raised.&amp;nbsp; Thanks for the notice.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; I will have to reproduce this on our end and see what the problem is.&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; I'll make sure that the view's are added to the .sql script that is contained within the help documentation.</description><pubDate>Mon, 02 Apr 2007 11:58:37 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Questions regarding Role-based Security</title><link>http://forum.strataframe.net/FindPost7821.aspx</link><description>Figured out #3.&amp;nbsp; There are two views that I missed and that are not included in the "SecurityTables.SQL" script.&lt;/P&gt;&lt;P&gt;Ben</description><pubDate>Mon, 02 Apr 2007 10:04:52 GMT</pubDate><dc:creator>Ben Kim</dc:creator></item></channel></rss>