Search results for query: *

  1. V

    Grouping pieces of graphics?

    What I did was create an interface something like this: Public Interface IDrawingObject Event Change(ByVal DrawingObject As IDrawingObject) ''' <summary> ''' The location of the top-left point of the object ''' </summary> ''' <value></value> ''' <returns></returns>...
  2. V

    Getting string width

    Hi, I would like to get the width of a string. Given x & y coordinates I would like to draw a string centered at x, y. I would also like to create a rectangle that surrounds this string. The problem is that I would like to calculate the widths and coordinates of all of the shapes outside of...
  3. V

    VB.Net 2005: event handlers

    I asked this question in a thread before: Remove all Handlers associated with an Event
  4. V

    Clearing Table and Adding Rows to It

    Thanks. I finally got it to work. Didn't know databases had such a steep learning curve...
  5. V

    Trouble Implementing my Interface

    I purposely made the property have a type of GNode because I thought GNode implements Node. I thought the compiler would agree because TypeOf GNode Is Node. Thanks. If I have a class declared like this: Dim MyEdge as new GEdge() I would like MyEdge.StartNode to have a return type of GNode...
  6. V

    creating objects using the value in a variable

    I'm not sure whether I understand your question properly. You want to store a class called 'ActionClass' in the 0th index of the sport array? The problem is that once you declare sport to be an array of strings, you can only put strings in it. One work around would be to instead do something...
  7. V

    Trouble Implementing my Interface

    Hi all. I have a class like so: Public Class Graph Public Interface Node Property ID() As Integer Property Location() As Point End Interface Public Interface Edge Property ID() As Integer Property StartNode() As Node Property EndNode() As Node...
  8. V

    Clearing Table and Adding Rows to It

    Let us say that that I have a Table in an Access database that is called MyItems: +--------------+------------+------------+ | Name (String)| X (Number) | Y (Number) | +--------------+------------+------------+ And that I have a class called TheItem: Class TheItem Sub New(Name as String, X as...
  9. V

    Allowing Focus to a User Control

    Thanks! It works. :)
  10. V

    Allowing Focus to a User Control

    I have created a user control which displays some graphics that update in response to keyboard events. The problem is that I only want the user control to respond to keyboard events when it has focus. How do I make it focusable? I've looked at the CanFocus property, but that's ReadOnly. When I...
  11. V

    a big complicated program please help!!

    means something in that line is equal to Nothing. In other words, one of your variables probably wasn't properly set.
  12. V

    Remove all Handlers associated with an Event

    reasoning & another question My reasoning for wanting to remove all handlers is that I'm creating a graph drawing program (nodes & edges). When I change modes (say from dropping down nodes to creating edges), I want to do a little bit of cleanup and then remove all the paint event handlers...
  13. V

    Remove all Handlers associated with an Event

    Say I have public event myEvent() in a class called myClass. and somewhere in my program, I write AddHandler myClass.myEvent, AddressOf method1 AddHandler myClass.myEvent, AddressOf method2 AddHandler myClass.myEvent, AddressOf method3 Is there a way for myClass to remove all of the handlers...
  14. V

    Event Handled in Certain Order & Supressing Events

    Thanks! That example clarified things a lot.
  15. V

    Event Handled in Certain Order & Supressing Events

    I have two questions about events. (1) Suppose I have 3 methods, A(), B(), and C(), that handle an event. How can I make sure that they are handled in order (A, B, C)? If I call the AddHandler method on these methods in a certain order, will they respond to the event in the same order I...
  16. V

    Extract text from html

    Hi all. I would like to extract only the text from a html file. I want to effectively do the same thing as loading the html file in a web browser, selecting Edit >> Select All, selecting Edit >> Copy, and pasting the contents into Notepad. Thanks. :)
  17. V

    Code-Snippet-Like Functionality

    Answering my own question, I think there might be a way to do it. I found out a RichTextBox has a .RTF property is some kind of markup code. If I can figure out what RTF code corresponds to a certain coloring, I should be able to find text that is colored a specific color. This leads me to...
  18. V

    Code-Snippet-Like Functionality

    Thanks, is there a way to search for already colored text in a RichTextBox? For example, if the user presses the tab key, I want the program to search for any text that is colored, suppose green, and highlight that text. Thanks.
  19. V

    define consts

    Is an enumeration what you want? http://www.codereference.com/book/vbnet_Enumerations.aspx
  20. V

    typing too fast for KeyUp event???

    @cjard: I don't know why, but my KeyUp event was sometimes firing twice if I held any key down a bit longer. (Maybe my code was somehow causing this.) I wanted to put code in the KeyUp event so that I could process the text in the textbox after the most recently typed character showed up in the...
Back
Top