RE: Disable close button on Splash screen windows v12

2017-05-19 Thread truegold via 4D_Tech
Hi Tim,

Ok, will experiment and see how ti works out.

I will then need to suppress and 4D dialog and handle it programmatically.

Thanks for the help,
John...

> Hi John,
> 
> I just ran some quick tests and I think the most likely scenario here is that 
> you still need to assign a password to Designer (which is required to enable 
> the 4D password system).
> 
> Enabling the 4D Password System is a requirement for many features in 4D that 
> pertain to the users and groups, this includes managing plugin access, 
> preventing users from cancelling the backup while it is running, and also the 
> "Default User".
> 
> The "Default User" setting will be ignored if the 4D Password System is not 
> enabled; meaning that anyone who opens the application will be automatically 
> logged in as Designer.
> 
> -Tim

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Disable close button on Splash screen windows v12

2017-05-18 Thread Timothy Penner via 4D_Tech
Hi John,

I just ran some quick tests and I think the most likely scenario here is that 
you still need to assign a password to Designer (which is required to enable 
the 4D password system).

Enabling the 4D Password System is a requirement for many features in 4D that 
pertain to the users and groups, this includes managing plugin access, 
preventing users from cancelling the backup while it is running, and also the 
"Default User".

The "Default User" setting will be ignored if the 4D Password System is not 
enabled; meaning that anyone who opens the application will be automatically 
logged in as Designer.

-Tim



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Disable close button on Splash screen windows v12

2017-05-18 Thread Timothy Penner via 4D_Tech
Hi John,

> Thanks but I am aware of these … trying to make sure I understand before I 
> spend time on it.
> I do have a group named “Admin” and that group has been assigned in database 
> settings.

Did you set a password for Designer?
^ This must be done in order to activate the 4D Password system.

Did you set a Default User in the security tab?
^ This allows the default users to bypass the login screen that would usually 
be seen after adding a password to Designer.

> In this case their wouldn’t be a 4D password dialog as there is a custom 
> login.
> So I need to assigning users to a 4D group programmatically after the custom 
> login.

Why do you need to assign users to a group after the custom login?

-Tim



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Disable close button on Splash screen windows v12

2017-05-18 Thread Timothy Penner via 4D_Tech
Hi John,

Maybe these will help?
http://kb.4d.com/assetid=76953
http://kb.4d.com/assetid=76767

-Tim




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Disable close button on Splash screen windows v12

2017-05-17 Thread truegold via 4D_Tech
Hi Floyd,

> It is the opposite. The checkbox under Database Settings/Security allows you 
> to set a 4D group that HAS access to design mode.
> We create the group “Development” as the Designer, so the Administrator 
> doesn’t have access to edit.

Ok …

So I already have a group created “Admin" that is set to “Design Access” in 
Database Settings->Security. It looks like it includes Designer and 
Administrator.

I have group named “Default Group”.

I originally set this up because we wanted to limit who used up 4D Write 
licenses. Not currently being used however.

So after they do their custom login can’t I...

just assign the admin user that logs in to the “Admin” group and everyone else 
to the "Default Group”?

Seems like that should work.

Appreciate,
John…

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Disable close button on Splash screen windows v12

2017-05-17 Thread Floyd Zink via 4D_Tech
John,

>> Add a 4D Group in the password editor. Is there not a checkbox to disallow a 
>> user into design?

It is the opposite. The checkbox under Database Settings/Security allows you to 
set a 4D group that HAS access to design mode.

We create the group “Development” as the Designer, so the Administrator doesn’t 
have access to edit.

Floyd Zink
QMed Corporation



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Disable close button on Splash screen windows v12

2017-05-17 Thread Robert McKeever via 4D_Tech
John:

Been there (many years ago) in the days of interpretive Basic. Had one client 
who loved to tinker. Since he owned the place, we had no choice but to allow 
it. But then he would go away for a couple of weeks, and they would call me 
when something did’t work. Open the code, and you could see his ‘finger prints’ 
all over the code (yep, we all have styles).

Love the compiler.

I do understand your problem.

