Search:

Type: Posts; User: nicnicman

Page 1 of 7 1 2 3 4

Search: Search took 0.21 seconds.

  1. Replies
    2
    Views
    2,260

    Re: ShapeContainer Index

    Okay. So something like this:
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

    Dim circles() As OvalShape = {OvalShape1,...
  2. Replies
    2
    Views
    2,260

    ShapeContainer Index

    When a shape from PowerPacks is dragged onto the form a ShapeContainer is created and the shape is added to it. It also seems that each shape is automatically assigned an index in the...
  3. Re: Option Strict On Disallows Late Binding

    Pardon my ignorance, but I'm not sure how to do this.

    Dim circle As SimpleShape = Me.ShapeContainer1.Shapes(start)
    circle.BackColor = color
  4. Re: Option Strict On Disallows Late Binding

    Okay, I thought OvalShapes were a Control. It seems that they do have a BackColor property though.
  5. Re: Option Strict On Disallows Late Binding

    Although, I am still having problems when I want to change the property using a variable. Which is why I was trying to use the index. I also tried it like this:

    Me.Controls.OvalShape("circle" &...
  6. Re: Option Strict On Disallows Late Binding

    This works fine:

    circle0.BackColor = color

    circle0 is an OvalShape.
  7. Re: Option Strict On Disallows Late Binding

    This is for a Connect 4 game. I have a RectangleShape and 42 OvalShapes on a form drawn using PowerPacks. I need to light up the OvalShapes (either red or black) in sequence.
  8. Re: Option Strict On Disallows Late Binding

    I'm trying to color an OvalShape using its index in the shape container. When I added the OvalShapes in Design view I saw a property for BackColor, so that's why I used it. I tried to set the...
  9. Re: Option Strict On Disallows Late Binding

    When I turn Option Strict off or there is no error. Capitalizing didn't help. Thanks for trying.
  10. [RESOLVED] Option Strict On Disallows Late Binding

    For some reason VS is giving me a number of late binding errors: "Option Strict On Disallows Late Binding".

    Here is a sample of the code:

    If position(start) = status.empty Then
    ...
  11. Re: Looping Through an Array of OvalShapes

    I fixed my latest issue by using RectangleShapes instead of Panels.
  12. Re: Looping Through an Array of OvalShapes

    I guess that's why nothing was happening. Thanks for the info.
  13. Re: Looping Through an Array of OvalShapes

    I've tried using a timer but I'm getting some side effects:

    In the Connect 4 game I'm using 7 vertical Panels with 7 mouseEnter and 7 mouseClick events so that when the mouse enters any portion of...
  14. Re: Looping Through an Array of OvalShapes

    Nice! It worked.


    Me.ShapeContainer1.Shapes(x).invalidate()
    Update()
  15. Re: Looping Through an Array of OvalShapes

    I think I spoke too soon. When I run the following code for some reason it doesn't sleep once during each loop it seems to add them all up and do one long sleep before it changes the properties of...
  16. Re: Looping Through an Array of OvalShapes

    Just got this working, too. I think I'm all set now.

    For x As Integer = 0 To 6
    Me.ShapeContainer1.Shapes(x).BackColor = Color.Red
    Next
  17. Re: Looping Through an Array of OvalShapes

    Well I got this code to work:

    For Each circle As OvalShape In Me.ShapeContainer1.Shapes
    circle.BackColor = color.red
    Next

    It's not really what I was looking for but I...
  18. Re: Looping Through an Array of OvalShapes

    This code throws the same exception:

    Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
    For x As Integer = 1 To 7
    ...
  19. Re: Looping Through an Array of OvalShapes

    For some reasons VS says x is Nothing, but I'm not sure why.
  20. Re: Looping Through an Array of OvalShapes

    Okay, the reason I was seeing the OvalShape object in IntelliSense is because I didn't Import PowerPacks.


    Imports Microsoft.VisualBasic.PowerPacks

    However, I'm still getting an exception with...
  21. [RESOLVED] Looping Through an Array of OvalShapes

    I'm working on a Connect 4 game. I created a rectangle with 42 holes punched out of it (drawn in Panels Paint event) and I have 42 circles (created with PowerPacks) placed in each punch out. Right...
  22. Replies
    16
    Views
    1,973

    Re: Punch Holes out of a Rectangle

    I see some clipping around the circle. I think this is what jm was referring to. No big deal though.
  23. Replies
    16
    Views
    1,973

    Re: Punch Holes out of a Rectangle

    Yup, you're method got rid of the trailing. Thanks.
  24. Replies
    16
    Views
    1,973

    Re: Punch Holes out of a Rectangle

    Oh okay. I'll try it.
  25. Replies
    16
    Views
    1,973

    Re: Punch Holes out of a Rectangle

    I think the I need to enlarge the rectangle that I am invalidating. That may get rid of the trail. I remember reading something about it in one of jmcilhinney's posts.
  26. Replies
    16
    Views
    1,973

    Re: Punch Holes out of a Rectangle

    That works great, BB, but there is a lot of flickering.

    With Invalidate and Update I get less flickering but also a trail behind the circle.


    Me.Invalidate(CircleRect)
    Update()
    ...
  27. Replies
    16
    Views
    1,973

    Re: Punch Holes out of a Rectangle

    I guess just changing the color of the circles in sequence will be enough to give the illusion of pieces falling.
  28. Replies
    16
    Views
    1,973

    Re: Punch Holes out of a Rectangle

    Oh, that makes things much more difficult than I expected. Hmm. . . how can I get the effect of falling tiles for my Connect 4 Game?
  29. Replies
    16
    Views
    1,973

    Re: Punch Holes out of a Rectangle

    Well, for simplicity the circles were drawn in design view using Visual Basic Power Packs.
  30. Replies
    16
    Views
    1,973

    Re: Punch Holes out of a Rectangle

    Thanks a lot BB! This works wonderfully.

    Is it possible to make the shape created the top most object on the screen? This is for a Connect 4 game: I have a rectangle with 49 holes in it and...
  31. Replies
    16
    Views
    1,973

    Re: Punch Holes out of a Rectangle

    Okay, I'll take a look.

    Thanks.
  32. Replies
    16
    Views
    1,973

    [RESOLVED] Punch Holes out of a Rectangle

    If I drew a rectangle using e.Graphics.FillRectangle() is there a way I could punch transparent holes in it?

    Thanks for any feedback.
  33. Replies
    1
    Views
    1,277

    Re: Spelling Bee Project

    Maybe this isn't such a good idea for a project.
  34. Re: is there an easy way to limit a textbox to numbers and "-" (no maskedtextbox wan

    I didn't realize this. It might be better to check out kevin's link.
  35. Re: is there an easy way to limit a textbox to numbers and "-" (no maskedtextbox wan

    This should work:

    Public Class Form1

    Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
    If...
  36. Replies
    1
    Views
    1,277

    Spelling Bee Project

    For a class project I am thinking of doing a Spelling Bee game.

    I would like to have a button that will place the word in a sentence, and a button that will give the definition. Are there .txt...
  37. Replies
    4
    Views
    726

    Re: Split method

    Thanks, dbasnett.
  38. Re: [RESOLVED] Setting Text of Label added at Runtime

    I did think of doing that...after the project was all done :) I might still edit it though. Thanks for the suggestion.
  39. Replies
    7
    Views
    795

    Re: IndexOf

    Thanks, jmcilhinney, this is what I went with.
  40. Replies
    7
    Views
    795

    Re: IndexOf

    I'm thinking it'd be easier to just loop through each letter with a For, Next loop.
Results 1 to 40 of 266
Page 1 of 7 1 2 3 4



Click Here to Expand Forum to Full Width