TechKid's Profile
Reputation: 3
Apprentice
- Group:
- Contributors
- Active Posts:
- 82 (0.08 per day)
- Joined:
- 04-September 10
- Profile Views:
- 2,079
- Last Active:
Apr 11 2013 04:15 PM- Currently:
- Offline
Previous Fields
- Country:
- US
- OS Preference:
- Mac
- Favorite Browser:
- Chrome
- Favorite Processor:
- Intel
- Favorite Gaming Platform:
- PC
- Your Car:
- Who Cares
- Dream Kudos:
- 25
Posts I've Made
-
In Topic: Get absolute location of an html element in webbrowser control
Posted 6 Dec 2012
lar3ry, on 06 December 2012 - 03:44 AM, said:
TechKid, on 05 December 2012 - 04:24 PM, said:Do 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.
-
In Topic: Get absolute location of an html element in webbrowser control
Posted 5 Dec 2012
Do you perhaps know of a better way to interact with a flash object, besides clicking at a point? -
In Topic: Get absolute location of an html element in webbrowser control
Posted 2 Dec 2012
lar3ry, on 02 December 2012 - 04:20 AM, said:Spoiler
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. -
In Topic: Get absolute location of an html element in webbrowser control
Posted 1 Dec 2012
lar3ry, on 26 November 2012 - 04:03 AM, said:Spoiler
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. -
In Topic: Cropping multiple parts of bitmap images?
Posted 25 Nov 2012
lucky3, on 22 November 2012 - 06:50 PM, said:Take a look at this example. I guess you know how to use for loops to adjust x and y of the cropping start point.
Edit: just to let you know that everything you need for cropping letters from the image, is on that link:
croppedLetters.png
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?
Edit:
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!
My Information
- Member Title:
- D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
-
- Location:
- In da basement
- Years Programming:
- 3
- Programming Languages:
- VB.NET, HTML, CSS
Contact Information
- E-mail:
- Click here to e-mail me
Friends
TechKid hasn't added any friends yet.
|
|



Find Topics
Find Posts
View Reputation Given
|
Comments
TechKid has no profile comments yet. Why not say hello?