> On May 17, 2017, at 8:27 AM, truegold via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi Robert,
> 
> I think you meant me not Jeremy.
> 
> This database - and how this admin user has managed things - goes back to 
> 1993 or so. The user has been able to get into “user mode”, now called 
> “design mode”, reliably up until 4D 2012.
> 
> Rather than having code for everything minor change this user still prefers a 
> quick and dirty sprint into “design mode”. Dangerous? Yep! explained? Yep! 
> User wants to change? Nope!
> 
> That’s what I meant. But the only person who is supposed to be able to get 
> into “design mode” is admin.
> 
> Hopefully that explains my ordeal.
> 
> Appreciate,
> John...
> 
>> Jeremy:
>> 
>> 'Quick Edits' of what?
>> 
>> My databases are all compiled. The Designer can do anything, including 
>> exiting the splash screen, and then to user mode. Anyone else can have 
>> certain privileges (or most all), but they can not exit the splash 
>> screen.
>> 
>> Easy to do.
>> 
>>> On May 16, 2017, at 2:32 PM, truegold via 4D_Tech <4d_tech@lists.4d.com> 
>>> wrote:
>>> 
>>> Hi Jeremy,
>>> 
>>> Thanks for the info.
>>> 
>>> I need to make sure that if they log in as admin then this restriction is 
>>> not there. I have tried for years to dissuade the “power” user from going 
>>> into “design mode” but she uses it for quick edits (as unreliable as it has 
>>> seemingly become). Anyway...
>>> 
>>> So I need to make sure only users that are part of the “keep out” group are 
>>> kept out.
>>> 
>>> Will this approach work?
>>> 
>>> Appreciate,
>>> John...
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

_
Bob McKeever  http://www.mswl.com 
McKeever's Software Wizardry
Port Coquitlam, B.C.
bobmckee...@mac.com




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Disable close button on Splash screen windows v12

2017-05-17 Thread truegold via 4D_Tech
Hi Alan,

Thanks, I’ll give it a try.

I did realize that part of my problem - and why I need a 4D group to prevent 
access - is that some of the code is still run inside the 4D application 
process which is what also controls the splash screen. So it’s possible, even 
after hiding it, to still get into “design mode”.

So if I get the group access figured out so that only admin has access to 
“design mode” in a compiled database then they can keep their splash screen 
window.

I appreciate the code though and will test it.

John...

> 
>> From my code in v13
> 
> Called on Startup method
> DisableWinAppCloseBox (0)  //disable mdi window close box
> DisableWinAppCloseBox (1)  //disable flash screen close box
> 
> The following is trim down version for clarity
> 
> If (<>Platform=3)  //if it is window
> If ($1=0)
> $winRef:=gui_GetWindow ("")  //this is for MDI window
> Else 
> $flashRef:=Frontmost window
> $winRef:=gui_GetWindowFrom4DWin ($flashRef)
> End if 
> 
> If ($winRef>0)
> If ($1=1)  //for flash screen
> $prefered:=<>ScreenWidth  //this is MDI width
> SET WINDOW RECT(0;<>MenuHeight*2;$prefered;<>MDIHeight;$flashRef)  //this 
> must be done before disable close box
> $error:=gui_SetWindowLong ($winRef;WS_MINIMIZEBOX | WS_MAXIMIZEBOX | 
> WS_SYSMENU;WIN_DISABLE;WIN_STYLE)
> End if 
> $error:=gui_DisableCloseBox ($winRef)
> Else 
>  //not concerned in this message
> End if 
> Else 
>  //not concerned in this message
> End if 
> 
> Alan Chan

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Disable close button on Splash screen windows v12

2017-05-17 Thread truegold via 4D_Tech
Hi Robert,

I think you meant me not Jeremy.

This database - and how this admin user has managed things - goes back to 1993 
or so. The user has been able to get into “user mode”, now called “design 
mode”, reliably up until 4D 2012.

Rather than having code for everything minor change this user still prefers a 
quick and dirty sprint into “design mode”. Dangerous? Yep! explained? Yep! User 
wants to change? Nope!

That’s what I meant. But the only person who is supposed to be able to get into 
“design mode” is admin.

Hopefully that explains my ordeal.

Appreciate,
John...

> Jeremy:
> 
> 'Quick Edits' of what?
> 
> My databases are all compiled. The Designer can do anything, including 
> exiting the splash screen, and then to user mode. Anyone else can have 
> certain privileges  (or most all), but they can not exit the splash 
> screen.
> 
> Easy to do.
> 
>> On May 16, 2017, at 2:32 PM, truegold via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> Hi Jeremy,
>> 
>> Thanks for the info.
>> 
>> I need to make sure that if they log in as admin then this restriction is 
>> not there. I have tried for years to dissuade the “power” user from going 
>> into “design mode” but she uses it for quick edits (as unreliable as it has 
>> seemingly become). Anyway...
>> 
>> So I need to make sure only users that are part of the “keep out” group are 
>> kept out.
>> 
>> Will this approach work?
>> 
>> Appreciate,
>> John...

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Disable close button on Splash screen windows v12

2017-05-16 Thread Robert McKeever via 4D_Tech
Jeremy:

'Quick Edits' of what?

