PDA

View Full Version : All I want is a Userform to show..



Coolmo
2009-07-22, 12:27 PM
I've searched this forum for "showing userforms", "showing windows forms", etc. and no matches come up. The tutorial I downloaded is great but it only shows how to add a paletteset and palette to AutoCAD. I'm simply trying to add the old-school VBA Userform to my dot net app now. I know how to actually add the userform to my project and load it up with buttons and such but how do I get it to launch in AutoCAD? I'm already missing the days of "Userform1.Show ()". Can someone clue me in as to how to do this and where this new code needs to go (i.e. class, module, etc.)? Or point me directly to another tutorial that shows me step by step. Thanks for any help. Are forms commonly used in AutoCAD or does everyone else use something different for their graphical interface?

Oh yeah, when I created the palette from the tutorial it launched perfectly and docked to the side of AutoCAD. However, when I simply tried to undock the palette and drag it to center screen of AutoCAD, the whole thing flipped out and started blanking out the screen and hanging up and all kinds of stuff. I assume this is because there's a lot more to it than just creating a simple palette and lauching it? Do you have to tell it what to do when it's undocked?

Ed Jobe
2009-07-22, 02:09 PM
See the sticky thread I posted a few days ago on training. Fenton Webb had a video on WPF (Windows Presentation Foundation), aka forms.

Coolmo
2009-07-22, 06:33 PM
I just downloaded that and 3 other video "how-tos" on how to do this and they confused me even more. Is this not a simple thing? Most videos step right into code but don't show you what they're stepping into, where it came from and what the code is refering to. I've seen simple code where Form1.Show() does work and others complaining that it doesn't work and the code Form1.Showdialog() is the one you want to use. Other videos and how to pages start out with

Public class Form1

and go from there where others don't show this at all...

I'm sure there's a VB.NET for AutoCAD book out there somewhere. Is this my best route? It's amazing how powerful and visual my VBA programs that I wrote for AutoCAD are and now I feel like I'm banging two rocks together over here. The best program I have so far is the "Hello World" command line DLL :banghead:

Ed Jobe
2009-07-22, 08:52 PM
Did you download the ObjectArx sdk? In the \Samples\dotNet\HelloWorld project, see the HelloFormCommand() sub.

Coolmo
2009-07-23, 01:55 PM
Download from where? I did a text search in the Training link(s) you told me to look in and couldn't find anything to download. ObjectARX text search came up with a bunch of lines but there was no download button available.

I really do appreciate your patience with my ignorance on this :Oops:

Coolmo
2009-07-23, 02:03 PM
Now I know what you're talking about. The ObjectARX sdk from Autodesk.com. I got it now. Thanks for your help. I'll dive in tonight.