Reputation: 3 Apprentice
- Active Posts:
- 82 (0.06 per day)
- 04-September 10
- Profile Views:
- Last Active:
- Apr 11 2013 04:15 PM
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Favorite Gaming Platform:
- Your Car:
- Who Cares
- Dream Kudos:
Posts I've Made
Posted 6 Dec 2012Do you perhaps know of a better way to interact with a flash object, besides clicking at a point?
No, I don't. From a Google search, it would appear that there are things you can put into a .swf file that allows it to be interacted with from VB.Net, though it almost sounds like it does so only for local copies of the files.
You might have to go back to refining your mouse positioning and sending a Click with SendKeys or the like.
Alright, thank you very much.
Posted 5 Dec 2012Do you perhaps know of a better way to interact with a flash object, besides clicking at a point?
Posted 2 Dec 2012Spoiler
I actually figured out a better alternative for what i needed to do:
WebBrowser1.document.GetElementById("idObject").ScrollIntoView(true) 'true to allign with top of webbrowser, filling out the webbrowser control 'from here, just getting the webbrowser's location pointed to the screen will do the job. 'i dont have the code in front of me and i can't quite remember the syntax.
As a matter of fact, I am trying to interact with the control, but the control is a flash object.
Posted 1 Dec 2012Spoiler
I appreciate the response, and greatly apologize for a delayed reply on my part.
After having forgot about this topic, later testing it, and now coming back to this thread i've realized that i does work in some scenarios; those being when the WebBrowser control is fully docked, and the window maximized, and even then the scroll will be off.
I'm looking for a way to get the absolute position of an html control when the webbrowser control isn't fully docked and the window not necessarily being maximized.
Posted 25 Nov 2012
I still can't get this to work.. some how the letters are getting cropped in a completely random order and i'm having trouble figuring out how to offset.
Here's the current code:
Private Sub captureBoard() Dim tPoint As Point b = PictureBox1.Image For i As Integer = 0 To 3 ' down, y For ii As Integer = 0 To 3 ' -> |||| x tPoint = New Point(boardCoord.X + (50 * ii), boardCoord.Y + (50 * i)) grid(ii, i) = tPoint Next Next For x As Integer = 1 To 4 For y As Integer = 1 To 4 gRec(x, y) = New Rectangle(grid(x, y), New Size(50, 50)) letters.Add(CropLetter(b, gRec(x, y).X, gRec(x, y).Y, gRec(x, y).Size.Width, gRec(x, y).Size.Height)) Next Next End Sub
I really hate to ask people to give up their code, but you're teasing me with it! Could you at least give me an idea of how you got this done so clean and easy?
Never mind I got it, after attempting this manually.
This is the final code:
Private Sub captureBoard() 'Dim tPoint As Point b = PictureBox1.Image grid(1, 1) = New Point(boardCoord.X, boardCoord.Y) gRec(1, 1) = New Rectangle(grid(1, 1), New Size(51, 51)) grid(1, 2) = New Point(grid(1, 1).X + 52, grid(1, 1).Y) gRec(1, 2) = New Rectangle(grid(1, 2), New Size(51, 51)) grid(1, 3) = New Point(grid(1, 2).X + 52, grid(1, 2).Y) gRec(1, 3) = New Rectangle(grid(1, 3), New Size(51, 51)) grid(1, 4) = New Point(grid(1, 3).X + 52, grid(1, 3).Y) gRec(1, 4) = New Rectangle(grid(1, 4), New Size(51, 51)) For row As Integer = 2 To 4 For col As Integer = 1 To 4 grid(row, col) = New Point(grid(1, col).X, grid(1, col).Y + (52 * (row - 1))) gRec(row, col) = New Rectangle(grid(row, col), New Size(51, 51)) Next Next CropLetter(letters, grid, gRec, b, 4, 4) End Sub Private Sub CropLetter(ByRef ltrArray As ArrayList, ByRef grid As Point(,), ByRef gRec As Rectangle(,), ByVal board As Bitmap, ByVal maxrow As Integer, ByVal maxcol As Integer) Dim rect As Rectangle For row As Integer = 1 To maxrow Step 1 For col As Integer = 1 To maxcol Step 1 rect = New Rectangle(grid(row, col).X, grid(row, col).Y, gRec(row, col).Width, gRec(row, col).Height) ltrArray.Add(board.Clone(rect, board.PixelFormat)) Next Next End Sub
If you don't mind, could you still show off how you accomplished this? Never the less, thanks for all the help!
- Member Title:
- D.I.C Head
- Age Unknown
- Birthday Unknown
- In da basement
- Years Programming:
- Programming Languages:
- VB.NET, HTML, CSS
- Click here to e-mail me
TechKid hasn't added any friends yet.