My databases are all compiled. The Designer can do anything, including exiting 
the splash screen, and then to user mode. Anyone else can have certain 
privileges(or most all), but they can not exit the splash screen.

Easy to do.

> On May 16, 2017, at 2:32 PM, truegold via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi Jeremy,
> 
> Thanks for the info.
> 
> I need to make sure that if they log in as admin then this restriction is not 
> there. I have tried for years to dissuade the “power” user from going into 
> “design mode” but she uses it for quick edits (as unreliable as it has 
> seemingly become). Anyway...
> 
> So I need to make sure only users that are part of the “keep out” group are 
> kept out.
> 
> Will this approach work?
> 
> Appreciate,
> John...
> 
>> Hi John,
>> 
>> Have you looked at "Setting a Default User" in the Design Reference?
>> 
>> If you want to allow:
>> 1) Users to never see the 4D Password Dialog; and
>> 2) Users to only see your password system; and
>> 3) 4D password system to keep users out of design environment
>> 
>> then take a look at "Setting a Default User" at:
>> 
>> http://doc.4d.com/4Dv16/4D/16.1/Setting-a-Default-User.300-3373311.en.html
>> 
>> To setup a default user and limit access to the Design Environment, you 
>> would:
>> 1) create a group for design access (for example, "design_access".)
>> 2) Create a default user with **NO** password or group assigned (for 
>> example, "default_user".)
>> 3) Assign the users "designer" and "administrator" to the "design_access" 
>> group.
>> 
>> In Database Settings -> Security, do the following:
>> 1) Specify the group for design access from popup of group names.
>> 2) Specify the default user name from popup of user names.
>> 3) Uncheck "users can change password".
>> 
>> When usersr enters the database, they automatically enter as the default 
>> user. No 4D Password Dialog appears. 
>> 
>> You then present your custom password login dialog.
>> 
>> Beware in this scheme you will not be able to get into the Design 
>> Environment again, unless the 4D Password System dialog appears to allow you 
>> to enter as designer.
>> 
>> When opening a database, you can force the 4D Password Dialog to appear by 
>> holding down the shift key.
>> 
>> Best regards,
>> Jeremy French
>> 
>> 
>>> On May 16, 2017, at 4:28 PM, truegold via 4D_Tech <4d_tech@lists.4d.com> 
>>> wrote:
>>> 
>>> So if I want to protect the db from a user getting into “design mode” - 
>>> given we have rolled our own password security - can I simply do the 
>>> following:
>>> 
>>> Add a 4D Group in the password editor. Is there not a checkbox to disallow 
>>> a user into design? So if I set things up this way and then…
>>> 
>>> After the user logins to our custom PW login system immediately identify 
>>> them as a member of this group will that work? Will that keep them from 
>>> getting access?
>> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

_
Bob McKeever  http://www.mswl.com 
McKeever's Software Wizardry
Port Coquitlam, B.C.
bobmckee...@mac.com




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Disable close button on Splash screen windows v12

2017-05-16 Thread truegold via 4D_Tech
Hi Jeremy,

Thanks for the info.

I need to make sure that if they log in as admin then this restriction is not 
there. I have tried for years to dissuade the “power” user from going into 
“design mode” but she uses it for quick edits (as unreliable as it has 
seemingly become). Anyway...

So I need to make sure only users that are part of the “keep out” group are 
kept out.

Will this approach work?

Appreciate,
John...

> Hi John,
> 
> Have you looked at "Setting a Default User" in the Design Reference?
> 
> If you want to allow:
> 1) Users to never see the 4D Password Dialog; and
> 2) Users to only see your password system; and
> 3) 4D password system to keep users out of design environment
> 
> then take a look at "Setting a Default User" at:
> 
> http://doc.4d.com/4Dv16/4D/16.1/Setting-a-Default-User.300-3373311.en.html
> 
> To setup a default user and limit access to the Design Environment, you would:
> 1) create a group for design access (for example, "design_access".)
> 2) Create a default user with **NO** password or group assigned (for example, 
> "default_user".)
> 3) Assign the users "designer" and "administrator" to the "design_access" 
> group.
> 
> In Database Settings -> Security, do the following:
> 1) Specify the group for design access from popup of group names.
> 2) Specify the default user name from popup of user names.
> 3) Uncheck "users can change password".
> 
> When usersr enters the database, they automatically enter as the default 
> user. No 4D Password Dialog appears. 
> 
> You then present your custom password login dialog.
> 
> Beware in this scheme you will not be able to get into the Design Environment 
> again, unless the 4D Password System dialog appears to allow you to enter as 
> designer.
> 
> When opening a database, you can force the 4D Password Dialog to appear by 
> holding down the shift key.
> 
> Best regards,
> Jeremy French
> 
> 
>> On May 16, 2017, at 4:28 PM, truegold via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> So if I want to protect the db from a user getting into “design mode” - 
>> given we have rolled our own password security - can I simply do the 
>> following:
>> 
>> Add a 4D Group in the password editor. Is there not a checkbox to disallow a 
>> user into design? So if I set things up this way and then…
>> 
>> After the user logins to our custom PW login system immediately identify 
>> them as a member of this group will that work? Will that keep them from 
>> getting access?
> 

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Disable close button on Splash screen windows v12

