Page 1 of 1 1
Topic Options
#208610 - 2014-02-20 03:50 PM KixForms Windows Close Button
zrdean Offline
Fresh Scripter

Registered: 2011-03-04
Posts: 5
Loc: Carrollton, Kentucky, USA
I apologize in advance if this has already been asked. I tried to find the solution in the forums to no avail.

I have a KixForm that fires off at each user's login and the user's logon script runs. Some users are closing out of the form, which is killing the script and preventing the user from having their drives mapped. Is there a piece of code or something I can put in the script that would disable or gray out the "X" button at the top of the form, preventing the user from closing it?

Thanks in advance!

Top
#208611 - 2014-02-20 04:30 PM Re: KixForms Windows Close Button [Re: zrdean]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
An easy way to do this would be something like below.

 Code:
...
$Form.Closing = "DoLogOff()"
...


With this function in your script
 Code:
Function DoLogoff()
	Sleep 0.5
	$Form.close
	$rc = LogOff(1)
EndFunction


There is a more clean way so you just cancel the close event triggered by the top right X but I can't find it right now. Used it once but don’t know where anymore.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#208613 - 2014-02-21 03:43 AM Re: KixForms Windows Close Button [Re: Mart]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
Or instead of logging off. You could also just re-open the form.
Top
#208616 - 2014-02-24 09:22 PM Re: KixForms Windows Close Button [Re: ShaneEP]
eriqjaffe Offline
Hey THIS is FUN

Registered: 2004-06-24
Posts: 214
Loc: Arlington Heights, IL USA
In classic KiXforms, there was this:

 Code:
$Form.SysMenu = 0

That hides all of the window controls (minimize, maximize, close). It doesn't disable Alt-F4, though.

You could also use the following method:

 Code:
$Form.OnClosing = "fnCloseForm()"

Function fnCloseForm()
   $ = MessageBox("Oh no you don't!","I Am Forever!")
EndFunction

That will capture any attempt to close the form (short of killing the kix32 executable). If you go that route, be sure to build in a Quit command at the end of the login script.


Edited by eriqjaffe (2014-02-24 09:23 PM)

Top
#213248 - 2018-04-02 03:05 PM Re: KixForms new version [Re: zrdean]
minhtran Offline
Just in Town

Registered: 2018-03-29
Posts: 2
Loc: atlanta
Hello,
What is current new version of KixForms that I can use on Window 7 Enterprise?
Thanks,
T

Top
#213249 - 2018-04-02 05:19 PM Re: KixForms new version [Re: minhtran]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
I believe 2.47.5.0 is the newest version. See the below post, which contains a link to the newest download.

http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=212626#Post212626

Top
#213250 - 2018-04-04 09:55 AM Re: KixForms new version [Re: ShaneEP]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
The last version is 2.47.6.0
Top
#213251 - 2018-04-06 05:21 AM Re: KixForms new version [Re: Arend_]
AndreLuiz Offline
Getting the hang of it

Registered: 2015-10-07
Posts: 89
Loc: Brasil, João pessoa
[PT-BR]
Uma coisa nova que descobri do Kixforms.classic, ninguém tem um help completo?
Porque está faltando muita coisa!!!
Socket, GridView, ScrollBar, etc...
E este evento "OnClosing" que eu não sabia, por favor é sério tem muitas coisas que se parece com algo secreto do sistema que poucos sabem.

Alguém tem um help completo?

[ENG]
One new thing I discovered from Kixforms.classic, does anyone have a complete help?
Because a lot is missing !!!
Socket, GridView, ScrollBar, etc ...
And this "OnClosing" event that I did not know, please be serious there are many things that looks like something secret of the system that few know.

Does anyone have a full help?

Top
#213252 - 2018-04-06 11:19 AM Re: KixForms new version [Re: AndreLuiz]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Hola Andre,

Only Shawn, the autor, may have a full documentation, but I doubt that since he didn't publish any.

As I was involved a bit more in the beginning days of kixforms (started with kixgui.dll) here a good hint to help yourself.
For example .GridView (in classic) is not documented (or was not at that time). Only a basic sample was available. I managed to implement a full blown GridView with all comfy controls, bells and whistles; Interoperating with a bunch of TreeView branches for a piece of program I wrote for the project I was in back then (Was also my reallife project for the PM certification ;\) ).
All that only by faling back to the community here AND having a TypeLibraryViewer to doublecheck for undocumented objects, methods, properties (in my case the one from iTripoli. Search for yourself, can't verify the source to be virus free atm)
It's not too comfortable, I know. But a nice way to learn kixforms in-depth.

A propos sockets. Time to take the time and complete my almost 18 year old network card game project (Yes, it is Hearts )
Never worked with sockets though ;\)


_________________________



Top
#213256 - 2018-04-09 08:54 PM Re: KixForms new version [Re: Jochen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
 Code:
$Form.FormBorderstyle = 0
or:
$Form.ControlBox = not 1



Edited by Lonkero (2018-04-09 08:59 PM)
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 626 anonymous users online.
Newest Members
min_seow, Audio, Hoschi, Comet, rrosell
17881 Registered Users

Generated in 0.061 seconds in which 0.026 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org