Jump to content
Xtreme .Net Talk

Denaes

Avatar/Signature
  • Posts

    975
  • Joined

  • Last visited

Everything posted by Denaes

  1. Ok, I havn't found any work arounds to having a ValueMember and not having a combo databound. Yeah, these combos will handle both display and entry (i/o) so I would have to change the value both ways - or do a search/replace with a bunch of rows on tables to make the ValueMember which is saved match the text (ie, Active saves the string "Active" rather than A). I could have created 5 relational child tables with values, but that seemed a little silly since the largest of these tables would have 5 values and only the Status Table would see use elsewhere. My solution is easy to work with, though I'm sure I'm breaking normalization rules somehow. I just created one table called ComboValueItems with 4 fields: ID (just a unique primary key, just in case), ComboDropdownItem, ValueMember and Identifier. ComboDropdownItem is the value to be shown in comboboxes (or other collection controls). ValueMember is the value to be saved to the database and/or loaded from the database. Identifier is a name that corelates to a control. So I just have one table and create a few queries to select ComboDropdownItem & ValueMember based on Identifier and hook them up to the combo/list boxes. It works and this isn't the final production... we don't even have a fully relational SQL database yet. Still in conversion from a not quite relational Progress database. So I'm sure all these tables will change anyways - but we need pretty screens to show management.
  2. Can this even be done with a databound control in .Net? What I mean by data transformation, in case it's a different syntax here, is when you take one value and display it as another value. Say I have a table of Users. There is a data column called Status. Two of the more common statuses stored in this field are "A" and "I". So when I display this column, I'm supposed to display Active (for "A") and Inactive (for "I"). This is relatively easy if I don't use databound controls. I'm currently using a SQL Server 2005 database converted from another database (Progress) with SQL Server 2005 Developer Edition & Visual Studio 2005 Professional and Component One 2005 Suite. In the other database language this datastructure came from, on each databound control, you could define that "A" becomes "Active" and "I" becomes "Inactive" in both directions (to/from the database). My best guess (well it would work, but I'd rather not do it) as of now, to keep things databound, would be to create another table called "Status" with the letter as the primary key and the descriptive word as another field, then query the data from both tables with a relationship bound on the letter. Any help or leads on this would be greatly appreciated :D
  3. Thanks for the help. I was hoping I was just overlooking something. I can't knock the job they did, they have lookup functionality which is cool - but it's still not multi-column supported. As of right now I can't see a single reason not to build a control with the ability to set the index manually if one is entered. If there is a problem with a specific combo, just don't enter the value. Seems rather iffy for databound combos, but for static combos (you'd be surprised how many of those are still out there) configured at least basically at designtime, I can't see a problem. Along the way of my wishlist, I can't help but think that I wish they had included an "index changed" event that only happens after the combo is populated. It just seems wrong that every single combobox using an index changed (which is pretty common) will error out when the application boots unless you use a Try statement or create an application state variable.
  4. Same problem here so far. Well the day after I installed SQL 2005 Developer & VS Pro 2005 I had this huge hang time on boot. If it happens again today I'll see if there is anything to be done about it. What it reminds me of is back in windows 98 (or about that era) when it would take like 5 minutes to boot, there was probobly some driver or service being called that was taking too long or timing out. At that point there was a utility you downloaded which showed you everything set to startup, then you restarted and it showed you at what time and how long everything took to load and their status (like if they failed). At least back in those days, once you knew what was taking the time, you could disable/upgrade/replace the faulty driver/service. <update> This morning things did take longer to boot than normal, but nowhere near the length of time it took previously. Maybe a minute longer as opposed to 5 minutes longer on Thursday. </update>
  5. http://www.d12designs.net/images/shawnsfull.gif Scary that the only pic I can find of myself in digital format has me weilding a katana. :D
  6. When you load values into the ComboBox (I have it set to dropdown combolistbox) the control loads with a -1 (blank) value. It seems extremely easy to inherit this control and add a property called "Default Index" which attempts to select that index after loading the items collection. Is there a property somewere I'm missing? This seems so basic of a need that I can't see MS going through 3 iterations of VS (i'm working with 2005 now) and still not addressing this. If not, I'll have to custom control it. Thanks :)
  7. Very true. That was in the first chapter or two of the OOP using VB.net book you read from cover to cover. It explained how use the framework's command line interface to build & link .EXE's and .DLLs, basically (and then in more detail) what was happening when you precompiled your data into an IL .exe I'd say that it's the best .Net book I've read overall, but it should be your second or third book, not your first. What you said about all .Net books being useless or whatever you said was ignorant. It's pretty clear you havn't fully read a VB6 to .Net or Beginning .Net book. The basic VB.net books I learned on (Mastering VB.Net & Schneiders VB.Net) explained the .exe and framework situation and even compared it to the VB6 runtimes and Java interpreter. They also explained at least the basic concepts & parameters you need for I/O to read/write and append a file. I think you either didn't read basic "intro to VB.Net" books and got bogged down in things you didn't know or just skipped around and didn't read the basic books fully, testing and applying your knowledge as you went. I don't know. It sounds like you know what's going on for some things, but are totally in the dark for others. Like this running an app on another machine. It's a step easier than VB6. You copy the file to a disk (or download it) and if the file doesn't run, install the .Net framework (again, from disk or download it). Same thing you had to do with VB6. The part where .Net is easier is that you don't need to register .dlls with the machine. You can just leave them in the directory with the .exe and copy them over as well.
  8. A few years years ago I learned every scrap of VB6 I knew in an "Intro to programming course". Well I ended up liking it and learned it all from the book. The book was used for two semisters of the class (intro 1 & intro 2) and I had the whole book done before Intro 1 was over. The 1st class covered VB6: Variables, logic, loops, Arrays - just the most basic stuff. Anywho, it was a requirement for some non-programming majors as well - or one of the choices for them. I'll say that maybe half the class had problems with programming in general, but a bit more than half the class was constantly confused by the .Text & .Print thing. When we did things in class people were like randomly guessing. They honestly didn't know which controls had which properties. And I'm sure there was some reason for the VB developers, but it didn't matter. There wasn't a reason for anyone using VB6. I'm not going to take a shot and I don't believe that you're stupid in the least. What you just said was painfully ignorant though. There are a lot of good books. Don't start flailing around and lashing out at all the pathetic books that are out for .net because I doubt you've read them all and are in any position to accurately judge that. After my "Intro to programming" courses, we also had a Java OOP course & an assembly course. So I know a bit of VB6... I know a bit of Java, though I got a B+ in the course and finished all the projects, I don't see what they were getting at with OOP. My boss at work wanted me to do a programming project while I was interning as a systems administrator at a bank. I told him to get me VB6 and he got me VB.net. I'll tell you I was fricking confused. I told him and he got me VB.Net Complete. Since then books, online papers and these (and the Visual Basic) forums have been entirely 100% how I've learned to use 2003 for a few professional paying gigs. You want to see confusing? ComponentOne components. Great time savers, but they don't work exactly as you'd think by looking at them. You learn by reading .CHM help files and going through a handful of sample projects. Looking back on it now, I think there was a newsgroup or something I could have went to. The kicker was that I got an O'Reilly book called: "OOP with Visual Basic.Net" which explained the reason why VB.Net is OOP and got throught to me the concepts and reasonings and theories that my Java OOP Class & teacher couldn't/didn't. I've even went back to that java book and it still confuses me the way they explain things. That is something we would need examples of. Being a VB6 user for over a year and going to .Net I can say that quite a few habits I'd had didn't translate over very well. To this day, I think the thing that still annoys me, that I don't have a complete handle on, is Streams. They seem like a nice more advanced topic. I/O (saving to/from files) was a damn simple thing in VB6. In VB.net it was more involved. LMAO! You want to see some obscure "crap", don't look at any of the VB languages. In fact, once you get over the learning curve for any language, it's no longer obcsure. VB6 had a learning curve. VB.net had a learning curve. The main difference is that .Net is more transparent so you don't have to spend an inordinate amount of time trying to figure out a bunch of obscure crap. .Net uses namespaces to organize data. Java does (maybe a different name) as well. C, C++, VB6, Fortran, etc - they don't. If you don't know what you want to do, you need to look it up in a book or help file. In VB6 you have help enabled intellisense in which you can browse the namespaces. VB.net 2005 even has a "My" keyword which has a bunch of common tasks. I havn't had the opportunity to explore it too much yet, but it looks interesting.
  9. There are a ton of books for VB.net, .Net in general and other .Net languages. You have the basic beginners books that treat you like a noob and books that just reference things and assume you understand the concepts of programming. Good, they havn't. They made changes to make .Net compatable across languages (C#, J#, C++.Net, Delphi.Net, VB.net) and to make it a truely Object Oriented language. What is the name of the control? It's a textbox. Default names should reflect what it is. You shouldn't have to guess what Text1 is. Because that was one of the most arbitrary and annoying parts about VB6. In our class it screwed up half the class trying to remember which controls used .text or .print and why would there be a name. This is also now Object Oriented. Every control that has text has a .Text method. You can stroll through your collection of controls on a form and assign/read all of the objects .Text methods wether they're Textboxes, maskedTextboxes, Forms, labels, groupboxes, etc. The point is to adhere to a standard for all controls. It's also a bonus that students now just have to remember that .Text is text and not have to remember another arbitrary method. Why not? It makes sense for what they do. Honestly you could make an inherited control in like 3 minutes that uses positive numbers instead. Thats why OOP is so popular and powerful. But that control with such an arbitrary change would confuse other programmers who were to try to use it.
  10. XP Home on my dell came with .Net Framework 1.0 and the XP Pro Discs we had at a bank I used to work at all had 1.0 as well. I'm not sure why any XP discs wouldn't have 1.0 on it.
  11. First off, I'd heard that 2005 was going to come with a grid control. It may still, but it's on in my RC1 standard tray. Secondly, *** is up with ListViewGroups only being availalbe on computers with XP and the visual styles turned on!? What, was microsoft too lazy to just impliment it's functionality. Instead they made it XP only compatable? Unless you're doing an inside app for XP only machines, it might as well not be there as an option. Third, why is there a Treeview (I hope it has the standard functionality that 2003 lacked) and a ListView, but no way to turn nodes on the listview or add columns to the list view? It must be the rogue control nobody wants... but wait! There are three component companies I know of that have it! Why would they have it if it if nobody wanted it? I could overlook the basic shortcommings in VS2003 controls because they gave you a free user edition of the ComponentOne controls which picked up the slack for what they lacked. I hope they do something like that - only hopefully with Infragistics - their 2005 package is much more impressive than ComponentOnes. There are some pretty wide gaping holes in basic business functionality in VB2005. Personally I can think of two reasons for this: They wanted to outsource the controls because someone else had them done and it would be cheaper to get a mass of liscenses for everyone like with ComponentOne. The alternative is that MS is just playing softball and doesn't want to make ripples with companies who make money by fleshing out Visual Studio, so they purposefully don't build the advanced controls. As it stands, if this were the final release and these were the final controls and no provision were made to fill the holes in basic functionality, I'd be sorely let down at paying so much for Visual Studio and having to plop down another $500-$1,000 or so just to get some pretty basic/standard controls.
  12. It comes in just shy of 25mb. It's large by download standards, not CD standards :D I don't have .net installed on this machine, so I can't say for sure, but there are numerous files installed to a specific directory... searching for specific ones would help you find if it's there. I believe the 1.0 framework comes on XP and higher machines and 1.1 comes on XP service pack 1 and higher machines. If you're using Visual Studio 2003, you need 1.1 on the target PC. Welcome to change :D In the world of computers, technologies evolve and you either keep up or get left behind. Dot Net is change on multiple areas at once. The basics of the language have changed the most in the last few editions of Visual Basic, the concepts for having a framework have changed radically (much more similar to Java now) and it's now an Object Oriented Language. Much of the help files doesn't deal with one single "How do I do..." because thats not how OOP works. There are pages in the help file like that, but further between the many which describe the objects. They deal with objects and what they are. You can use an object for many things in many other objects (even if they're made for a specific object/control). So often when you find something, you have to learn more than what is just on that page. You have to learn what will be reading/accepting/collecting that object and displaying it, etc. It is a big change, but the best bet is to see if you can get it, then come here and ask about parts that don't make sense. Honestly it took me 3 days to get an application up and running with ADO in VB6. Took me closer to 3 weeks (I think longer) before I pieced together how Datasets worked with datatables and updated and filled and filtered, etc. By the way 2005 is much more user friendly in database.
  13. Set the DropdownType to List in the properties menu.
  14. I'm looking to either: 1) Add a design time button to a control to have a configuration window show. 2) Show a configuration window when an item is first added to a form. On the form I'll be displaying a collection on the Form (control collection) and I'll be displaying 2-4 control collections on the control. Basically the control (aside from other purposes) contains a state property and when it changes, it affects other controls on the form, such as enabling, disabling, hiding, clearing, etc. So if anyone can show me (or point me in the right direction for) the basics of the proper event and way to check the logic, I would be most appreciative :D
  15. My friend was tech support for Sim City 2000 or 3000 (I can't recall). They had an issue where planes were flying through buildings on the beta build. The tech support was sent a memo to describe this as a technological feature, rather than a bug. :D
  16. A bug is more desirable when it's labeled a feature. ;)
  17. ::shrugs:: different ways of approaching the same problem. My knee jerk response to a programming problem is to normally figure something out programatically. Your way is most definately easier and faster though. As the post above shows, doing it programatically might take some redesigning and effort to impliment - but might be a requirement if a program will handle different filetypes differently. Thank you. I wish I'd done it myself. EFileTahi-A does his own Avatars in a similar vein and has some that I'm very jealous of.
  18. If it were a straight forward 500 line procedure, I could see it. This procedure wasn't. Actually it was the worst kind of 500 lines... the kind where you copy the first 250 lines, throw logic around it and paste it in the second part of the logic. It was EXACTLY the same except for some changes. made. It could have easily been a 280 line report by adding some logic. Then again it could and should have been 2-5 50 line procedures with comments. Yeah, the 500 lines of code didn't have much in the way of comments. comments. There was a block at the top and everyonce and a while a commented like with some code word in it which looked like a way to indicate when a logic statement ended, which one it was (since they were so wrapped up in each other like spaghetti).
  19. I felt so close! Using Control as a datatype for the property gets you a list of all of the controls on the form... but using ControlCollection or Control() (an array) gets you a popup window where you can build your own custom controls for the collection/array. Actually, it wouldn't bother me in the least having a Form popup just after you add the window to the form. The window would show the ControlCollection of the parent form in a checked listbox. Those that are checked exist in the controls ControlCollection. Then there would be another three properties to set at this time. And possibly have this window pop back up either by way of a button only existing at runtime, a context menu, those little triangle thingies in the upper corner (in 2005) or a property. So at this point, if someone can explain it how to make a form popup from a form being dragged onto a control and/or how to create runtime functionality. Most likely I assume someone might know a tutorial or at least the keywords so I can continue my search and relay my findings here :D
  20. It sounds complicated, but it's hard to explain in a single line. I'm creating a control and I want to create a property that will allow me to add multiple (as few as zero and as many as all in an extreme case) controls to a ControlCollection, ArrayList or Collection in my custom control. When you click on the property, I want a dropdown to popup and possibly look like a checked listbox with all of the controls... or maybe just have a window come up with a listbox full of Controls on screen and Controls added (or to add to) the control. I've seen similar functionality in a few components. A bindingsource (2005) has a dropdown menu to select from a list of datasources (though it only lets you choose one). A stripcontrol and listbox both let you add new items in a new window. Rather than adding new items, I'm looking to add existing items. I have no problem getting my result via code with an addControl property. It passes the control in and I add it to the collection on the other side. I'm not asking anyone to do this for me, but I'm not sure exactly where to start to get these specialized windows from properties. I googled for about 15 minutes on it and got nowhere. I just don't know the area to target my searches.
  21. Wow, I should have listened to my subconcious. The entire time I was searching for a TableAdapter (when you add a table to the form, a typed TableAdapter is added), and couldn't find it, but somehow said DataAdaptor all throughout the post. Well the TableAdapter makes use of the DataAdapter - plus a lot of nice code so you don't have to do anything manually with that adapter. Data.SQLClient.SQLDataAdapter is what I was looking for... kind of. I was hoping these TableAdapters were directly inheriting a base class in common, but they're only inheriting System.ComponentModel.Component, which isn't of much use in what I was attempting.
  22. Thats part of the nightmare I'm thinking of... the database we're converting from allows seperate procedure files and seperate include files and they're so far abused that there is redundant code all over and you can't modify many of the base Include or procedure files for causing another to fail - so you make another and change it slightly making things worse. This is the sort of things I fear. I wouldn't mind if things were virtually split up, like a treenode that explodes into the regions and you can click on a region and see JUST what is inside of the region. But also have the option to click on the file and see the whole thing. Then again, I may not mind the split classes so much if you has an option to do a virtual view which virtually combines all the partial classes into a single virtual window. I think one of the things annoying me so much about it right now (aside from the rampant potential for abuse) is that 2005 b2 keeps having errors where I have to go in and delete lines manually. Not often, but 2-5 times in an 8 hour day if I make certain changes playing around with ADO 2.0. But since these are seperate files, it starts opening more and more windows and it just frustrates me having so many windows open.
  23. I'm using mostly typed datasets, but I just tried to create a manual DataAdapter and I can't find it. I looked it up in the help file/MSDN and it doesn't give the namespace for it. The dataset is in a totally different namespace than I'm used to as well. I searched for a while on google, but everyone is talking about VS2005 doing things for you and not how to do things yourself.
  24. Yes, Jedhi says that the saved file opens the appropriate application, but doesn't load the file that was chosen. There might be a 3rd party way to do it, but the only way I figured out how to do it would be to check the parameters for the filename and load the file.
×
×
  • Create New...