Pa Callender Posted April 12, 2007 Posted April 12, 2007 As a small experiment I'm trying to use the System.Windows.Forms class of .NET as a replacement to GUICreate to discover more about .NET. But I've run into a major problem. Here: $form1 = ObjCreate("System.Windows.Forms.Form") ;ObjEvent($form1,"form1_") $form1.Text = "Hello" $form1.HelpButton = True $form1.MaximizeBox = False $form1.MinimizeBox = False $button1 = ObjCreate("System.Windows.Forms.Button") $button1.Text = "OK" ;$form1.Controls.Add($button1) $form1.ShowDialog() While 1 Sleep(512) WEnd ;Func form1_FormClosed() ; Exit ;EndFunc As you can see, if you run the form, you get a GUI with the caption "Hello" and a Help Caption button. But my problem is trying to recreate the functionality of new Point(10,10) I have tried ObjCreate("System.Windows.Forms.Point") and that doesn't exist. I've also tried $form1.Point, $button1.Point and System.Windows.Forms > Point, but to no avail. Could anyone enlighten me? [size="4"]YOU SHALL NOT PARSE!![/size]
jvanegmond Posted April 12, 2007 Posted April 12, 2007 (edited) I have been trying to get the right object ALL DAY!System.Windows.Forms was closest for me.. How did you figure out, what to use?I am trying to do a FileSaveDialog using the System.Windows.Forms.Form. $Obj = ObjCreate("System.Windows.Forms.Form") MsgBox(0, "", $Obj)Returns 0.. Edited April 12, 2007 by Manadar github.com/jvanegmond
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now