Jump to content
Xtreme .Net Talk

AlexCode

Avatar/Signature
  • Posts

    935
  • Joined

  • Last visited

About AlexCode

  • Birthday 04/08/1977

Personal Information

  • Occupation
    Computer Systems Consultant (90% developer)
  • Visual Studio .NET Version
    2003 Pro
  • .NET Preferred Language
    VB.net & C#

AlexCode's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi! I need to know how do I create a .net Solution outside the Visual Studio Environment. Want to be able to create the whole thing: - Create the Solution - Create Projects and add them to the Solution - Add *.cs files to the projects - Add references to the projects the whole pack... :) Thanks! Alex :p
  2. Hi... I'm building a custom control that needs to have a DataSource property... pretty much like a datagrid. Can anyone point me the guide lines on how to do this? I know that I need to add support to: -> IList interface -> IListSource interface -> IEnumerable interface but I need to do this ASAP... Thanks! Alex :p
  3. Hi guys... I'm working with VS 2005 and Visual SourceSafe 2005... I have a lot of errors specially when trying to see forms at design-time (some internal references errors, displaying an error message instead of the form, but the project compiles and runs perfectly). This can be fixed restarting Visual Studio... :( Some VSS plug-in errors also appear... Have you experienced these errors?? Fixes?? Alex :p
  4. "... the connection initialization is too slow" We can use connection pooling. "...MS now recommends MSDE over Access" The deployment is the big issue. We can't compare the two on this field. We sell about 6 apps on top of an Access DB... we just have to add the .mdb file to the installation... "...MS Access is primarily single user." Agree and disagree. I believe it was meant for a single user access but it behaves very well on a multi-user scenario. The problem isn't how many people access the mdb file, it's: - How many field changing queries (Updates, Inserts & Deletes) - The amount of records processed per query - The amount or existence of concurrency - The predicted DB growth - The predicted DB Clients growth For me, these are the factors that make me choose between MS Access and a SQL Server Engine (MSSQL Server 2000, MySQL or Oracle). Alex :p
  5. Hi... I'm sorry but I can't give you that answer just because I didn't actually benchmarked it. Like I said, in my scenario, looping thru the child controls wasn't an option, so I didn't have much choice. You can do it yourself tho... Go and add some controls to your Form... don't forget to nest controls inside Tabs and Panels, also Panels inside Panels and complex scenarios like this. Then test... My prediction is that for plain child controls search Reflection will be slower... but when it comes to nested controls, looping will take more time, and Reflection will take exactly the same time. No matter where the control is, Reflection will take allways the same time. Alex :p
  6. Hi... I want to ask you guys what's the best way to update a database using ADO.net. I'm not using Datasets, nor DataAdapters. I have my own IDBCommand objects, trying to keep it as DBProvider independant as possible. My main question is: having the 3 records save commands (Insert, Update & Delete), and a bunch of rows to update (a DataRow collection), what's the best code to apply the commands on the rows? Thanks, Alex :p
  7. I use Reflection a lot... There's another thing, that uses Reflection, and that is related to this thread, that's getting a control by its name instead of looping thru the Controls array. And this also works for components... where u don't have an array to loop... Shared Function FindObject(ByVal ParentControl As Object, ByVal Name As String) As Object Dim propInfo As System.Reflection.PropertyInfo If TypeOf ParentControl Is Control Then propInfo = ParentControl.GetType().GetProperty( _ Name, _ System.Reflection.BindingFlags.IgnoreCase Or _ System.Reflection.BindingFlags.Instance Or _ System.Reflection.BindingFlags.NonPublic Or _ System.Reflection.BindingFlags.Public) If Not propInfo Is Nothing Then Dim value As Object = propInfo.GetValue(ParentControl, Nothing) Return value End If End If Return Nothing End Function Hope u enjoy... Alex :p
  8. Hi... many thanks for your reply. I already managed to get the name of a component: using System.Reflection; FieldInfo[] fields = this.GetType().GetFields(BindingFlags.DeclaredOnly | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); foreach(FieldInfo field in fields) { if (field.GetValue(this) is [The component type we're looking for]) Console.WriteLine(field.Name); } The problem with this approach is that it returns the correct name but with a underscore first. Someting like: _Component1 for a component named Component1 at design-time. We can safelly remove the underscore tho, cause this is a generic behaviour for all components. Again, thank for your reply. Alex :p
  9. Right now I'm having another problem with Components... How do I know their name at run-time?? We can set and see their name at design-time on the property grid, but they have no run-time accessible property... Thanks in advance, Alex :p
  10. Thanks... You know... hope is the last one to die... ehehehehe Alex :p
  11. Glad u liked it! :) Alex :p
  12. Take a look here: http://www.xtremedotnettalk.com/showthread.php?t=85168 This is an old thread of mine, read it all and you'll find your code there. Alex :p
  13. Hi! I need to get a string containing a specified control full location namespace... Explaining it better, imagine this: MyProject +-> MyForm1 +-> TabControl1 +-> TabPage1 +-> Button1 Giving the Button1 object as a parameter, I need to have a function that can retrieve me: "MyProject.MyForm1.TabControl1.TabPage1.Button1" My current solution looks like this: Shared Function GetParentTreeNamespace(ByVal ctrl As Control) As String If ctrl Is Nothing Then Return "" Dim pForm As Form = ctrl.FindForm Dim retval As String = ctrl.Name Dim cCtrl As Control = ctrl Do While Not cCtrl.Parent Is Nothing If cCtrl.Parent Is pForm Then retval = pForm.GetType.FullName & "." & retval Else retval = cCtrl.Parent.Name & "." & retval End If cCtrl = cCtrl.Parent Loop Return retval End Function I was hoping that there were a solution without loops and stuff... Thanks, Alex :p
  14. "Generally speaking, you might have been trying to use the child form's .Left, .Top, or .Location properties in an attempt to position the form. However, as you would have seen by now, this doesn't appear to work." It works... you just have to set the StartPosition of the child form to Manual... Alex :p
×
×
  • Create New...