How to get string value in textbox (dotnet)

How to get string value in textbox (dotnet)

hainamcad
Advocate Advocate
1,149 Views
3 Replies
Message 1 of 4

How to get string value in textbox (dotnet)

hainamcad
Advocate
Advocate

I create a window form in c# , i create dll and use it in 3dsmax , can i use string value in textbox(winform) with maxscript ? please help me , sorry my english is not good i use google translate

Capture.JPG

0 Likes
1,150 Views
3 Replies
Replies (3)
Message 2 of 4

hainamcad
Advocate
Advocate

my solution is public textbox in c# , and i can call it from maxscript

1.JPG

0 Likes
Message 3 of 4

denist.dts
Explorer
Explorer

of course you can, but using the correct syntax:

try(form.close()) catch()
form = dotnetobject "MaxCustomControls.MaxForm"
form.size = dotnetobject "System.Drawing.Size" 200 200
	
tb = dotnetobject "TextBox"
tb.Dock = tb.Dock.Fill
form.controls.add tb	
form.showmodeless()
	

form.controls.item[0].text = "abcdef"	

 

0 Likes
Message 4 of 4

denisT.MaxDoctor
Advisor
Advisor

of course you can, but using the correct syntax:

try(form.close()) catch()
form = dotnetobject "MaxCustomControls.MaxForm"
form.size = dotnetobject "System.Drawing.Size" 200 200
	
tb = dotnetobject "TextBox"
tb.Dock = tb.Dock.Fill
form.controls.add tb	
form.showmodeless()
	
	
	
form.controls.item[0].text = "abcdef"	

 

0 Likes