Am I missing Something?? (1 Viewer)

Oldsoftboss

AWF VIP
Local time
Tomorrow, 06:13
Joined
Oct 28, 2001
Messages
2,499
Downloaded and am trialing Visual Basic 2005 Express.

Created a couple of forms, but went to do a couple things and said WHAAAAT??

Tried to set the tab order of controls. The only way I could find was to go to each control and enter the no.

Went to draw an etched box around a couple of text boxes. None available

Cant find a way to lock a text box so the cursur cant enter. It has a read only property, but that still allows yo to click ing the box. The locked property refers to the position rather than locking the contents.

All the text boxes seemto be formated as text. So when you are entering numbers, and want to manipulate them mathically, am finding it very difficult.

Went to help...
You think Access help is bad, well take a look here. Tries to use online help, but when it finds no results (nearly every time) tells me to change the options to use local help first, then online help, and when you check, it is already set that way.

Brother.

Any assistance would be greatly appreciated.

Dave
 
Last edited:

WindSailor

Registered User.
Local time
Today, 13:13
Joined
Oct 29, 2003
Messages
239
Hello Dave,

This is going to be a quick one before I go to work... maybe one of the other guys can add to this... :)

Tried to set the tab order of controls. The only way I could find was to go to each control and enter the no.

In your forms 'Design' mode, click on 'View', 'Tab Order' and you should see your tab order highlighted on the form. From there all you have to do is click your forms components in the order you want and your tab order will follow your sequence of clicks. To get out of the mode click on 'View', 'Tab Order' again.

Went to draw an etched box around a couple of text boxes. None available

I am using the Pro version and I can click and drag an area to select multiple items... don't know what is going on there...

Cant find a way to lock a text box so the cursor cant enter. It has a read only property, but that still allows yo to clicking the box. The locked property refers to the position rather than locking the contents.

Same here... but your text box should be greyed out which should not let you enter/change a value for that textbox. I believe all the events for that textbox still exist (even thought it is ReadOnly) so you could fire an event that would automatically take you to the next tab order component if you want to...:confused:

All the text boxes seem to be formated as text. So when you are entering numbers, and want to manipulate them mathematically, am finding it very difficult.

You can go to the property page and set your TextAlign to Right... not sure if that is what you are talking about. Also if it is not bound (DataBindings - Text; to select your DataSource), then it would be text.

I am afraid I cant help you with the Help dialog. Just not sure on this end why it is doing that...:D :p

The Express version should be free, all you have to do is register.
 

Oldsoftboss

AWF VIP
Local time
Tomorrow, 06:13
Joined
Oct 28, 2001
Messages
2,499
WindSailor said:
In your forms 'Design' mode, click on 'View', 'Tab Order' and you should see your tab order highlighted on the form. From there all you have to do is click your forms components in the order you want and your tab order will follow your sequence of clicks. To get out of the mode click on 'View', 'Tab Order' again..

Thanks WindSailor, found it.

WindSailor said:
I am using the Pro version and I can click and drag an area to select multiple items... don't know what is going on there..

I dont want to select multiple items, but draw a box around them, more-so to pretty up the form.

WindSailor said:
Same here... but your text box should be greyed out which should not let you enter/change a value for that textbox. I believe all the events for that textbox still exist (even thought it is ReadOnly) so you could fire an event that would automatically take you to the next tab order component if you want to..

It is not the event I was worried about. I just wanted a box to display a value. I want to be able to calculate the volume of a room and display it in the text box. I have actually used a label, and found you can define the text in that.

WindSailor said:
I am afraid I cant help you with the Help dialog. Just not sure on this end why it is doing that..

I think Bill's boys still have some work to do.

WindSailor said:
The Express version should be free, all you have to do is register.

Have done that :)

Thanks, Dave
 

WindSailor

Registered User.
Local time
Today, 13:13
Joined
Oct 29, 2003
Messages
239
Oh... you can use either a panel or group box. I had SEVERAL (6-9) group boxes on one form and it slowed things down on my end until I started using them more... stringently...?

Big suggestion...

Once you get your data set established and start data binding items on your form, you will have to remove ALL of your existing bindings on your forms controls before you change any of your relationships etc in you data sets .xsd file for the form (sorry, long winded there...).

Solution Explorer, click on 'Show All Files'.

If you don't... you will crash Visual Studio... :D :p

I had one data set that had ~25 tables in it, some with relations, some not (it was rather big - 24k lines of code for the data set), changed the data sets profile (added one more related table after I had everything on the form data bound and working) and it locked that puppy up tight when I went back to design view for that form...:eek:

