Click to See Complete Forum and Search --> : VB.Net Application Wizards


George1111
April 5th, 2007, 10:19 PM
Where are they ?

In VB6 I can use the application wizard to create MSHFlexGrid Projects and Forms. While the result is a bit rough, it saves HOURS of keying the Datafield names into all the text boxes, and builds all the basic code.

I have > 50 forms to create - a similar helping wizard would be great in VB.NET

Is there such a project available ?

Thanks

crackersixx
April 6th, 2007, 01:31 PM
You can search for templates in the "new project" menu of VS.
Instructions here: http://msdn2.microsoft.com/en-us/library/ms185306(VS.80).aspx

I searched for "MSHFlexGrid" and had 4 results just in MSDN. Not sure how valid they are for what you need, but something to look at.

aniskhan
April 6th, 2007, 02:00 PM
Well i don't know much about the application wizard for creating data forms in VB 6.0.
As far as my limited knowledge there are No. of application wizards in VS 2005 in New Project window(Ctrl+N) i-e Crystal Reports application,SQL Server Project, Setup and Deployment Project and many more.

As for creating a Data Form u can do:
>>Make a new connection (Tools-->Connect to Database)
You can see this new connection in Server Explorer(Ctrl+Alt+S)
>>Add a dataset item thru Solution Explorer(Ctrl+R)
>>DataSet Designer window opens.
>>Drag and drop table from Server Explorer onto dataset designer.
>>Open an empty form
>>Drag and Drop the table added to Dataset from Data Sources window (Shift+Alt+D) onto form.
>>I hope you will find some changes on your form.

George1111
April 6th, 2007, 09:27 PM
Thanks guys

There isn't much around

Best I could find was EazyCode (www.eazycode.com) at $99 which will generate complete forms from various templates directly from the Database Schema

This is exactly the type of thing I was looking for

Has anyone had experience with this product ?

George1111
April 7th, 2007, 03:11 AM
These are my options when opening a New Project in VB.Net

Am I missing something ?

(I have VS Studio 2005 Standard Edition)

George1111
April 8th, 2007, 04:19 AM
Now I'm really confused (and feel a little cheated)

This link shows a Windows Form Creation Wizard for VB.Net

(Possibly it is for VB2003 not 2005)

http://www.startvbdotnet.com/ado/dataform.aspx

I wonder if it is a Microsoft Wizard ?

If so, where is it ?

aniskhan
April 8th, 2007, 06:07 AM
The dataForm wizard was available in previous version VS.Net 2003, its not available in the new VS2005.
As i posted earlier there is a more easier method in VS2005.
Just Few Step

1.Add a new connection in Server explorer.
2.Add a new dataSource using this connection in dataSources window.
3.Drop the entire table from dataset in datasources window onto form to have a datagridview, alternatively u can also add individual fields i-e adding a varchar column will result in a bound textbox and a boolean field will result in a checkbox.So just three steps.

George1111
April 8th, 2007, 06:49 AM
Sorry, but have now tried thiseveral times and am not getting anywhere

Is there a step by step tutorial with pictures you could recommend

After the last step I get a bundle of errors and some XML inside the form but the form is blank

Make a new connection (Tools-->Connect to Database)
You can see this new connection in Server Explorer(Ctrl+Alt+S)
>>Add a dataset item thru Solution Explorer(Ctrl+R)
>>DataSet Designer window opens.
>>Drag and drop table from Server Explorer onto dataset designer.
>>Open an empty form
>>Drag and Drop the table added to Dataset from Data Sources window (Shift+Alt+D) onto form.

Blank Form after this

aniskhan
April 8th, 2007, 06:55 AM
Link (http://blogs.vbcity.com/mcintyre/archive/2006/09/26/6248.aspx)

aniskhan
April 8th, 2007, 06:59 AM
Found another Link (http://www.homeandlearn.co.uk/NET/nets12p2ed.html)

George1111
April 8th, 2007, 11:50 AM
Aniskhan, thats more like it !! - Thank you (First link is excellent)

It is amazing how you can create a complex form which basically has one line of code - as you said, it basically does what a wizard does.

One shortcoming is that you end up with no ability to manipulate fields easily as they all appear magically - there is no code

The example updates a dataset only (not the database)

Will have fun trying to make the database updated no doubt

Will also need to add search capability

Thank you again

aniskhan
April 8th, 2007, 12:53 PM
George you will have to commit the changes to get it to the database using the save button in the toolbar that originated on your form.

You can view all the code generated for you using Show All Files toolbar button icon in Solution Explorer.
You can then see all the code generated by designer in the dataset and form items in Solution Explorer. Where files with extension designer.vb will have the code generated by the designer and files extension .vb are were you make enhancements.
This division of class defination among several declaration using partial keyword is the new feature in VB 2005 called Partial Classes.

George1111
April 8th, 2007, 06:25 PM
George you will have to commit the changes to get it to the database using the save button in the toolbar that originated on your form

My Savebutton (FloppyDisk Image) is greyed out

So I think, Enable the control, click on it and see the code

But (as you know) it creates an event in the Form with no code in it

No matter what I do -

I cannot see how the arrow, add, delete, save events are triggered

I can also add items to the toolstrip, but where is the code for the events triggered when you click a button on the toostrip ?

(I can see the rest of the code - thanks)

George1111
April 8th, 2007, 09:21 PM
Sorry to be a nuisance

With this project

http://********dotnetcode.com/GdncStore/free/DatabaseFromDataSetAndXMLFile/DatabaseFromDataSetAndXMLFile.htm

This is the project of your second link (above) which keeps getting truncated when I post - so I have attached the original full project

The example shows a grid which can be used to key data into a dataset.

Traditionally, I would prefer the grid as a means of Searching for records and a button "ADD" to create a new rec

In the example picture shown I have added a form which pops up when I click on a row in the grid

How would I get the form to show the content of the row in the grid ? (Currently it is of course blank)

Thanks

aniskhan
April 9th, 2007, 08:25 AM
Make a new overloaded constructor for the second form in which you can pass the ID column of the row selected and change the position of the bindingSource using this ID.
can also pass selected datarow to the form ,edit it and update it.

George1111
April 9th, 2007, 10:50 AM
I have been hunting the net for the past 5 hours trying to find an example which does this.

I must be stupid as no one in the whole internet has an example to do this - huh ?

I have found amazing things, but not one example allows you to click on a datagrid, then display the record in a form.

Most examples are quick and so excited to teach you how to enter data using the datagrid itself - this is totally pathetic and not designed for real live applications (imagine keying in a record with 100 fields using a datagrid - you have to be out of your mind.)

With the depth of experience and gigantic Dot Net Brains out there, including Microsoft, I am dumbfounded that such an example DOES NOT EXIST (well I cant find it).

I GIVE UP (just for now as it is 2.30AM and I am a little tired)

Unfortunately, unless I see an actual example, it is impossible for me to go one more step.

I really treasure your assistance aniskhan as you have pushed me in the right direction very well, thank you

George1111
April 9th, 2007, 08:00 PM
This holds the functionality I am looking for - unfortunately in C#

http://www.planet-source-code.com/URLSEO/vb/scripts/ShowCode!asp/txtCodeId!5568/lngWid!10/anyname.htm

If you do download this,

a) Make sure you build the app before running
b) Transfer the 2 access databases to c:\

Before running