[Closed] dotNet to simulate Paint tool for Bitmap
Hi, i read some “How To…” in Maxscript help to build a bitmap tool but i understand that the size of bitmap scene or rollout must be fixed, so there aren’t the possibility to zoom or scroll the view like Paint, and this way is very complicated…
So i read some thing about dotNet, i read about dotNet.assemply and i want know how and if there are the possibility to create a tool like Paint or like some similar free programm example:
http://www.freedownloadscenter.com/Multimedia_and_Graphics/Screen_Capture_Tools/Paint_Express.html
I also look in the “How To…” the example of browser version !! where a can find some manual about dotNet ? because with the maxscript help i don’t understand how find all function of system. et…
This is very possible as you can track your mouse over forms and get all the user feed back that you will need. From there you can use GDI drawing methods to draw into the form and then save it as a bitmap.
You can get information about GDI drawing on my site as well other dotNet/MXS information here.
http://www.penproductions.ca/tutorials/dotNet/dotNet.htm
There are a number of other sites that have some good information on it as well. Using the methods above I have had good luck getting a prototype working. Next thing is sorting out tablet pressure but I’m not sure how to go about that as of yet.
Oh, thanks, it’s exactly that i want … but i look now the tutorial and is very complicated, is similar the C++ GUI.
There is a complete manual ? Because i understand your tutorial but now i want build a simple Paint tool (because i must work with pixel to build a pathfinding for a game tool) but I don’t know how start T_T
Ok, i understand somethings of this dotNet , now i can convert my script for Max64bit !!!
(example: http://www.treddi.com/forum/index.php?app=core&module=attach§ion=attach&attach_id=58302 )
i found all information that i need here:
http://msdn.microsoft.com/en-us/library/k50ex0x9.aspx
but i have spent two hours to find the listView in dotnet format
Should work in 64 bit without a problem. There is no complete manual for Max script and dotNet, you just need to try and follow C# or other languages and convert to Max script. And ask lots of questions here as I have.
ok, only a question:
in the ActiveXControl for ListView then i want link a item to an objects i put:
obj = box()
lv.item.tag = obj
But in DotNet ???
obj = box()
and then if i utilize tag property don’t work
… i make some first experiment, example, if i want add a menu how can i add it ?
(
--form.close()
dnForm=dotNetObject "System.Windows.Forms.form"
dnForm.text = "NameOfTool"
dnMenu = dotnetObject "System.Windows.Forms.MainMenu"
dnMenuItem1 = dotnetObject "System.Windows.Forms.MenuItem"
dnMenuItem1.text = "File"
dnMenu.MenuItems.Clear()
dnMenu.MenuItems.Add dnMenuItem1
formatProps DnForm
DnForm.show()
)
ah ok resolved with these:
dnForm=dotNetObject "System.Windows.Forms.form"
dnForm.text = "NameOfTooll"
dnForm.menu = dotnetObject "System.Windows.Forms.MainMenu"
dnMenuItem1 = dotnetObject "System.Windows.Forms.MenuItem"
dnMenuItem1.text = "File"
dnForm.menu.MenuItems.Clear()
dnForm.menu.MenuItems.Add dnMenuItem1
hi, i have a problem, how can I add a bitmap image to pictureBox dotnetcontrol ???
i put the script and the file containing the image data.
My problem is in:
...
rollout PathRollout "PathFinding Editor" width:512 height:440
(
dotNetControl dnPictureBox "pictureBox" pos:[0,0] width:400 height:392
...
...
on ChList selected index do
(
chanel = index
if TGA!=undefined then
(
paintPath.bitmap = TGA[index]
bmpDisplayed = dotNetObject "System.Drawing.Bitmap" TGA[index] -- BUT TGA[n] is a maxscript bitmap value, not a file
)
)
...
i want add a bitmap image via dotnet because maxscript bitmap editor is not good… but i want add without save a temporary bmp file.
First off I’m going to suggest that you will want to use a dotNet form to contain the picture box if you are trying to do what you have asked. I say that because you will run into issues at some point with the limits of how you can manage the dotNet in a Max rollout.
As for the bitmap have a look at the backGroundImage property or you can also use GDI to draw it in with the paint event. Have a look on my site for information on how to do this.