Jump to content

Recommended Posts

Posted

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]

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...