Click here to Skip to main content
15,895,142 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: How do I get the current module? Pin
Bernhard Hiller15-Aug-12 23:05
Bernhard Hiller15-Aug-12 23:05 
QuestionSending SMS through ASP.NET Pin
komalridda14-Aug-12 19:58
komalridda14-Aug-12 19:58 
AnswerRe: Sending SMS through ASP.NET Pin
Richard MacCutchan14-Aug-12 20:46
mveRichard MacCutchan14-Aug-12 20:46 
AnswerCross Post Pin
DaveyM6914-Aug-12 23:24
professionalDaveyM6914-Aug-12 23:24 
QuestionC# ASP.net Pin
Sibonelo Mbatha13-Aug-12 22:26
Sibonelo Mbatha13-Aug-12 22:26 
AnswerRe: C# ASP.net Pin
Pete O'Hanlon13-Aug-12 22:32
mvePete O'Hanlon13-Aug-12 22:32 
AnswerRe: C# ASP.net Pin
Eddy Vluggen13-Aug-12 23:02
professionalEddy Vluggen13-Aug-12 23:02 
QuestionSignature PictureBox Error !!! Pin
jitforce258513-Aug-12 5:00
jitforce258513-Aug-12 5:00 
Hello Friends i have a situation i created a signature pad with the mouse drawing when i save the image once lets say just sign and save it does save the image but if i have to re-sign lets say signature is wrong when it clears and sign again it only saves a "black box" it doesn't save the actual new signature

well i will leave the code of what i have now

Imports System.IO
Imports System.Runtime.InteropServices
Imports System.Text
Imports System.Net
Imports System.Globalization
Imports System.Threading

Public Class Form1

    Private mousePath As New System.Drawing.Drawing2D.GraphicsPath()

    Dim down As Boolean = False

    Private Sub signature_MouseDown(ByVal sender As System.Object, ByVal e As MouseEventArgs) Handles signature.MouseDown
        If e.Button = MouseButtons.Left Then
            mousePath.StartFigure()
        End If

        If e.Button = MouseButtons.Right Then
            mousePath.Reset()
        End If
    End Sub
    Dim gfx As Graphics
    Private Sub signature_MouseMove(ByVal sender As System.Object, ByVal e As MouseEventArgs) Handles signature.MouseMove
        If e.Button = MouseButtons.Left Then

            Try
                mousePath.AddLine(e.X, e.Y, e.X, e.Y)
                Dim CurrentPen = New Pen(Color.Black, 2)

                gfx.DrawPath(CurrentPen, mousePath)
            Catch ex As Exception
                MsgBox("Signature Error")

            End Try

            If e.Button = MouseButtons.Right Then

                Try
                    mousePath.Reset()

                Catch ex As Exception
                    MsgBox("not deleting")
                End Try
            End If


        End If
        signature.Invalidate()

    End Sub

    Private Sub signature_MouseUp(ByVal sender As Object, ByVal e As MouseEventArgs) Handles signature.MouseUp
        down = False
    End Sub

    Private Sub signature_Paint(ByVal sender As Object, ByVal e As PaintEventArgs) Handles signature.Paint
        Try
            Dim CurrentPen = New Pen(Color.Black, 2)
            e.Graphics.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
            e.Graphics.DrawPath(CurrentPen, mousePath)

        Catch ex As Exception
            MsgBox("Error In Signature")
        End Try


    End Sub


    Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
        Try
            signature.Image.Save("C:\test\test1111111.Png") 'saved in app folder
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
        signature.Image = New Bitmap(signature.Width, signature.Height)
        gfx = Graphics.FromImage(signature.Image)

        gfx.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias




    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        signature.Image = New Bitmap(signature.Width, signature.Height)
        mousePath.Reset()



    End Sub
End Class



Any help will be EXCELLENT !!! ,, Thanks Friends
AnswerRe: Signature PictureBox Error !!! Pin
jitforce258513-Aug-12 5:20
jitforce258513-Aug-12 5:20 
AnswerRe: Signature PictureBox Error !!! Pin
Dave Kreskowiak13-Aug-12 5:28
mveDave Kreskowiak13-Aug-12 5:28 
QuestionRemove non-empty remote directory in Webserver Pin
ulasoc12-Aug-12 12:21
ulasoc12-Aug-12 12:21 
AnswerRe: Remove non-empty remote directory in Webserver Pin
Eddy Vluggen12-Aug-12 22:01
professionalEddy Vluggen12-Aug-12 22:01 
GeneralTracking system Pin
kipchirchir11-Aug-12 20:50
kipchirchir11-Aug-12 20:50 
GeneralRe: Tracking system Pin
Richard MacCutchan11-Aug-12 21:42
mveRichard MacCutchan11-Aug-12 21:42 
QuestionEncrypting File Problem Pin
jitforce258511-Aug-12 10:40
jitforce258511-Aug-12 10:40 
AnswerRe: Encrypting File Problem Pin
André Kraak11-Aug-12 11:37
André Kraak11-Aug-12 11:37 
GeneralRe: Encrypting File Problem Pin
jitforce258512-Aug-12 4:45
jitforce258512-Aug-12 4:45 
Questionhow to create a boolean property in user control and that can be used ? Pin
ankita.rose911-Aug-12 0:28
ankita.rose911-Aug-12 0:28 
AnswerRe: how to create a boolean property in user control and that can be used ? Pin
Eddy Vluggen11-Aug-12 0:38
professionalEddy Vluggen11-Aug-12 0:38 
QuestionCrossing the UI sync context with a datasource Pin
JoeRip8-Aug-12 12:11
JoeRip8-Aug-12 12:11 
AnswerRe: Crossing the UI sync context with a datasource Pin
Ed Hill _5_8-Aug-12 22:37
Ed Hill _5_8-Aug-12 22:37 
AnswerRe: Crossing the UI sync context with a datasource Pin
Eddy Vluggen8-Aug-12 23:55
professionalEddy Vluggen8-Aug-12 23:55 
GeneralRe: Crossing the UI sync context with a datasource Pin
JoeRip9-Aug-12 11:22
JoeRip9-Aug-12 11:22 
GeneralRe: Crossing the UI sync context with a datasource Pin
Eddy Vluggen9-Aug-12 21:08
professionalEddy Vluggen9-Aug-12 21:08 
AnswerRe: Crossing the UI sync context with a datasource Pin
JoeRip9-Aug-12 10:29
JoeRip9-Aug-12 10:29 

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.