Took me a few times to realize what exactly caused it.:rolleyes:

Just remove your data bindings before you edit your data set for your form.

----Edit-----
Since a single data set could apply to many forms - the same would apply to all...

Have fun!
Rick
 
Last edited:

Oldsoftboss

AWF VIP
Local time
Tomorrow, 06:13
Joined
Oct 28, 2001
Messages
2,499
Thanks for the replies Rick.

As this is my first experience with VB I havent really tackled the data side of it yet.

As I am an air conditioning tech by trade I thought my first attempt I would keep rather simple and try to design a form that would calculate the no of air changes in a room. We use this in hospital theatres especially where they must has 20 air changes per hour.

The formula is: Total Mesured Air Flow (in litres/second) / Volume (L x W x H (in metres)) x 3.6

I have an excel spead sheet that I have been using for years and thought it would be a good challenge to start with. This form doesn't need to save the results, thus the reason I haven't tackled bata bindings as yes.

In saying that, the first time I opened the program, it asked me if I wanted to add a data source, so I selected one of me back ends and boom, there all the tables were. Added a field to the form and a navigation bar and it worked. I thought "how easy was that". Have left that project alone to try to get a feel for the different programming method from VBA - error handling for example - with the TRY, CATCH, FINALLY stuff.

Once again thanks for the replies,

Dave
 
Last edited:

Oldsoftboss

AWF VIP
Local time
Tomorrow, 06:13
Joined
Oct 28, 2001
Messages
2,499
PS thanks for the data bindings tip. On that note, just thinking as I type, in Access all my forms are based on queries. Now when linking to an existing back end Db, it doesn't have any queries. Should I create queries in the Access Db (probably import from the front end) or are you able to create queries in the VB project? I see it seems to have recognised the relationships, just wondering how you use this stuff?

Dave
 

WindSailor

Registered User.
Local time
Today, 13:13
Joined
Oct 29, 2003
Messages
239
I work in a Pulp and Paper mill in Oregon, monitor system operations, and do any developing/programming as a hobby. Work consists of four 12 hr days/nights/week on a rotating schedule, so occasionally I get to sneak in my ‘light reading’ when I am on nights and try to expand my brain… sometimes it works, sometimes it doesn’t and the tire just goes flat… <g> Ok… I’m caught now…:p

So with that said… rookie… OK, I will go with that; expert… hell no. I will just give you my take on it and let others expand…

Yes VS 2005 has made a lot of things easier like configuring datasets, and I am new to VS 2005.
Visual Studio 2005 will create your SQL statement for your dataset based on your selection when you add a new data source.
Your dataset (data source) is your query.
Like you said above you can then bind your items on the form to your dataset.
Work your datasets as you would for your Access forms based on your queries – no difference. If you decide you want to include more tables later to a particular dataset, you can go to your datasets .xsd file, right click and choose ‘add table’. If you add a related table VS should detect your relationship. Just be sure to delete all data bindings on all of your forms based on the dataset that you are editing and then reestablish them when done.

You probably have already done it this way... one easy way to experiment with datasets is to create a new form, click on 'Data' on your file menu at the top and then click on 'Show Data Sources'. With-in that new tab on the left, either add a new data source or click an existing one (make sure data grid is highlighted when you click on the arrow next to your data source - refresh if you have to), and then just click on your data source and drag it onto your new form. It should put a data grid and a binding navigator on your form.

Usually when I work with related data, I create a dataset from a master table and then add the related tables into that same dataset through its .xsd file. That way the datasets designer (.xsd file) shows all of the relationships similar to the relationships window in Access.

The dataset is a ‘local in-memory cache’ of your physical database (disconnected data), based on your selection when you made your dataset (when you fill your dataset, you are taking a ‘snapshot’ of your database at exactly that moment). All changes you make on your form with bound data are made to your dataset, not to your database. You will be able to scroll through records on your form to show your current dataset values for each record, edit them, add new records, delete records etc. but you will have to update it back to the database if you want to save your edits etc. Or you can simply cancel everything.

VB.Net is a lot different than VBA. Some VBA functions are not supported in .Net.
There are always work arounds for certain issues and more than one way to do things.

I would use the wizards at first and look at the code generated so you can get the feel of what is going on. Unfortunately I don’t think it is as intuitive as VS 2003 for following code on a form, especially the datasets, but in VS 2005 the datasets seem to be more global.

Oh… and if you manually name your datasets (I do) make sure of course they obviously have different names – and don’t rely on an auto increment value to do it for you. In the past in some cases the auto increment didn’t work and they were over-ridden by the last dataset created…

Rick
 
Last edited:

Kodo

"The Shoe"
Local time
Today, 16:13
Joined
Jan 20, 2004
Messages
707
If you guys want to learn more about table adapters and typed datasets like the way you're doing it, then read the tut: http://www.asp.net/Learn/DataAccess/default.aspx?tabid=63

However, following proper techniques, you should be making an attempt to decouple your layers from eachother. That is to say that you should be able to swap out your data layer (I'm referring to all your typed datasets) with another application and your data access should be agnostic. Using the typed datasets as your data layer, you cannot achieve this. Your data layer is tightly coupled to the underlying architecture and business layer.

Using something like the Enterprise Library (which can be used as a DAL) is a better choice. All of your data access is done with the enterprise library and then you can fill your datasets or custom business objects using the available exposed methods such as ExecuteReader or ExecuteDataSet.
The EntLib can be swapped out in any application and is therefore decoupled from the other layers. I couldn't take your Typed DataSet DAL and swap it out to another app and expect it to pull data out of my new arch.

The drag and drop tools are a decent way to kind of get an idea of what .NET is trying to do for you on a global scale; thank god you can do it all in code too :)
 

WindSailor

Registered User.
Local time
Today, 13:13
Joined
Oct 29, 2003
Messages
239
Quick question... isn't the data reader a forward only cursor and not updatable?
 

Kodo

"The Shoe"
Local time
Today, 16:13
Joined
Jan 20, 2004
Messages
707
WindSailor said:
Quick question... isn't the data reader a forward only cursor and not updatable?
aye aye. that there is your firehose :)
 

Oldsoftboss

AWF VIP
Local time
Tomorrow, 06:13
Joined
Oct 28, 2001
Messages
2,499
This is getting wayyyy to deep for me at the moment. I will have a play and see if I can figure out what you guys are talking about with underlying architectures and business layers etc
 

Oldsoftboss

AWF VIP
Local time
Tomorrow, 06:13
Joined
Oct 28, 2001
Messages
2,499
I finally created my little app I spoke of above. Does what I want. I copied the exe file across to my other computer and it wouldn't run. Said it needed to be installed. Does this mean that every little app I make will need to be installed on a pc ? Or is it that the computer in question does not have .net installed?

Dave
 

Kodo

"The Shoe"
Local time
Today, 16:13
Joined
Jan 20, 2004
Messages
707
exe's don't need to be installed. It is more likely that the .NET version you built your app with is not installed on the target machine.
 

Oldsoftboss

AWF VIP
Local time
Tomorrow, 06:13
Joined
Oct 28, 2001
Messages
2,499
Kodo said:
It is more likely that the .NET version you built your app with is not installed on the target machine.

So how long before .net becomes a standard. Or should I be learning a different vb code :confused:
 

Kodo

"The Shoe"
Local time
Today, 16:13
Joined
Jan 20, 2004
Messages
707
it's pretty well propagated already. It's part of the window updates. If you create an msi installer for your app, this dependency is noted on installation and the option to download is displayed to the user, OR, you can distribute this with your exe (not recommended usually for size reasons).
 

Oldsoftboss

AWF VIP
Local time
Tomorrow, 06:13
Joined
Oct 28, 2001
Messages
2,499
Kodo said:
it's pretty well propagated already. It's part of the window updates.

Are you sure ?
My PC's have windows updates running, yet they still displayed the message.

Maybe try it on your PC ??

Remember I am just starting with VB, but am pretty familiar with VBA, so this discussion is being very beneficial in my learning curve.

Thanks for the replies.

PS: Any comments on the attachment most welcome.
 

Attachments

  • Air Change Calculator.zip
    19.2 KB · Views: 238

Kodo

"The Shoe"
Local time
Today, 16:13
Joined
Jan 20, 2004
Messages
707
loaded up no problem on my box. Check your add/remove to see if .net 2.0 is installed on your target machine.
 

Oldsoftboss

AWF VIP
Local time
Tomorrow, 06:13
Joined
Oct 28, 2001
Messages
2,499
Thank for the feedback Kodo. I was sort of hoping to avoid having to "install" the files on other PC's, with or without .net
Just give them the .exe and that would be the end of it.

Dave
 

Adeptus

What's this button do?
Local time
Tomorrow, 05:43
Joined
Aug 2, 2006
Messages
300
I had a similar problem with a .NET app I wrote for my (recent) previous employer...
I packaged the app & installed it from the MSI.
After making some changes to the app, I tried to just overwrite the exe with the new one. Try to run it & it complains about not being installed.
So I ended up having to uninstall & reinstall the @#%$^ thing...
 

Users who are viewing this thread

Top Bottom