Jump to content

Recommended Posts

Posted

Hi all

Is it possible to access to System.Windows.Forms? It's a kind of Net.Framework.

I want to command the System.Windows.Forms.Application Object like in Delphi (Application.COMMAND, e.g. Application.Run)

I tried it with ObjCreate("System.Windows.Forms") but this will return error code 1 :)

Here i found two links, but they dont help me: Here and Here.

Can anybody help me? Or is there a other way to makes this with AutoIt?:

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(true);
Application.Run(new GlassForm());

This is Delphi.

Mfg / BEst Regards Spider

www.AutoIt.de - Moderator of the German AutoIt Forum

 

Posted

I have never tried calling .Net through COM. You have to load mscorlib first though, and call other assemblies through that, if I recall. You could also just write your own assembly that has a COM object exposed, register it, put it in the GAC and all that. Then call your own COM object because it was written differently.

Posted

Ah well, i see, thank you for your .. uhm.. constructive post :)

Anyone know how to acces the function "SetCompatibleTextRenderingDefault"?

What i want to do with this? Maybe you know DWM (Vista's destopmanager). I want to blur professional things. I need this function, so the windowtext would be showed :P

I hope somebody can help me.

Thanks, your Spider

www.AutoIt.de - Moderator of the German AutoIt Forum

 

Posted

You can work with certain .NET objects:

$DataList = ObjCreate("System.Collections.ArrayList")
$DataList.Add("B")
$DataList.Add("C")
$DataList.Add("E")
$DataList.Add("D")
$DataList.Add("A")
$DataList.Sort()
$DataList.Reverse()

For $strItem in $DataList
    ConsoleWrite( $strItem & @CRLF)
Next
Posted

Hi

Thank you for you comment, but this wont work for System.Windows.Forms :) I also tried the same:

$oNET = ObjCreate("System.Windows.Forms") ; <<--- This return an error
$oNet.Application.SetCompatibleTextRenderingDefault(true)

Your Spider

www.AutoIt.de - Moderator of the German AutoIt Forum

 

Posted

This script will show you the accessible classes:

#321230

On my system, it doesn't list any System.Windows classes.

Do you use XP or Vista? On my XP there is also not this group, but on Vista it is.

Here is a link wich says that there is a NET obj that calls on "System.Windows.Forms": http://msdn.microsoft.com/en-us/library/sy...dows.forms.aspx

Wait, i will boot now Vista, and tell you what the script u linked to said to me, thank you :)

Your Spider

www.AutoIt.de - Moderator of the German AutoIt Forum

 

Posted

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(true);
Application.Run(new GlassForm());
I read something about it and I don't think, it will work with AutoIt. This command sets the Drawing Mode from .NET to GDI+ (instead of GDI32), but AutoIt uses it's own Function to draw. So this should only work for .NET-forms, not for native win32 / AutoIt-Forms I think. :)

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Posted

Thanks for comment. I dont know .Net, but i want to create a script that will all help is in the forum.

"$oNET = ObjCreate("System.Windows.Forms.Form")" also return an error.

Spider

www.AutoIt.de - Moderator of the German AutoIt Forum

 

Posted

Hi

I need it, because i want to make this DWM working with AutoIt. It works perfect, but text wont shows correctly. There are two posibilitys to fix this. The firstone is with SetWindowLayered. I tried a lot, but this wont work. (i know the function.. but autoit can't do this)

So i try it to make it like this way (near Fig. 10): http://msdn.microsoft.com/en-us/magazine/cc163435.aspx

Spider

www.AutoIt.de - Moderator of the German AutoIt Forum

 

Posted

Hi

Ok, but is there a other possibility to access "Application"

On VB it looks like this:

Dim defaultValue As Boolean
Application.SetCompatibleTextRenderingDefault(defaultValue)

On C#:

public static void SetCompatibleTextRenderingDefault (
    bool defaultValue
)

defaultValue = True or False (boolean)

Thanks, your Spider

www.AutoIt.de - Moderator of the German AutoIt Forum

 

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...