OT: Crossword Puzzle Creator - .NET Source

B

Bob Johnson

I'm looking to create a small Windows Forms (2.0) application that enables
the user to create basic crossword puzzles that are printable (ideally
..PDF). I just spent a bunch of time with Google and it seems that there are
a lot of apps for sale (no source), a lot of shareware Java applets - some
with source code - but nothing in .NET. At least I failed to locate any .NET
source for this sort of thing.

I'd sure appreciate any pointers for getting a .NET crossword puzzle creator
(preferably C#).

Thanks.
 
G

Guest

Hmmmm. Interesting project. Here's an easy approach to use:

-Use a regular Windows.Forms.Form control for the app.

-Smother the form with textboxes which are square in shape to make the
letter squares.

-Customise the border style of the textbox to suit the desired aesthetics.

-Create one textbox to start with. Once it's the size you want, copy and
paste it all over the form to create the crossword grid

-Set the tab stop property to false on them all

-Create and event handler for the textbox Click event (i.e. textBox1.Click
+= new EventHandler(TextBoxClick)). The purpose of the event is so that when
the user is running the app, click the text boxes will make them dissapear to
get rid of unwanted squares in the desired puzzle.

-Only create one event handler function for all the text boxes and use the
"sender" parameter to address the textbox that fired the event. Inside the
event write a simple function that toggles the visibility of the text box

-For putting the little numbers in the boxes, I would reccomend laying label
controls over the top of each text box. Make the font really tiny. You can
acheive the smallest fonts by editing the generator code in the
Form1.Designer.cs file as I think the smallest selectible font in the .Net
Environment is 6.

-Create a context menu and bind it to all the textboxes. The context menu
should have an option to add the number label to that box. Use a dialog box
form or something similar to enter the number that goes there

-Once the GUI for the app is done. That's the easy part =/. If you want PDF
output, you'll have to use the rendering method of the form and/or each
control on the form. Create a memory bitmap and parse it as the parameter for
the Object.DrawtoBitmap() method (don't quote me on the method name but it's
something like that).

-Using some library (not sure if one ships with .Net) to print the memory
bitmap to the Adobe Distiller. It is essential that it prints to an Adobe
Distiller as there is no way on this earth that you'll want to write your own
PDF renderer unless you have a few months spare to get the info you need and
sit down and nut it out. There could be a custom control that someone has
made which will create PDFs for you. Generally the creation of PDFs is only
done my licensed Adobe Products as I think the file format is protected by
law.

If you aren't too crash hot with programming event handlers in .Net and
messing around with the code side of controls, this will be a tough app for
you to make. Like I said, interesting project :eek:). Good luck.
 
R

RobinS

Why not use a DataGridView? Seems like that would be easier than getting
all those textboxes to line up.

Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
----------------------------------------------------------
 
B

Bob Johnson

RE:

<< Dudes you are all so asleep man :) >>

You are so right man! The whole point of my OP was so that I could get
something that was *already done*

Spending a few minutes with google produces many hits for Java applets with
source etc. I was hoping for the same but for .NET (C# preferably).

-Bob
 
C

clintonG

Its these fun sounding projects that would be really challenging that keeps
people fired up. Hope you find something...

<%= Clinton
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top