Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Motor11

    Auto-scrolling text box

    I just had a breakthrough! The code to write to the textbox was being called from my form's load event. Problem was that the textbox wasn't visible yet. Simply had to add a "me.show" statement prior to writing to my textbox so that it was actually drawn first. Now the simple .SelStart method...
  2. Motor11

    Auto-scrolling text box

    Thanks for the responses. three57m's code works well. I'll have a closer look at it to see how to make use of it. Not sure why the simpler solution does not work. As for my code, it's pretty simple: Private Sub txtStationTerm_Change() With txtstationterm .SelStart = Len(.Text)...
  3. Motor11

    Auto-scrolling text box

    Hey all, I've written an app with a textbox that I hope to have scroll to the bottom as I add information to it (a terminal window that shows processing information). All the info I can find on this issue says to add text1.selstart=len(text1.text) and possibly text1.selLength=0 This does...
  4. Motor11

    Intersection of two 2D polygons

    Not exactly what you're looking for, but do a search for the comp.graphics.algorithms faq. This doc has lots of algorithms for computing things like this. Including some ideas for intersecting two polygons, calculating the intersection point of line segments and calculating centroids...
  5. Motor11

    set partial string to a var and deleted from main string

    The 'private' should be 'dim', right?
  6. Motor11

    OOP and VB

    Robert, Thanks, that makes sense. I'm starting to feel better about creating objects. I'm sure I'd have my current project wrapped up with a pretty bow on it if I did it my usual way, but this exercise is informative. I appreciate all the help from everyone. The resource of Tek-Tips is what...
  7. Motor11

    OOP and VB

    Based on the advice of TheVampire and Chiph, I'm going to forego the UDT and stick with creating a second class. What's the point of trying to go OOP if you only go half way, right? One additional question: I know that one of the big selling points of creating objects is encapsulation. My...
  8. Motor11

    Wanting real time graphs

    Here is a very simple example: Create a new project with a command button and a picturebox. Paste this code: Private Sub Command1_Click() x_small = -5 x_large = 5 y_small = -5 y_large = 5 Picture1.Scale (x_small, y_large)-(x_large, y_small) 'draw polynomial...
  9. Motor11

    Wanting real time graphs

    Unless you have reams of data, why not draw on a picturebox? I have successfully done this plenty of times to graph many data points. It is some work, but you can write code to zoom-in and zoom-out, pan, etc. The redraw is surprisingly fast on modern computers, especially if you are only...
  10. Motor11

    deletion of a duplicating substring

    Here's a function that should do what you want. Just pass your string to this function and it should remove the duplicates and pass it back. Private Function removedups(instring As String) As String Dim holder() As String 'just a temp array to hold each line of text Dim i As Long holder =...
  11. Motor11

    OOP and VB

    Gentlemen, Thanks for the advice. It looks like I'm going to have to get a better handle on the 'set' and 'new' keywords. Strongm's suggestion was exactly what the doctor ordered. Thank you very much. I looked up the friend keyword. The entry in MSDN under 'friend members' looks like...
  12. Motor11

    OOP and VB

    Hi Chiph, I accidentally posted this question twice (it is being discussed on two threads now). With some help, I have narrowed my problem somewhat. Right now I'm having trouble passing an object through a function. For example: Dim mypoint As New clsPoint2d mypoint = ascii2pt(UserString)...
  13. Motor11

    OOP and VB

    Thanks for the suggestions guys. We're getting closer, however I'm still not quite there. My function now looks like: Public Function ascii2pt(instring As String) As clsPoint2d Dim holder() As String 'temp variable to hold split string Dim i As Integer Set ascii2pt = New...
  14. Motor11

    OOP and VB

    Thanks for the suggestion. I made the change but still no success. The class now reads: Public Property Let X(inval As Double) m_X = inval End Property Public Property Get X() As Double X = m_X End Property
  15. Motor11

    OOP and VB

    I am still having no luck creating a function that returns (or is) a class object. I call the function here: Private Sub mnuAddpoint_Click() Dim message As String Dim title As String Dim UserString As String Dim mypoint As New clsPoint2d 'just get point from user with...
  16. Motor11

    OOP and VB

    Thanks for the tip. I will try it. Just for reference, functions can return UDT's. I do that all the time and never had a problem with it.
  17. Motor11

    File IO Into Array

    This function is longer than it has to be, but it is very fast and works with UNIX or DOS ascii files that are both small and large: To use it, define an array of strings called individ_lines() Global individ_lines() As String This string will be populated with the contents of the filename...
  18. Motor11

    How manage more than 16 serial ports with VB6 ?

    It looks like this might help. I think this is a hook into the API which is already done for this purpose: http://www.thescarms.com/vbasic/CommIO.asp
  19. Motor11

    OOP and VB

    Sorry that this turned into a long rant. Maybe someone will find it interesting enough to make it all the way through and comment. I've been programming VB for quite a while but have managed for the mostpart to avoid using classes. On my latest project I decided to bite the bullet and go...
  20. Motor11

    OOP and VB

    Sorry that this turned into a long rant. Maybe someone will find it interesting enough to make it all the way through and comment. I've been programming VB for quite a while but have managed for the mostpart to avoid using classes. On my latest project I decided to bite the bullet and go...

Part and Inventory Search

Back
Top