Jump to content
Sign in to follow this  
chris330

Windows Dialogue Box Programming

Recommended Posts

Dear All,

I have recently been making a program in work which allows us to print multiple copies of AutoCAD documents which saves us alot of time. I have noticed however that a piece of software I downloaded (which was freeware by the way) which was not compatable with our version of AutoCAD had a nice dialogue box like the kind MS Word or Excel produces when you instruct it to print and it gives you all sorts of options with drop down menus so you can select your chosen printer or paper size, or like the type of dialogue boxes you see when you are configuring your internet connection.

My question is, how can I construct such a dialogue box? Do I need to purchase some software to do this? I would be most intrigued to know.

Plus one more thing, if I ever made something we can market, what are the implications with regard to copywright issues if I had to use some form of Microsoft or other manufacturer's software to do this?

Thanks alot in advance for the help, I always like to come to this forum because of the diversity of knowledge and technical expertise held by the people who frequent it. It's become my kind of technical agony aunt over the last few years biggrin_o.gif

Share this post


Link to post
Share on other sites

Visual Basic.NET is the secret language that unlocks all Windows API's. If you want to do slightly more advanced stuff, or are more used to C/C++, you may want to use C#.NET instead.

Excel and Word and most other MS Office products use a dumbed down version of VB.NET, called VBA, in order to implement modifications of documents (i.e. macros). You can also use it to draw an interface for an Access database btw. Unlike VB.NET, VBA is not fully OO and is more reminiscent of scripting, however, as far as I am aware, most Windows APIs remain accessible, though I am not sure of the syntax.

You don't need to purchase Visual Studio.NET to produce dialogue boxes, however. You can do it with a "free" language like Java, or if you are hardcore you can write a C++ program in Notepad - but be warned, the code for a single window/dialogue box is fairly extensive, which is why VB.NET is so much more appealing.

As for how much Microsoft or Sun own when you produce a piece of software using their language/development kits, I think your legal/HR department should read the licensing agreement in detail before signing anything.

I hope this helps thumbs-up.gif

Share this post


Link to post
Share on other sites
Excel and Word and most other MS Office products use a dumbed down version of VB.NET, called VBA, in order to implement modifications of documents (i.e. macros). You can also use it to draw an interface for an Access database btw.

*Thinks back at his schooldays and shivers*

If using MS Office would mean that MS owns all of the documents that you create by it, then I think the intelligence agencies of about every country in the world will be hammering down on MS, so I seriously doubt that tounge2.gif

I see scripts as just another form of written text, so it should also fall under the same license terms, although with MS involved it is always sensible to check the license agreement whistle.gif

Share this post


Link to post
Share on other sites

The .Net framework has a printer dialog already accessible (to keep things consistant within Windows for the end users and to help cut back the dev time on making repetitive dialogs)

You can download a free .Net compiler (in the SDK) and write programs in notepad or a third-party IDE

http://msdn.microsoft.com/vcsharp....lt.aspx

http://msdn.microsoft.com/vcsharp/downloads/starterkits/default.aspx

http://msdn.microsoft.com/netfram....rms.asp

Share this post


Link to post
Share on other sites

Thanks a bundle everybody. That's a great response. I have been learning the Visual Basic package which comes with Excel and it isn't that bad given that I've already got some experience in programming thanks to this game.

Who ever said computer games were of no career use biggrin_o.gif

Nice to see some familiar and friendly faces still around here too thumbs-up.gif I'll post up some of the code I've written when things start working.

Long time since I've used this smilie too!!

xmas_o.gifxmas_o.gif

Happy Christmas everybody xmas_o.gifbiggrin_o.gif

Share this post


Link to post
Share on other sites

The big drawback to visual basic is that to distribute your programs you need to also distribute the runtime DLL's. A great alternative that's often overlooked is Delphi. (pretty much Visual Pascal). It compiles executables that will run just fine by themselves. The launcher application for the latest FFUR releases was done using Delphi 5.0.

Share this post


Link to post
Share on other sites

I would use one of the .Net languages (preferably C#) as long as you want to code for the Windows platform only (which your choice of VB suggests). As has been noted by others here the .Net-Framework with it's huge library simplyfies a lot of common programing tasks, and with the Express editions of Visual Studio available for free it's easy to get started.

Many big applications directly support the framework by exposing their own libraries, so there's no real need to use VBA at all. I've done quite a bit of coding for ArcGIS using C# and C++/CLI this way. You can do external applications that just use the installed libraries or you can add new functionality to the original application (new toolbars, buttons, etc.).

Not sure about AutoCAD, tho, as they're always behind with such things.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×