Jump to content
Xtreme .Net Talk

dubem1

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by dubem1

  1. Because I have an application generating vb.net code. This application creates a .vb file. But I am not able to generate de code well indented. The only way I have found to indent it well is to open the .vb file ins VS.NET and the do a CRTL+KD and then save the file.
  2. Hello, I have some code templates I used. In those templates, I replace some tags with code. I then create a new .vb file. But sometimes, because of where the tags are in the template, the resulting code is not always well indented. I know I can do CTRL+KD in VS.NEt to reindent the code but i would like to do it before. I would like to indent my code just before I save it into a .vb file. Do you know a way to indent a text file?? (because in fact it is a text file with a .vb extention) Thank you Martin Dube
  3. Hello I am in a situation where I have a Parent-Child relationship between to table. I am using a typed dataset I add a record to the parent table and then a a record to the child table, associated to the parent record a just added. Then I do a rejectChanges on the parent table. I expect that both parent record and child record will be "eliminated" but instead, I have an exception saying "Cannot make this change because constraints are enforced on relation ParentToChild, and changing this value will strand child rows." What's the problem??? Thank you
  4. Hello, My application allows external plug-in. In my application, I have a typed dataset. The plug-in should also have a dataset that will hold some info treated within the plug-in. I would like, when the plug-in is added, to merge the plug-in dataset structure with my application dataset. So I could save my application dataset in a single xml file. When the plug-in is called in my application, it will use his own table structure but they are now in the application dataset since they were merge. Someone knows how? thanks
  5. Let's explain myself. I have a method to get an objet and is fellow data. The objet himself is a student, the fellow data are his address, his classes, his notes...and so on. I want a method where I can get only what I want. Method Get(byval studentID as long, byval withAddress as boolean, byval with classes as boolean, byval with......) It's a lot of parameters! I thought about using bit to know if an option is set. Public Enum Options As Byte Option1 = 1 Option2 = 2 Option3 = 4 Option4 = 8 Option5 = 16 Option6 = 32 End Enum Method Get(byval studentID as long, byval opt as Options) When I call the method, I can do Get(34,Options.Option2 Or Options.Options5) Then the byte representation should be 10010 So I know that Option2 is set and Option 5 is set. Now it's where My problem is. Inside my Get method, I don't know how to analyse the byte to know that Option2 is set and Option 5 is set. Do you know how can I get the binary representation of a byte and then check is bit to know if the option is set or not? Thank you Martin
  6. Hello, Is there a way with VB.NET to store information and retrieve it by code when needed? (DB isn't an issue). I want to store my application version and retrieve it when the About form is showed. I don't want to use the assembly version because it will not always equals my application version. any Idea? thanks Martin
  7. I mean VS.NET 2003
  8. I have juste install VS.Net 20043 with framework 1.1. I have a remoting server which throws an exception. I want to be able to catch it on the client and getting the actual exception and its message, not the "Server encountered an internal error. For more information, turn on customError s in the server's .config file.". Now I have tried all manner of settings in both the serverapplications config file and the machine.config. No matter what I never get my error back, instead I always get the above. On 1.0 I always got my exception back to the client but not on 1.1 (tested on both the one included in the w2k3 rc2 as well as the rtm version). I am out of ideas. Any help greatly appreciated.
  9. Is there a way to avoid the itemCheck event to be raised? I check some items by programmtion at the opening of my form. I don't want to itemCheck event to be raised when I check items by programmation. I want this event to be raised only on a mouse click. How? I try beginUpdate and EndUpdate with no luck! Thanks Martin
  10. No, SetItemChecked use indice. Maybe I wasn't clear Here is my four record added to the checkedListBox ID Name 2045 ItemA 2342 ItemB 2434 ItemC 2342 ItemD They are all, at first uncheked. If I want to check the second one, I will use CheckedListBox1.SetItemChecked(1, True). That's ok, but my problem is if I want to check the item corresponding to the Id 2434. I don't know it's position is the checkedListBox so I can't use SetItemChecked directly. I need to know first what's the indice(or if yout prefer the index) of the item corresponding to the id 2434. Id there a way to find my item from is ID without doing a loop and check all item one by one? Thanks
  11. I want to check the items I don't think this code is doing checking More help please
  12. I can't figure how to use the checkedlistBox control. Here is my situation. When I load my form, I add ti the checkedListBox all the possible values. They are all unchecked and came from a DataTable. Here are the values ID Value 2045 ItemA 2342 ItemB 2434 ItemC 2342 ItemD then when I load my record, it contains a collections of id of items to be checked. Record 1 items to be checked 2045 and 2434 Record 2 items to be checked 2342 The checkedListBox use Indice!! I can't do anythin with indice. I have to deal with my ID I hope I dont have to do a loop in my checklistbox and check if the id equal the record items collections id!! Any idea? Thanks
  13. Because I have circular form reference. Form 1 can open form 2 Form 2 can open form 3 Form 3 can open form 1 (only if form 1 isn't already open) That's why I need to check if the form is opened. Any idea how to implement this? Thanks
  14. Yes, they are modal, that's why I thought about a stack. I can't figure how to use event in this case (base form versus inherited form). Any example how to do it? If I raise the event in the inherited form, how the base form could catch it. Any help will be very appreciated Thanks
  15. Hello, All my form are derived from a base form. Each time a form is opened, I want to add the name (or the id) of the form is a shared stack. I thought about declaring the stack in the base form. But now, how should I implement this? I need each form to add is name in the stack...How?? raising an event in the OnLoad method or just calling a method in the base form? Same onClosing. Any idea how to implement this? Thank you Martin
  16. Hello, I have a list of employee in a listview, when I click on an employee, I get this employee form the database, the employee info is then in the dataEmployee class. This class have some properties to get the info. And a control associated to each property. Each time I click on an employee in the listview, I get the employee I want to show is first name and last name in textbox. I could do txtLastName.Text = dataEmploye.LName and if I change the value in the textbox I have t do the inverse dataEmploye.Lname = txtLastName.Text I would like to use the bindings to avoind this manupulation. So when I click on a employee in the listview I do : dataEmployee = Employe.Get(idEmployee) txtLastName.DataBindings.Clear(); txtLastName.DataBindings.Add(new Binding("Text",dataEmployee,"Lname")); txtFirstName.DataBindings.Clear(); txtFirstName.DataBindings.Add(new Binding("Text",dataEmployee"Fname")); But I found annoying to redo the bindings each time!! Someone knows a way to do the bindings only once and when I get a new employee, the form is refresh automaticly with the new data? Thank you
  17. Hello! I want to bind the properties of a class directly to controls in a winform. I know it can be done in VB.net but I just don't know how. Can someone helps and/or provide an example please Thanks a lot!!!! Martin
  18. I am sorry but this is not what I am looking for. I am looking for balloon tooltip I can place on any control of my forms. Textboxes, labels, buttons. Thank you
  19. Hello, I am developping a new windows application. My clients will get the application in the beginning of year 2004. I was wondering if I should set my forms width and height to fit a 800x600 resolution or to fit a 1024x768 resolution. What's the standard now? Thank you Martin
  20. Hello I would like to use balloon tooltip on any control of my form. Is it possible? If it's not, is it possible to use a square shadow multilines tooltip like the one used when you click on the ? button of a form in windows? Thank you Martin
×
×
  • Create New...