Search results for query: *

  • Users: olsonpm
  • Content: Threads
  • Order by date
  1. O

    Simple property/field question

    So I'm just trying to understand why someone would want to use the shorthand property instantiation Public Property CarModel As String <-- property as opposed to Public CarModel As String <-- variable
  2. O

    Single code base, multiple service clients

    So I need to make this service for a company, and it will need to be deployed on multiple servers. The service is really simple, but I'm wondering what the best way to handle updates/fixes would be. I'm thinking a patching system will be the only way to go, but I am not sure, and I wouldn't...
  3. O

    Design question

    So the web application I'm working with is basically just displaying status/statistical information from a database. I was given the task of cleaning it up since the code was beyond messy. One thing I did to clean it up was to get rid of all the ad hoc table index calls to access data - I did...
  4. O

    Question SqlDataSource question

    So I'm refactoring code for an asp.net web app. I'm new to asp.net, and was surprised to learn about the data-binding within controls. It seems nice and simple, however it also seems to be mingling data code with logic (within this implementation). My question is how to use data-binding while...
  5. O

    Shared function in an interface

    My base problem is that I would like to have an interface define a shared function, although through vb (the CLR from what i've read) does not allow for it. After reading, I don't think there is a single solution to this problem, so let me give you some context. I am trying to implement MVC...
  6. O

    ListBox Trouble

    So I finally am done fixing my ListBox control to run smoothly, but it took a long time to do that. My question is whether or not there's an easier way to accomplish this. From all the google searching I've done the past couple days, it seems there is none. Here's my train of work. I started...
  7. O

    listbox horizontal scroll event

    So I have a custom listbox that is displaying garbage text when scrolling horizontally. I need the custom listbox to stop an annoying flicker, but it's causing issues with the scroll. I think I could solve the issue if only I could access the hscroll event, but I don't know how to do that. I...
  8. O

    Question ListBox Selectionmode = none question

    My question is why this mode doesn't seem to be working for me. I've been reading msdn and googling for around an hour and a half. I have a listbox with 'DrawMode' set to 'OwnerDrawFixed', and 'SelectionMode' set to 'none'. In my lbLogList_DrawItem method, I can go as far as to comment out...
  9. O

    Constructor versus shared method

    What is the purpose of using shared methods that return an instance of a class, as opposed to a constructor? ie: in VB.net, the system.drawing.color class has shared method "FromArgb(int, int, int) as color". This is different from java's implementation which simply is a constructor that...
  10. O

    General Design Question

    I was wondering what the correct solution would be to this simple problem. I am receiving requests, all of base class 'clsRequest'. Each request is simply a data holder of sorts, with zero logic. However, each class needs to be handled differently. In order to keep the separation of data and...
  11. O

    General programming question - circular referencing

    So i've ran into this situation before, but never really worried about it. Basically I'm working on creating my own sudoku solver to learn vb.net. I decided to have an element class which represents a single square in the puzzle. That element then has references to three lists which can be...
  12. O

    Best practice using XmlReader?

    What I am looking for is for someone to let me know whether I went about it the correct way or not, since my confidence is on the fence for this one. Currently I have some classes that need to be de/serialized, and due to possible versioning issues, I decided to use IXmlSerializable. Here's...
  13. O

    using IXmlSerializable to create XmlDocument

    I'm stumped and have been working on this for the past 4 hours. It seems simple but here are my issues. I start with a class 'Car' which implements IXmlSerializable. Then I try using a method 'getXML()' to return an XmlDocument. Now with this, i can write it to a file no problem using the...
  14. O

    Question on traversing through a list

    I was wondering if there was a simple way to traverse through a list, while only grabbing the specified class. here's what I'm doing now for each element as clsElement in lstElements if(typeof element is clsElementChild1) 'do something end if next what I'd like to do is...
  15. O

    creating a sub main in a windows forms project

    What is the vb.net equivalent to accomplishing this? static void Main() { frmCalcView view = new frmCalcView(); CalculatorModel model = new CalculatorModel(); CalcController controller = new CalcController(model, view); view.addController(controller)...
  16. O

    IIf behavior question

    IIf statement - I don't understand the behavior in this context. Private Function returnsInt() As Integer IIf(False, returnsInt = 2, returnsInt = 4) End Function public sub main() MsgBox(returnsInt()) end sub Why would returnsInt return a 0 every time? I was thinking it should...
  17. O

    Converting String to Class Type

    So after reading plenty on the CreateInstance method, and the Type.getTypeFromProgID method, I thought I had it figured out. However I keep getting a null reference returned when trying to recieve the type. I simply have a Class1, inside a Project1 (with the default namespace of "Project1")...
  18. O

    Question Auto generating interface methods

    I have used netbeans for some time now, and was assuming that visual studio would have some sort of feature to auto-fill the methods which my class is supposed to implement. I searched a bit through the forum/google, but could only find this link. Auto insertion of interface members in Visual...
Back
Top