[Maxscript] Dotnet Form material Editor

Hey all,

Is there a way to get a dotnet form working integrated into a scripted material?

(

	plugin material plTest
		name:"Test"
		classID:#(0xa8c2cf8, 0x418e7d77)
		extends:DirectX_9_Shader replaceUI:true version:1
	(
		parameters pmMain rollout:rolTest
		(
			
		)
		
		rollout rolTest ""
		(
			button btTest "test"
			dotnetcontrol dnctForm "maxCustomControls.maxForm" width:200 height:60
			
			on rolTest open do
			(
				dnLabel=dotNetObject "label" --"system.windows.forms.label"
				dnLabel.backColor=(dotNetClass "system.drawing.color").red
				dnLabel.bounds=dotNetObject "system.drawing.rectangle" 10 10 100 40
				dnctForm.controls.add dnLabel
				dnctForm.show()
			)
		)
	)

	meditmaterials[1] = plTest()
)

It is there, but not showing.

Cheers,
Robbert

I don’t know about a .NET form, but I’ve successfully put .NET objects and classes into a scripted DX9 material without any problems.

I wanted to put them in form because I can not change the lifetime of a dotnetcontrol. Only on dotnetobjects and classes.

You cannot host a form inside another form, it must be a window itself. You should have to use a MaxControl.

Have you tried setting it’s TopMost property to false? And just to be sure have the Visible property set to true also. Cheers!