2017-05-16 Thread truegold via 4D_Tech
Hi All,

I’m asking this because I have time scheduled tomorrow to try this approach. 
But I though I’d explained and see what others have experienced using similar 
approaches.

So if I want to protect the db from a user getting into “design mode” - given 
we have rolled our own password security - can I simply do the following:

Add a 4D Group in the password editor. Is there not a checkbox to disallow a 
user into design? So if I set things up this way and then…

After the user logins to our custom PW login system immediately identify them 
as a member of this group will that work? Will that keep them from getting 
access?

Thanks,
John...

> 4D v12 Windows clients
> 
> I have read all the threads in the Nug concerning this and can’t seem to find 
> a solution.
> 
> I have been trying to figure out how to disable the close button on Splash 
> screen windows v12. Not the main Application window (that works).
> 
> If I use the command “gui_DisableCloseBox(windowHandle)” from Win32API it 
> does disable the close button of the application window but not the splash 
> screen.
> 
> I need the Splash screen to also have a disable close button.
> 
> Why would I want to do that? because the client WANTS the splash screen and 
> keeps it maximized.
> 
> Is there any straight-forward way using Win32API?
> 
> Thanks,
> John…
> 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Disable close button on Splash screen windows v12

2017-05-13 Thread truegold via 4D_Tech
Hi Doug,

Thank you! I’ll give it a test.

I’ve had mixed result so far with only being able to disable the close box of 
the parent window (main app window).

Appreciate,
John...

> Just snarfed this from a legacy application and watched the code execute.
> 
> $Error_Code:=gui_SetWndRect
> ($Window_Handle;0;0;<>WND_vWindow_Width;<>WND_vWindow_Height)
> $Error_Code:=gui_SetWindowLong ($Window_Handle;WS_THICKFRAME |
> WS_MAXIMIZEBOX;WIN_DISABLE;WIN_STYLE)
> $Error_Code:=gui_DisableCloseBox ($Window_Handle)
> 
> Line 1 sets the window size
> Line 2 disables the minimize
> Line 3 disables the close box
> 
> 
> 
> --
> Douglas von Roeder
> 949-336-2902

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Disable close button on Splash screen windows v12

2017-05-12 Thread Douglas von Roeder via 4D_Tech
John:

The code shown above is from V12.5 and an old version of Win32. Per the
docs for Win32 8.1.2, the three commands listed above have been deprecated.
The new versions of the command use the same command name with an "Ex"
appended.

--
Douglas von Roeder
949-336-2902

On Thu, May 11, 2017 at 4:55 PM, Douglas von Roeder 
wrote:

> John:
>
> Just snarfed this from a legacy application and watched the code execute.
>
> $Error_Code:=gui_SetWndRect ($Window_Handle;0;0;<>WND_
> vWindow_Width;<>WND_vWindow_Height)
> $Error_Code:=gui_SetWindowLong ($Window_Handle;WS_THICKFRAME |
> WS_MAXIMIZEBOX;WIN_DISABLE;WIN_STYLE)
> $Error_Code:=gui_DisableCloseBox ($Window_Handle)
>
> Line 1 sets the window size
> Line 2 disables the minimize
> Line 3 disables the close box
>
>
>
> --
> Douglas von Roeder
> 949-336-2902 <(949)%20336-2902>
>
> On Tue, May 9, 2017 at 7:18 AM, truegold via 4D_Tech <4d_tech@lists.4d.com
> > wrote:
>
>> Hi All,
>>
>> 4D v12 Windows clients
>>
>> I have read all the threads in the Nug concerning this and can’t seem to
>> find a solution.
>>
>> I have been trying to figure out how to disable the close button on
>> Splash screen windows v12. Not the main Application window (that works).
>>
>> If I use the command “gui_DisableCloseBox(windowHandle)” from Win32API
>> it does disable the close button of the application window but not the
>> splash screen.
>>
>> I need the Splash screen to also have a disable close button.
>>
>> Why would I want to do that? because the client WANTS the splash screen
>> and keeps it maximized.
>>
>> Is there any straight-forward way using Win32API?
>>
>> Thanks,
>> John…
>>
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
>
>
>
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**