Click here to Skip to main content
15,898,373 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Function Calling 2 Different Stored Procedures Pin
Eddy Vluggen22-Nov-13 7:09
professionalEddy Vluggen22-Nov-13 7:09 
GeneralRe: Function Calling 2 Different Stored Procedures Pin
Richard MacCutchan22-Nov-13 7:33
mveRichard MacCutchan22-Nov-13 7:33 
AnswerRe: Function Calling 2 Different Stored Procedures Pin
Eddy Vluggen22-Nov-13 7:07
professionalEddy Vluggen22-Nov-13 7:07 
GeneralRe: Function Calling 2 Different Stored Procedures Pin
Commish1322-Nov-13 8:22
professionalCommish1322-Nov-13 8:22 
GeneralRe: Function Calling 2 Different Stored Procedures Pin
Eddy Vluggen26-Nov-13 11:28
professionalEddy Vluggen26-Nov-13 11:28 
Questionhow to display the size of the camera sensor in vb.net Pin
fitriadinurdin21-Nov-13 19:33
fitriadinurdin21-Nov-13 19:33 
QuestionRe: how to display the size of the camera sensor in vb.net Pin
Eddy Vluggen22-Nov-13 7:11
professionalEddy Vluggen22-Nov-13 7:11 
QuestionOverlapping with a Picturebox other controls having the picturebox transparent background VB .NET (update) Pin
jose mandurrino18-Nov-13 23:35
jose mandurrino18-Nov-13 23:35 
I'm having this problem, in my Windows Form App. (WFA) when the user ask an action clicking on a button, if the related field is empty an arrow should guide the user to add some value.

The problem is the following, I programmatically add this arrow img (.png) into a picturebox indicating the user where to add the missing data but the image overlaps the other controls covering lines and borders. I would like to add this image (may be still using picturebox or other) with transparent background in the way that only the arrow is shown and the remaining rectangle is transparent. I've tried with opacity property but I really don't know if it was right well coded.

I'm using just a sub to create a picturebox and place in it the arrow (or whatever) image. here the code:

VB
Public Sub proPaintArrow()
    Dim mypic As PictureBox = New PictureBox
    Dim HasAlpha As Boolean

    mypic.Image = Image.FromFile("C:\APP\backward.png")

    mypic.BackgroundImage = Nothing

    mypic.Height = 30
    mypic.Width = 30
    mypic.Left = txtDSFID.Location.X + 200
    mypic.Top = txtDSFID.Location.Y + 10
    mypic.Visible = True
    mypic.BorderStyle = BorderStyle.None
    mypic.SizeMode = PictureBoxSizeMode.StretchImage

    mypic.BackColor = Color.FromArgb(0, 0, 0, 0)

    Using I = System.Drawing.Image.FromFile("C:\APP\backward.png")
        HasAlpha = (I.Flags And System.Drawing.Imaging.ImageFlags.HasAlpha) = System.Drawing.Imaging.ImageFlags.HasAlpha
    End Using

    mypic.Parent = Me

    mypic.BringToFront()

    mypic.Show()

End Sub


The call is made here:

VB
If viTypeUpdate = 0 Then
     MsgBox("Scelta non completamente effetauta" + vbNewLine + "Scegliere se 'Lock' o 'Write'", MsgBoxStyle.Exclamation, "Update TAG")
     proPaintArrow()

     Exit Sub
 End If


The function to manage opacity is the following, but it didn't work at all.


VB
Public Function SetImgOpacity(ByVal imgPic As Image, ByVal imgOpac As Single) As Image
    Dim bmpPic As New Bitmap(imgPic.Width, imgPic.Height)
    Dim gfxPic As Graphics = Graphics.FromImage(bmpPic)
    Dim cmxPic As New ColorMatrix()
    Dim iaPic As New ImageAttributes()

    cmxPic.Matrix33 = imgOpac
    iaPic.SetColorMatrix(cmxPic, ColorMatrixFlag.[Default], ColorAdjustType.Bitmap)
    gfxPic.DrawImage(imgPic, New Rectangle(100, 300, bmpPic.Width, bmpPic.Height), 0, 0, imgPic.Width, imgPic.Height, GraphicsUnit.Pixel, iaPic)
    gfxPic.Dispose()
    iaPic.Dispose()

    Return bmpPic

End Function









Thank you
QuestionRe: Overlapping with a Picturebox other controls having the picturebox transparent background VB .NET Pin
Richard MacCutchan19-Nov-13 4:37
mveRichard MacCutchan19-Nov-13 4:37 
AnswerRe: Overlapping with a Picturebox other controls having the picturebox transparent background VB .NET Pin
jose mandurrino19-Nov-13 5:39
jose mandurrino19-Nov-13 5:39 
AnswerRe: Overlapping with a Picturebox other controls having the picturebox transparent background VB .NET (update) Pin
Eddy Vluggen19-Nov-13 10:39
professionalEddy Vluggen19-Nov-13 10:39 
GeneralRe: Overlapping with a Picturebox other controls having the picturebox transparent background VB .NET (update) Pin
jose mandurrino19-Nov-13 13:05
jose mandurrino19-Nov-13 13:05 
GeneralRe: Overlapping with a Picturebox other controls having the picturebox transparent background VB .NET (update) Pin
Eddy Vluggen20-Nov-13 7:44
professionalEddy Vluggen20-Nov-13 7:44 
AnswerRe: Overlapping with a Picturebox other controls having the picturebox transparent background VB .NET (update) Pin
TnTinMn19-Nov-13 13:06
TnTinMn19-Nov-13 13:06 
GeneralRe: Overlapping with a Picturebox other controls having the picturebox transparent background VB .NET (update) Pin
jose mandurrino19-Nov-13 21:50
jose mandurrino19-Nov-13 21:50 
GeneralRe: Overlapping with a Picturebox other controls having the picturebox transparent background VB .NET (update) Pin
TnTinMn21-Nov-13 13:38
TnTinMn21-Nov-13 13:38 
GeneralRe: Overlapping with a Picturebox other controls having the picturebox transparent background VB .NET (update) Pin
jose mandurrino24-Nov-13 8:52
jose mandurrino24-Nov-13 8:52 
Questionzoom a big image with VB Pin
99117651518-Nov-13 22:09
99117651518-Nov-13 22:09 
AnswerRe: zoom a big image with VB Pin
Eddy Vluggen19-Nov-13 10:37
professionalEddy Vluggen19-Nov-13 10:37 
QuestionRe: zoom a big image with VB Pin
99117651519-Nov-13 14:32
99117651519-Nov-13 14:32 
AnswerRe: zoom a big image with VB Pin
Eddy Vluggen20-Nov-13 7:53
professionalEddy Vluggen20-Nov-13 7:53 
AnswerRe: zoom a big image with VB Pin
Bernhard Hiller19-Nov-13 22:12
Bernhard Hiller19-Nov-13 22:12 
QuestionSystem.Null Pin
Member 1040919918-Nov-13 4:21
Member 1040919918-Nov-13 4:21 
AnswerRe: System.Null Pin
Richard Deeming18-Nov-13 4:44
mveRichard Deeming18-Nov-13 4:44 
QuestionHow can i avoid my vbscript running in temp folder when converted to exe using iexpress wizard Pin
superselector14-Nov-13 21:12
superselector14-Nov-13 21: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.