KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Open form maximized

 
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion
View previous topic :: View next topic  
Author Message
Mart
KiXforms Regular
KiXforms Regular


Joined: 03 Oct 2005
Posts: 57
Location: Rotterdam - Netherlands

PostPosted: Wed Sep 17, 2008 8:59 am    Post subject: Open form maximized Reply with quote

Guy's,

Small question.

Is it possible let a kf.net form open maximized?
I have a workaround like shown below but would like to know if there is anything build into kf.net that enables opening a form maximized.
When a indows is maximize a user is not able to mave the window aroudn and that is eactly what we want, a maximzied windows that cannot be un-maximized (I can just disable to box at the top right corner) and when closed the user gets logged off (I have code for this all ready).

Code:

Break On


$wmiColl = GetObject("WinMgmts:root/cimv2").ExecQuery("Select * FROM Win32_DesktopMonitor")
For Each $wmiObj in $wmiColl
   If $wmiObj.DeviceID = "DesktopMonitor1"
      $screenwidth = $wmiObj.ScreenWidth
      $screenheight = $wmiObj.ScreenHeight
   EndIf
Next

$System = CreateObject("Kixforms.System")
If Not $System
   $nul= MessageBox("KiXforms.Net Not Initiated. This Script Will Now Close.","Error",16)
   Quit()
EndIf
$nul = $System.Application.EnableVisualStyles

$Form1 = $System.Form()
$Form1.Left = 0
$Form1.StartPosition = 0  ;FormStartPosition_Manual
$Form1.Size = $System.Size($screenwidth,$screenheight) ;(Width,Height)
$Form1.Text = "Form1"
$Form1.Top = 0

$Form1.Show  ;Displays the Form

While $Form1.Visible
   $Nul = Execute($Form1.DoEvents())
Loop
Exit 0

_________________
Mart

- He's chained forever to a world that's departed.....It's not enough, it's not enough - Sorrow by Pink Floyd.
Back to top
View user's profile Send private message
Gargoyle
KiXforms Aficionado
KiXforms Aficionado


Joined: 30 Dec 2003
Posts: 366
Location: Arizona

PostPosted: Wed Sep 17, 2008 12:35 pm    Post subject: Reply with quote

Have you tried

$Form.Height = $Screenheight
$Form.Width = $Screenwidth

Or maybe

$Form.FormWindowState = 2

_________________
Parents were invented to make children happy by giving them something to ignore.
Back to top
View user's profile Send private message
Mart
KiXforms Regular
KiXforms Regular


Joined: 03 Oct 2005
Posts: 57
Location: Rotterdam - Netherlands

PostPosted: Wed Sep 17, 2008 1:14 pm    Post subject: Reply with quote

LOL Very Happy but also Embarassed
Didnít even see the WindowState option in kf.net designer. It's there but I just did not look far enough down.

This works just fine.
Code:

Break On

$System = CreateObject("Kixforms.System")
If Not $System
   $nul= MessageBox("KiXforms.Net Not Initiated. This Script Will Now Close.","Error",16)
   Quit()
EndIf
$nul = $System.Application.EnableVisualStyles

$Form1 = $System.Form()
$Form1.MaximizeBox = 0  ;False
$Form1.MinimizeBox = 0  ;False
$Form1.Left = 0
$Form1.StartPosition = 0  ;FormStartPosition_Manual
$Form1.Text = "Form1"
$Form1.Top = 0
$Form1.WindowState = 2  ;FormWindowState_Maximized

$Form1.Show  ;Displays the Form

While $Form1.Visible
   $Nul = Execute($Form1.DoEvents())
Loop
Exit 0

_________________
Mart

- He's chained forever to a world that's departed.....It's not enough, it's not enough - Sorrow by Pink Floyd.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group