﻿<?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  » How to avoid that MainScreen is closed when Session Lock</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 03:12:40 GMT</lastBuildDate><ttl>20</ttl><item><title>How to avoid that MainScreen is closed when Session Lock</title><link>http://forum.strataframe.net/FindPost20857.aspx</link><description>Hello,&lt;br&gt;
&lt;br&gt;
How can i avoid that Main-Screen is closed(hidden) when Session locks ?&lt;br&gt;
&lt;br&gt;
I was searching around but can't find a Solution.&lt;br&gt;
&lt;br&gt;
Also would be interessting to know how do display Exit button (in Loggin Form) for Re-Login.&lt;br&gt;
&lt;br&gt;
thanks &lt;br&gt;
&lt;br&gt;
Rainer&lt;br&gt;
&lt;br&gt;</description><pubDate>Thu, 04 Dec 2008 03:30:57 GMT</pubDate><dc:creator>Rainer Kempf, RK</dc:creator></item><item><title>RE: How to avoid that MainScreen is closed when Session Lock</title><link>http://forum.strataframe.net/FindPost21003.aspx</link><description>Hi Edhy&lt;br&gt;
&lt;br&gt;
yes of course&lt;br&gt;
&lt;br&gt;
I did following :&lt;br&gt;
&lt;br&gt;
In AppMain.Vb&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
[codesnippet]&lt;br&gt;
    Private Shared Sub ShowLoginAndInitMainForm(ByVal e As ShowLoginAndInitFormEventArgs)&lt;br&gt;
 &lt;br&gt;
        e.ShowMainForm = True&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
    End Sub&lt;br&gt;
&lt;br&gt;
[/codesnippet]&lt;br&gt;
&lt;br&gt;
and in the mainform  i do something like &lt;br&gt;
&lt;br&gt;
[codesnippet]   &lt;br&gt;
&lt;br&gt;
 Private Sub MKSBaseAppWithSecurity_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br&gt;
&lt;br&gt;
        Me.Visible = False&lt;br&gt;
        Dim ll_success_login As Boolean = False&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
        Login.LoginFormType = GetType(MKSBaseLoginForm)&lt;br&gt;
&lt;br&gt;
#If DEBUG Then&lt;br&gt;
        Login.SetLoggedInUser("supervisor", "mks", "")&lt;br&gt;
        ll_success_login = True&lt;br&gt;
#Else&lt;br&gt;
        ll_success_login = Login.ShowLoginAndAuthUser(True)&lt;br&gt;
#End If&lt;br&gt;
&lt;br&gt;
  &lt;br&gt;
&lt;br&gt;
     If ll_success_login Then&lt;br&gt;
          then do something like enable all controls&lt;br&gt;
     Else&lt;br&gt;
           then do something like disable all controls    &lt;br&gt;
     End If&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Me.Visible = True&lt;br&gt;
   &lt;br&gt;
    End Sub&lt;br&gt;
[/codesnippet]&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
that all &lt;br&gt;
and it works fine....&lt;br&gt;
&lt;br&gt;
Rainer</description><pubDate>Thu, 04 Dec 2008 03:30:57 GMT</pubDate><dc:creator>Rainer Kempf, RK</dc:creator></item><item><title>RE: How to avoid that MainScreen is closed when Session Lock</title><link>http://forum.strataframe.net/FindPost20864.aspx</link><description>Hi Rainer,&lt;/P&gt;&lt;P&gt;I am glad you got it working.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Would you mind sharing with us what you did?</description><pubDate>Mon, 24 Nov 2008 08:49:12 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to avoid that MainScreen is closed when Session Lock</title><link>http://forum.strataframe.net/FindPost20863.aspx</link><description>Hi Edhy,&lt;br&gt;
&lt;br&gt;
Thank you for your anwser.&lt;br&gt;
&lt;br&gt;
After i placed my question here in Forum, i tried out &lt;br&gt;
some other thing, and now i got it working as i want.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
thanks &lt;br&gt;
&lt;br&gt;
Rainer</description><pubDate>Mon, 24 Nov 2008 08:28:03 GMT</pubDate><dc:creator>Rainer Kempf, RK</dc:creator></item><item><title>RE: How to avoid that MainScreen is closed when Session Lock</title><link>http://forum.strataframe.net/FindPost20858.aspx</link><description>Hi Rainer,&lt;/P&gt;&lt;P&gt;[quote]How can i avoid that Main-Screen is closed(hidden) when Session locks ?[/quote]&lt;/P&gt;&lt;P&gt;I really don't know, but that is the purpose of Session Lock feature, to lock out the application until a valid user gets access to it again.&lt;/P&gt;&lt;P&gt;[quote]Also would be interesting to know how do display Exit button (in Loggin Form) for Re-Login[/quote]&lt;/P&gt;&lt;P&gt;For that you will have to create your own Login form, which is very easy to do (see documentation) and add that functionality.&amp;nbsp; Keep in mind that Session Lock will leave forms in their current state (ex: unsaved data, etc.) so you may also check for those things before closing any open form.&amp;nbsp; There has been a couple of discussion about this in the forum, so search for the "Session Lock".</description><pubDate>Sun, 23 Nov 2008 21:03:15 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>