Search results for query: *

  1. A

    ShowDialog always raises the Load event

    Hi, Why does ShowDialog always raise the Load event of a form, it does not matter if you hide. I am hiding my form when the user clicks on OK button. I am doing validation outside the form, if validation fails I ShowDialog the form again, but it always fire the Load event and I have...
  2. A

    Update binding

    Hi When one uses the datagrid and the user changes row the bound control is also updated. I also am trying to achieve this with a DataListView control, but I can't figure out what event to fire when SelectedIndex has changed. Thanks
  3. A

    Weird data binding

    Hi I have an address control with properties Line1, Line2, Line3 and Code, with that I have a Address Class with the same properties. On my form I am doing the following to bind the class to my address control AddressControl1.DataBindings.Add("Line1", clsPostalAddress, "Line1")...
  4. A

    Refreshing the whole forms with data bindings

    Hi, My controls is bound to an object, i am change some object properties while the user is editing on the form. How can I update the the bindings so that the screen shows the changes made to the object. I have tried using the CurrencyManager, but you can't because it is a single object...
  5. A

    Error Handeling

    Error Handeling [RESOLVED] Hi there, I am trying to find the best way of retrying an operation after I have handled an error; currently i am doing it like this: Try Retry: customers = DataAccess.LoadCustomers Catch sqlEx as SqlException If sqlExl.Number = 1111 Then GoTo Retry Else...
  6. A

    Referencing arrays

    I know it is the way it works; But my initial question is what would be best to keep that reference, so that RefA would always point to the resized array without going to update the reference after the array has been resized. Thanks,
  7. A

    Referencing arrays

    What I am on about is the following: Dim Test() As Integer = {1, 2, 3} Dim RefA() As Integer RefA = Test ReDim Preserve Test(25) MessageBox.Show(RefA.Length.ToString) 'returns 3 MessageBox.Show(Test.Length.ToString) 'returns 26
  8. A

    Referencing arrays

    Referencing arrays [RESOLVED] Hi, I want to reference an array with one of my own control's DataSource property. When I add an element to my array, I resize it with 'Redim Preserved' and add the new element to it. But when you redim my control looses the reference to the array and does not...
  9. A

    Deriving from control

    Hi, I have extended a control(SourceGrid2) and put the exteded component into my own ControlsLibrary which references the SourceGrid2.DLL. Now When I want to add my extended control I keep getting this error: File or assembly name SourceGrid2, or one of its dependencies, was not found. Now...
  10. A

    Adding attribute to an inherited property

    Adding attribute to an inherited property [RESOLVED] Hi, Is it possible to add an attribute to and inherited property, or do you need to override the property if you want to add an attribute to the property? If possible how do you do that, you see I want to use inheritance for code re-use...
  11. A

    Converting Objects To Type

    I was a bit in a hurry to ask the question, what I actually wanted to do was to create a intance of the passed on type. But I did find the answer: Public Function GetList(Byval objType As Type) As Object() Dim obj As Object obj = Activator.CreateInstance(objType) DoSomething(obj)...
  12. A

    Converting Objects To Type

    Hi, I am trying to convert a type into a certain object, eg: Public Function LoadObject(ByVal objType As Type) As Object Dim oObj As Object = New Object 'convert oObt to objType---> how DoSomething(oObj) End Function DoSomething Method needs the object to be a object as objType...
  13. A

    Error Handling

    You can use the Application.ThreadException event check the documentation
Back
Top