Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
T

Tim McCurdy

@Tim McCurdy
About
Posts
23
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ASP.NET Membership...well sucks!
    T Tim McCurdy

    Is anyone else in this boat or am I the only one? I'd like to create a custom Membership Provider, but everytime I get to a certain point in the design, the way MS has implemented everything really limits what you can do! It would have been a 1000 times better if they'd just made all the Membership stuff Interfaces instead of hard classes which they completely designed around their own database and then said "Oh, here's a pattern". Who's pattern? Not mine. Don't think that I am a n00b trying to use Membership for the first time. I've been using and studying it for over a year and a half now. I'm at the point now where I'd rather just implement the Membership classes from scratch and I'm wondering if anyone else out there has seen anything to this matter.

    ASP.NET csharp asp-net database design regex

  • 2.0 UserCtrol and Styles
    T Tim McCurdy

    I'm building the proverbial "Address" control for our site. I don't want to hard-code the style attributes, but instead allow the developer to control the Styles for the Address Control just like the GridViews. However, even though I have a public proeprty of say "LabelStyle" that's of type "System.Web.UI.WebControls.Style", everytime I load it in the designer the designer complains that there is no such property on "System.Web.UI.UserControl". However, I DO see the element in the markup!

    <uc1:AddressControl ID="AddressControl1" runat="server">
    <LabelStyle CssClass="textFontLabel" />
    <EditorStyle CssClass="textFont" />
    </uc1:AddressControl>

    How can I get this to work properly? Or can this not be done with UserControls? Do I need to use a CompositeControl?

    ASP.NET question html wpf design sysadmin

  • CompositeUI -VS- SmartInstitute CodeProject Article?
    T Tim McCurdy

    Personally, I think the Composite UI App Block sucks! I've studied it intensely fro 6 months and MAYBE after about 6 months of studying, you MIGHT be able to put a project together. There is just way to much to grasp. One of our requirements at my company is to make a Framework that all projects can be built from. I would NEVER base this framework off of the Composite UI! I would be training developers for years! I understand that MS must make App Blocks which work for all cases and all scenarios. However, most of their naming conventions and the way they've put things together could have been done so much better and cleaner! One thing in particular is developing Plugins. If you use the Composite UI, not only will your Plugin need to know everything about the Host, but you Host also needs to know everything about your Plugin!!! :wtf: Decoupled model my a$$!

    .NET (Core and Framework) architecture question csharp html asp-net

  • Read from a file and display as a report
    T Tim McCurdy

    No, you cannot. However, I have developer a Viewer control which views any file type that the OS can view. This was mostly done by using a webbrowser control and hooking into different events. Now, it IS possible to handle specific events and get the type of object that is being loaded into the browser. Using this, you could write another layer to your code that can handle the multiple versions of MS Office which could stop a user from modifying a Document. For PDFs it doesn't really matter, only about 5% - 10% of employees actually have a full version of Acrobat where they could actually manipulate a PDF. I cannot go into futher details because my code belongs to my company and I cannot distribute it. But the webbrowser will be your best bet. In .NET 2005, the webbrowser has been fully overhauled to be .NET friendly.

    .NET (Core and Framework) database help csharp sql-server

  • Converting Between Types
    T Tim McCurdy

    Instead of using a BaseType Class that they must inherit from, have you tried specifying an Interface that they must implement?

    .NET (Core and Framework) help question

  • Asynchronous Callbacks
    T Tim McCurdy

    Before you think this is just another "How do I...?" please read. I DO NOT need to know how to do async operations. Here's my scenario... I am performing Async callbacks on a Form to retrieve data on a seperate thread. I am using Delegates not Threads. First, I am not simply calling one Query and Oh, we're done. I kick off about 7 different delegates to load data from different sources. I am using "SyncLocks" or "lock" in C# with different Lock objects per data I am retrieving. One thing that is happening now is that users are CLOSING my form while data is still loading. Obviously, this causes numerous errors because the Callbacks do not have a UI thread to go back to. My question is, how can I cancel an Async operation or gracefully exit running one?

    .NET (Core and Framework) question csharp database design tutorial

  • Cannot add my Control to Form
    T Tim McCurdy

    I finally got it to work. After manually adding the Control to the Toolbox, and dropping it on my Form, the Project created a reference to the DLL but it did not show on the Form nor did it create variables in the Form for the Control. I think I eventually determined that there was an issue with the Resource file for the Control project so I fixed that and removed all references to the Control in the new Project. After dropping it on the Form this time, it worked.

    C# visual-studio winforms help question

  • Cannot add my Control to Form
    T Tim McCurdy

    I rarely ever have problems like this. I've been developing a control which I've finally finished. I want to add this control to another Form in another Project. Both of these Projects reside in the same solution. However, the IDE has failed to provide a control Icon in the "My User Controls" Tab and instead I've had to reference the DLL and add the Items manually to my Toolbox. Now for the kicker. When I drop my new Control onto the Form, it adds a reference to that Library, but no control displays nor does it throw an error, nor does the Form "look" Modified (Asterix next to the Form Title). Does anyone know of anything I can do to get this working? This seems to be happing a lot more and I've been developing controls for the past 2 years! :doh:

    C# visual-studio winforms help question

  • Implementing Interfaces...
    T Tim McCurdy

    You see, it's very simple. For someone who writes object models for a living, I've seen a lot that just don't make any sense (ex. Adobe, Maximizer, etc.). I hate when someone gives a method like "Remove" when I am working with a collection of Files (Remove what?). Instead, I like to rename the Method to "Delete" and implement the "Remove" method privately. The private method will simply call the Public method on the collection class. Don't get me wrong, I implement as much as the interface as I "can". There are some methods though that I DO like, however, the fact that you have to pass an object instead of my custom (strongly-typed) collection object (i.e. a custom File object for example). For example, if you Implement the IDictionary Interface, it uses this: IndexOf(object Key). What? Since the Keys SHOULD all be strings in my collection, why do I want to allow a programmer to pass a Guid, Int, or whatever else they can think of? If they want a guid, pass a Guid.ToString(). If you look at a lot of the pre-defined Collection classes Microsoft created, they also "hide" a lot of interface methods because they just don't make sense for the particular object, but you can still cast them to an Interface that they implement and use the Properties / Methods that way. Now, as to why I am implementing an IList? Well, It's nice to have a custom collection class that can be databound to a DataGrid or other controls.

    C# tutorial csharp database question

  • Implementing Interfaces...
    T Tim McCurdy

    Umm, no, VB does not let you change the visibility of objects from an interface. If you remember, Interfaces are SUPPOSED to be only methods WITHOUT accessors (i.e. Public, Private, etc.). So that means that any Class implementing that Interface can change the visibility to whatever they want, just as long as every method is Implemented. So, it's not a Hack, it is by design. However, I did find out how to do this in C# if anyone is interested. It's called Explicit Interface Member Implementation[^] :wtf: !!!

    C# tutorial csharp database question

  • Redim Arrays in C#
    T Tim McCurdy

    This is also something I found, not sure if it'll work but it looks good:

    // Reallocates an array with a new size, and copies the contents
    // of the old array to the new array.
    // Arguments:
    // oldArray the old array, to be reallocated.
    // newSize the new array size.
    // Returns A new array with the same contents.
    public static System.Array ResizeArray (System.Array oldArray, int newSize) {
    int oldSize = oldArray.Length;
    System.Type elementType = oldArray.GetType().GetElementType();
    System.Array newArray = System.Array.CreateInstance(elementType,newSize);
    int preserveLength = System.Math.Min(oldSize,newSize);
    if (preserveLength > 0)
    System.Array.Copy (oldArray,newArray,preserveLength);
    return newArray;
    }

    C# csharp data-structures question

  • Implementing Interfaces...
    T Tim McCurdy

    Ok, I know this might sound simple, but it's not. I want to Implement the IList interface but I want certain members of it hidden (for example IndexOf and the default public object this[int Index]) because I am creating a strongly-typed collection. In VB.NET I could easily do this because each method knew that it was Implemented by a simple: Private Function IndexOf(Value As Object) As Integer Implements IList.IndexOf. The Implementation was fine in VB like this because one could still cast the object to an IList type and access the methods on it even thought they were private within the Collection class. Does anyone know how to do this?

    C# tutorial csharp database question

  • Redim Arrays in C#
    T Tim McCurdy

    Here's a simple one:

    string[] Temp = new string[20];
    Array.Copy(MyItems, 0, Temp, 0, MyItems.Length);
    MyItems = new string[20] {};
    Array.Copy(Temp, 0, MyItems, 0, Temp.Length);
    Array.Clear(Temp, 0, Temp.Length);
    Temp = null;

    C# csharp data-structures question

  • Crystal Report Landscape Mode
    T Tim McCurdy

    If you're using it inside the .NET IDE, [right-click --> choose designer --> Printer setup --> change to landscape].

    Visual Basic design question

  • Monitor 3rd party app (hooking/subclassing)
    T Tim McCurdy

    Plain and simple, you can't without in-depth knkowledge of the 3rd party app. There are two ways: 1.) Use DDE 2.) Get the Window Handle and use some API like we did in VB6 to subclass that windows' WndProc event into your own window. I'll tell you now, since every window, including controls, have their own WndProc, you're not going to be able to write a "Global" handler for some app's events. Unless this 3rd party app is supplying an API (like Adobe or MS Word, Outlook for example), you can't do it.

    Visual Basic csharp algorithms question

  • Memory...
    T Tim McCurdy

    I don't know if this affects C#, but it was pointed out to me that a .NET application uses huge amounts of memory. I was wondering if anyone could shed some light on this or send me some links on Memory Management? For example, create a new VB.NET Windows Forms project. Do NOT add any code to the Form. Run the program and look in the task manager under your Program Name. You'll notice probably about 8,000 - 12,000 kb of memory being used. Now, Minimize the Form and the Memory drops to 600 - 650kb!!! :omg: Restore the Form and now it only uses 1500 - 2000 Kb of Memory! What in the world is going on!? :wtf: Has anyone else noticed this? I have a feeling it has something to do with GDI and Painting but I am not sure.

    Visual Basic csharp winforms graphics performance

  • How to Determine if element contains a given attribute
    T Tim McCurdy

    There is an easier way by using XPath Queries.

    ...asuming you have an XMLDocument Open
    Dim xNode As Xml.XmlNode = xDoc.SelectSingleNode("//Element[@Attribute='Value']")
    If (Not IsNothing(xNode)) Then
    'Do Something
    End If

    XML / XSL tutorial question

  • ComboBox
    T Tim McCurdy

    Ok, does anyone out there know why the ComboBox in .NET Highlights the Text in the Edit area when the Control is resized at Runtime (i.e. when it is Anchored Top, Left, and Right)? This is VERY annoying! Especially when the Control is disabled and it looks Highlighted!!! I'm tried Combo.Refresh and maybe other SubClassing techniques which don't work at all! ARGHHH!

    Visual Basic csharp question

  • dos commands
    T Tim McCurdy

    Shell or ShellExecute API Not all those who are lost are looking to be found. But of those who are lost and those who are found, all are looking for something higher than themselves.

    Visual Basic question

  • How to:Transfer Table to Text?
    T Tim McCurdy

    You can do this one of three ways. 1.) The best way is to use an ADO Recordset / ADO.NET DataSet and use the "Save" / "WriteXML" Methods. This is best because both the Recordset and DataSet can open an XML file. 2.) Use BCP to Bulk Export data from the Table to a Text File. This is essentially what the DTS does. 3.) There is also a way to Bulk export using an XML format but I can't remember the command. Not all those who are lost are looking to be found. But of those who are lost and those who are found, all are looking for something higher than themselves.

    Visual Basic database sql-server sysadmin help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups