Click here to Skip to main content
15,916,846 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Datagrid databinding problem Pin
raul.net9-Aug-06 1:29
raul.net9-Aug-06 1:29 
QuestionAccessing the cache from a Classlibrary Pin
_Zorro_7-Aug-06 7:30
professional_Zorro_7-Aug-06 7:30 
QuestionCross Thread Call Error Pin
BorgPidgeon7-Aug-06 5:43
BorgPidgeon7-Aug-06 5:43 
AnswerRe: Cross Thread Call Error Pin
Steve Pullan7-Aug-06 15:26
Steve Pullan7-Aug-06 15:26 
QuestionCustomise Report Viewer in Reporting Service 2005 Pin
kcsekhar7-Aug-06 5:25
kcsekhar7-Aug-06 5:25 
QuestionA series of points(coordinates)which form a shape [modified] Pin
szevy_suez7-Aug-06 2:54
szevy_suez7-Aug-06 2:54 
AnswerRe: A series of points(coordinates)which form a shape Pin
Dave Kreskowiak7-Aug-06 14:33
mveDave Kreskowiak7-Aug-06 14:33 
GeneralRe: A series of points(coordinates)which form a shape Pin
szevy_suez8-Aug-06 6:21
szevy_suez8-Aug-06 6:21 
Yup...that's what I want to do. I need the series of x and y coordinates to drive something like an x-y plotter.

What I'm doing now is to get the color of image's pixel(1,1) and use the maketransparent method for this color so that the background will be transparent. I assumed that this will result in the onli pixels which are not transparent are the outline of the shape since I had applied canny edge detection to the image. Then, I will check each pixel, if pixel(x,y) is NOT transparent(which is supposed to be the shape) then the x and y values will be stored. But somehow, even pixel(1,1) is not transparent when I test the code. Did I made mistake somewhere?
This is my code :
Dim x As Integer
Dim y As Integer
Dim pic as Bitmap=Image.FromFile("C:\Program Files\Inkscape\staredge.bmp")
Dim xmax As Integer=pic.Width-1
Dim ymax As Integer=pic.Height-1
try
pic.MakeTransparent(pic.GetPixel(1, 1))
Catch
MsgBox("failed")
end try
Do While x <= xmax
y = 0
Do While y <= ymax
Dim c As System.Drawing.Color = pic.GetPixel(x, y)
If c = System.Drawing.Color.Transparent Then
wait2send("Untitled - Notepad", "none{ENTER}", 0)
Else
wait2send("Untitled - Notepad", "yes{ENTER}",0)
End If
y += 1
Loop
x += 1
Loop

I used the try and catch method to test whether the maketransparent method worked. The MsgBox("failed") did not appear, so it should worked. But I couldn't figure out what is the problem. Can you please advise?
GeneralRe: A series of points(coordinates)which form a shape Pin
Dave Kreskowiak8-Aug-06 14:14
mveDave Kreskowiak8-Aug-06 14:14 
QuestionRe: A series of points(coordinates)which form a shape Pin
szevy_suez9-Aug-06 4:23
szevy_suez9-Aug-06 4:23 
AnswerRe: A series of points(coordinates)which form a shape Pin
Dave Kreskowiak9-Aug-06 16:09
mveDave Kreskowiak9-Aug-06 16:09 
QuestionRe: A series of points(coordinates)which form a shape Pin
szevy_suez9-Aug-06 22:17
szevy_suez9-Aug-06 22:17 
AnswerRe: A series of points(coordinates)which form a shape Pin
Dave Kreskowiak10-Aug-06 2:26
mveDave Kreskowiak10-Aug-06 2:26 
QuestionAccessing Window Service from Other Machine ? Pin
Rizwan Bashir7-Aug-06 2:01
Rizwan Bashir7-Aug-06 2:01 
AnswerRe: Accessing Window Service from Other Machine ? Pin
Craster7-Aug-06 3:02
Craster7-Aug-06 3:02 
Questionlistview item add problem [modified] Pin
skhurams7-Aug-06 1:57
skhurams7-Aug-06 1:57 
AnswerRe: listview item add problem Pin
Rizwan Bashir7-Aug-06 2:04
Rizwan Bashir7-Aug-06 2:04 
AnswerRe: listview item add problem Pin
Dave Sexton7-Aug-06 2:04
Dave Sexton7-Aug-06 2:04 
AnswerRe: listview item add problem Pin
Dave Kreskowiak7-Aug-06 3:09
mveDave Kreskowiak7-Aug-06 3:09 
GeneralRe: listview item add problem Pin
Dave Sexton7-Aug-06 20:43
Dave Sexton7-Aug-06 20:43 
QuestionHow do I disable the Overrides (OnClosed) Pin
directred7-Aug-06 1:07
directred7-Aug-06 1:07 
AnswerRe: How do I disable the Overrides (OnClosed) Pin
Rizwan Bashir7-Aug-06 2:05
Rizwan Bashir7-Aug-06 2:05 
AnswerRe: How do I disable the Overrides (OnClosed) Pin
Dave Sexton7-Aug-06 2:12
Dave Sexton7-Aug-06 2:12 
AnswerRe: How do I disable the Overrides (OnClosed) Pin
Thomas Stockwell7-Aug-06 11:47
professionalThomas Stockwell7-Aug-06 11:47 
QuestionOnPaint Pin
microuser_20007-Aug-06 0:12
microuser_20007-Aug-06 0:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.