Click here to Skip to main content
15,924,193 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: drawing function (PaintEventArgs) Pin
charchabil0318-Dec-06 4:16
charchabil0318-Dec-06 4:16 
GeneralRe: drawing function (PaintEventArgs) Pin
charchabil0318-Dec-06 9:41
charchabil0318-Dec-06 9:41 
GeneralRe: drawing function (PaintEventArgs) Pin
Are Jay18-Dec-06 14:44
Are Jay18-Dec-06 14:44 
GeneralRe: drawing function (PaintEventArgs) Pin
Are Jay18-Dec-06 20:32
Are Jay18-Dec-06 20:32 
GeneralRe: drawing function (PaintEventArgs) Pin
charchabil0319-Dec-06 11:16
charchabil0319-Dec-06 11:16 
GeneralRe: drawing function (PaintEventArgs) Pin
Are Jay19-Dec-06 12:33
Are Jay19-Dec-06 12:33 
GeneralRe: drawing function (PaintEventArgs) [modified] Pin
charchabil0320-Dec-06 10:02
charchabil0320-Dec-06 10:02 
GeneralRe: drawing function (PaintEventArgs) Pin
charchabil0323-Dec-06 1:40
charchabil0323-Dec-06 1:40 
Hello,
Having a map
I want to know if the user has clicked outside or inside the borders of the map
Note that: the image containing the map is chosen as background of the form
So I thought of something
I have drawn the map with the following
RGB =255,255,255 outside the borders
RGB=254,254,254 inside the border

please take a look at this
Dim img1 As Bitmap<br />
Private Sub frmmap1_Load()<br />
img1 = New Bitmap("images\map.jpg", True)<br />
End Sub<br />
Private Sub frmmap1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseClick<br />
            If (img1.GetPixel(e.Location.X, e.Location.Y).R = 255 Then<br />
            MsgBox("out")<br />
<br />
        Else<br />
            MsgBox("in")<br />
End if<br />
End sub


But I m facing problems with that (because the size of img1 is not the same as background of the form

Can I do the same test directly on the background of the form without loading img1-or can i set the image size as the size of the background of the form?
Or is there any other way of thinkin

Happy Holidays

Regards
Ramy

GeneralRe: drawing function (PaintEventArgs) Pin
charchabil0323-Dec-06 6:16
charchabil0323-Dec-06 6:16 
GeneralRe: drawing function (PaintEventArgs) Pin
Are Jay27-Dec-06 4:21
Are Jay27-Dec-06 4:21 
GeneralRe: drawing function (PaintEventArgs) Pin
charchabil0330-Dec-06 3:36
charchabil0330-Dec-06 3:36 
GeneralRe: drawing function (PaintEventArgs) Pin
Are Jay30-Dec-06 9:05
Are Jay30-Dec-06 9:05 
GeneralRe: drawing function (PaintEventArgs) Pin
charchabil0315-Jan-07 2:14
charchabil0315-Jan-07 2:14 
GeneralRe: drawing function (PaintEventArgs) Pin
charchabil0323-Jan-07 4:21
charchabil0323-Jan-07 4:21 
GeneralRe: drawing function (PaintEventArgs) Pin
Are Jay23-Jan-07 10:48
Are Jay23-Jan-07 10:48 
QuestionSearching Subdirectories within subdirectories Pin
portreathbeach15-Dec-06 8:02
portreathbeach15-Dec-06 8:02 
AnswerRe: Searching Subdirectories within subdirectories Pin
dhbaer15-Dec-06 8:17
dhbaer15-Dec-06 8:17 
AnswerRe: Searching Subdirectories within subdirectories Pin
MatrixCoder15-Dec-06 8:18
MatrixCoder15-Dec-06 8:18 
GeneralRe: Searching Subdirectories within subdirectories Pin
portreathbeach15-Dec-06 13:37
portreathbeach15-Dec-06 13:37 
Questionconverting crystal report to html format using VB.NET Pin
7prince15-Dec-06 7:44
7prince15-Dec-06 7:44 
QuestionDynamic load of DLL Pin
APerkins15-Dec-06 5:13
APerkins15-Dec-06 5:13 
Questiondoubt in parsing date Pin
ammuprabha15-Dec-06 4:58
ammuprabha15-Dec-06 4:58 
AnswerRe: doubt in parsing date Pin
APerkins15-Dec-06 5:21
APerkins15-Dec-06 5:21 
GeneralRe: doubt in parsing date Pin
Guffa15-Dec-06 7:35
Guffa15-Dec-06 7:35 
Questionproblem open exe with asp and vb Pin
Luis Corrales15-Dec-06 4:04
Luis Corrales15-Dec-06 4:04 

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.