Jump to content
Xtreme .Net Talk

Goksly

Avatar/Signature
  • Posts

    26
  • Joined

  • Last visited

Everything posted by Goksly

  1. Sorry I was most unclear in my first post. I'm actually trying to change the name of a column on an ACCESS database... So I really need the SQL to change it, or if there is another round - about method... i.e. can you extract the schema to a dataset, change the column name and update the database that way?
  2. Hello there :) I'm creating a multi database interface and one of the things I want to do is let the user change the column name. I am finding huge difficulty in finding the code to alter a columns name. Adding or deleting a column seems a piece of .... So er yeah... can anyone point me in the right direction please? :)
  3. No need to say sorry mate... I just wasnt as clear as I should have been i guess :)
  4. Yeah Im not saying its not easy nor very good if you want that kind of thing. Im after a window, rather than a notification window. By the code sample you've given it looks like it fails two pretty big hurdles: 1) Supports text only... I need text / pictures / buttons / textboxes. 2) Is only there for a limited amount of time. I want it to stay until the user clicks close. Thanks for the suggestion, and I'm defo going to keep the link as I can think of 101 projects where something like that is useful, but just not this one :(
  5. Diesels post should be deleted. Who plays ace low?! :P
  6. Yeah Im not sure that will help, as I really need to to be like... a well placed context menu (but wider and more customisable in terms of having input boxes etc). Will have a go at some of the suggestions when Ive finally got text and a button in a datagrid column... which is proving harder than I thought it would be. Thanks for the kind comment too mskeel - but it obviously isnt april fools yet :P
  7. Thanks for the input guys! I was thinking about doing a form, but then I thought if I create a new form from a mdi child, wont that freeze the whole program (while waiting for activity), rather than just the child window its being called / created from? Ideally I just want the window its being created in being "froze" and not the parent window.... also want to avoid multi threading. I dont think Im 'pro' enough to try that or some crazy API - just dont think im at that level yet. Thanks again for the input :)
  8. duh.... an even better example would be the "search" button on these very forums! Input box / button / stays visible even when the mouse leaves the "search" area and doesnt stop me viewing other programs etc.
  9. Obviously Im not looking for code -> just a pointer :) http://img455.imageshack.us/img455/2369/object4cg.png Im creating a datagrid column object with a button and when they click the button I want something like the above to appear (obviously with different controls; a few input boxes and buttons etc. Anyways what I want to know is what kind of control it is, and how would I make it? I kind of want it to act like that annoying bubble you get in the system tray (saying windows has updates available etc); so it should stay there until a user click close etc -> but only in the child windows (application is a MDI and I only want it to be on the child document). So er yeah, if someone can point me in the right direction I would be mucho greatful. Thanks in advance :)
  10. Hi again :) Right a few (hopefully simple) questions in regard to drag drop. What i want to do is drag an item from a list view on a panel. On the item being dropped the text in the item (which refers to a table) is taken and used to create an ERD item control. Now I have this working, however I cant find the mouse position in regards to the panel! When I drop the item onto the panel, its meant to create the control at the point, but its missing by a mile and ive discovered the x and y properties from the dragevent is around the whole programs 0,0! So my first questions is.... how can i find out the proper place to draw the item... is there a way to find the mouses position on the panel and not the whole program in the dragdrop event? My second question.... dragdropeffect -> does this only affect the icon and nothing else, or is there some more stuff being run in the background that should affect which one i chose? Thanks :)
  11. Not that I know of - ie as you have done there. What you could do is have the data you want to add in the column in an array and then loop through... ie string[] strExample = new string[] { "one", "two", "three" }; foreach( string strSingle in strExample ) { drNewRow = dtDataTable.NewRow(); drNewRow[ intOfColumnYouAreAddingDataToo ] = strSingle; dtDataTable.Rows.Add( drNewRow ); } Im pretty new to all this C# stuff, but if I wanted to populate a single column in a datatable thats what I'd do :)
  12. Just as the columns have mapping names that need to match, so does the actual datatablestyle! What I normally do, to make sure they match is, just before adding the table style (but after binding the datagrid) I will do: tableStyle.MappingName = ((DataTable) dataGrid1.DataSource).TableName Another method is to create the DataTable with a name: Dim MyDataTable As DataTable = New DataTable ("usher") (and then use the datatable as the datasource, rather than one of the datasets tables). Im not great with vb so ive written the first in C# -> hope it points you in the right direction :)
  13. Wow! Not sure if thats a piece of code you have found, or knocked up your self but thank you! Thats very similar to what I need :) Just will spend a bit more time defining its looks etc, but a great base. Thank you :)
  14. control.locked = true?
  15. Hi, Er could you explain what that is actually for? The picture I gave is kind of like a form within part of a form (well thats the plan... a mdi form with a listview on the left and in the right panel MANY of these little forms). I'm not quite sure what your code does, but what i need is pointers as to how i would create this look... I was thinking it was a form with the onpaint overridden and some how a button placed up in the right hand corner, but as I said - not sure how to do that kind of funky stuff! Regards.
  16. Hi. Here is an example of something I want to create graphically: http://img113.imageshack.us/img113/1576/table6ol.jpg Now I think I can handle the content (i.e. get a datagrid and populate it :P) but want im after is information on how I would create the item. It needs to have the little button in the right to collapse and expand the 'mini-form', it needs to have the heading (table name) and it needs to be drag-able. Another criteria is this has to be able to go into a form... specifically PART of a form (so im not sure if i can inherit from the windows form class as i only know of normal forms and mdi forms, not something inbetween!). So how do I go about doing soemthing like this? Ive created user controls before, but only ones made up of a cluster of common controls -> never something that looks this unique. Anyone got any pointers... I obviously dont expect someone to create the code etc, but just a point in the right direction... maybe some links or small code examples etc. Thanks in advance.
  17. Mark, I'm pretty new to this .Net stuff so I'd like to just go over that and make sure ive understood you. You create an interface (blank class with method headings but no code - forcing classes that use it to have those methods). How do you know what database is in use? And with your method can the the SQLServerData and AccessData have different methods? Thanks :)
  18. Ok one way I have thought is, as all the classes are database related, they will roughly have all the same functions. So if I make the base class have all virtual functions, and all the derived classes having the same functions but overriding them - that should work fine and no matter what, casting the object assigned to the toolbar button to the base class and then calling the once empty, but now overridden base class functions. That a good way, or some cowboy style?
  19. Ok here is my basic problem; I'm creating a program that can interact with various databases. My idea was to have a base class with stuff needed by all the databases, such as the database type (so i can identify what database it should be), username, password etc etc. Then I have all the classes which inherit these, such as an oracle, sql server etc classes. Now, my plan is to assign these database connections to a toolbar button; so i have extended the toolbar button class to include a member which is the base class of the databases. My problem is this; I need to go from the base class and cast it to the actual database class.... so i wanted to return the database type from the base class, then on that result cast it. The problem is this gives: "An unhandled exception of type 'System.InvalidCastException' occurred in test.exe". It seems the problem is you can cast from the derived class to the base class, but not the other way round. Any idea how I would do fix this?
  20. Excellent link! thank you very much :)
  21. http://img208.imageshack.us/img208/1720/control0zs.jpg I thought it was a listview, but when looking for sample code etc they all show a listview with just one checkbox attached to the first column. So what is this control? I'm looking to copy the effect of having multiple checkboxes etc. Could this be done with a Datagrid, or is this some weird custom control? Thanks!
  22. Hehe cheers. I normally wouldnt reinvent the wheel... but when learning a new language its not so bad to re-do something as its a nice learning curve. After thinking about it... reusing someone elses work isnt too bad for a project - I hope it will show the more investigative side of me :)
  23. Thank you very much for that link. I would have defo gone with that one but instead decided on this one from code project... its in C# so I can understand the code a bit better. Think doing my own one is a bit out of my reach at the moment. Thank you all.
  24. Cool..... only 19 years to wait then :E
  25. Cheers chaps... @lidds: I'm a student so cant really afford to splash out. Plus this project is actually for a university project so cant really use other peoples code.... but of course can view other peoples code and alter them to suit my needs ;) @PlausiblyDamp: tried the plugin you suggested and although its free and the guy has done very well... all it does is add an icon to the menu. This is good but only part of what I was after. I really want the whole display (two colour menu, icons and similar style when mouse is over etc). ;/ I really thought MS would have made this as easy as pie... dont suppose its something they are putting in .net 2.0? Any further help equally warmly welcomed :)
×
×
  • Create New...