Click here to Skip to main content
16,012,468 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: What am I missing with Clone()? Pin
Eddy Vluggen18-May-18 14:13
professionalEddy Vluggen18-May-18 14:13 
AnswerRe: What am I missing with Clone()? Pin
Richard Deeming21-May-18 2:06
mveRichard Deeming21-May-18 2:06 
QuestionHow can obtaing the filename of spool job? Pin
bGuidi7-May-18 4:59
professionalbGuidi7-May-18 4:59 
QuestionExternal Media player sdk for vb Pin
Asanka Akash Sovis5-May-18 22:27
professionalAsanka Akash Sovis5-May-18 22:27 
QuestionRe: External Media player sdk for vb Pin
Eddy Vluggen6-May-18 23:55
professionalEddy Vluggen6-May-18 23:55 
QuestionRe: External Media player sdk for vb Pin
Asanka Akash Sovis7-May-18 19:58
professionalAsanka Akash Sovis7-May-18 19:58 
AnswerRe: External Media player sdk for vb Pin
Eddy Vluggen7-May-18 22:39
professionalEddy Vluggen7-May-18 22:39 
Questionscrollable imagebox / change sizemode picturebox Pin
Michael Wild5-May-18 3:29
Michael Wild5-May-18 3:29 
Hello,
I found this vb transcripten of the codeproject article mentioned below.
However sometimes I would like to see the whole picture in the ImageViewer.
For this I would have to set the autoscroll to false and the sizemode property of
the embedded imagebox to "stretch".
Do I have to create another property in ImageViewer to change the sizemode to
Normal, StretchImage, AutoSize, CenterImage, Zoom

I am afraid this is beyond my level. Could someone help?

Thank you. Confused | :confused:
Michael

Public Class ImageViewer
    Inherits Panel

    'based on http://www.codeproject.com/KB/linq/ScrollablePicturebox.aspx

    Dim innerPicture As New PictureBox()
    Dim mPictureFile As String = String.Empty
    Dim mAutoScroll As Boolean = True

    Sub New()
        ' add the inner picture
        innerPicture.Top = 0
        innerPicture.Left = 0
        innerPicture.SizeMode = PictureBoxSizeMode.Normal

        Controls.Add(innerPicture)
    End Sub

    Public Property PictureFile() As String
        Get
            Return mPictureFile
        End Get
        Set(value As String)
            mPictureFile = value

            If (String.IsNullOrEmpty(mPictureFile) = False) Then
                ' set the image to the image file
                innerPicture.Image = Image.FromFile(mPictureFile)

                ' resize the image to match the image file
                innerPicture.Size = innerPicture.Image.Size
            Else

                innerPicture.Image = Nothing
            End If

        End Set
    End Property


    Public Overrides Property AutoScroll As Boolean
        Get
            Return mAutoScroll
        End Get
        Set(value As Boolean)
            mAutoScroll = value
        End Set
    End Property



End Class

QuestionHow overwrite the word after the specific word in text file... Pin
KimbleGray4-May-18 7:13
KimbleGray4-May-18 7:13 
AnswerRe: How overwrite the word after the specific word in text file... Pin
Dave Kreskowiak4-May-18 9:20
mveDave Kreskowiak4-May-18 9:20 
AnswerRe: How overwrite the word after the specific word in text file... Pin
Mycroft Holmes4-May-18 13:17
professionalMycroft Holmes4-May-18 13:17 
GeneralRe: How overwrite the word after the specific word in text file... Pin
KimbleGray5-May-18 4:25
KimbleGray5-May-18 4:25 
GeneralRe: How overwrite the word after the specific word in text file... Pin
Mycroft Holmes5-May-18 14:30
professionalMycroft Holmes5-May-18 14:30 
GeneralRe: How overwrite the word after the specific word in text file... Pin
mo14925-May-18 16:25
mo14925-May-18 16:25 
GeneralRe: How overwrite the word after the specific word in text file... Pin
KimbleGray7-May-18 4:01
KimbleGray7-May-18 4:01 
QuestionVerify files uploaded to ftp Pin
Marcus Genovese30-Apr-18 23:34
Marcus Genovese30-Apr-18 23:34 
AnswerRe: Verify files uploaded to ftp Pin
Gerry Schmitz1-May-18 5:24
mveGerry Schmitz1-May-18 5:24 
GeneralRe: Verify files uploaded to ftp Pin
Marcus Genovese2-May-18 3:04
Marcus Genovese2-May-18 3:04 
GeneralRe: Verify files uploaded to ftp Pin
Gerry Schmitz2-May-18 8:16
mveGerry Schmitz2-May-18 8:16 
AnswerRe: Verify files uploaded to ftp Pin
Jochen Arndt2-May-18 3:36
professionalJochen Arndt2-May-18 3:36 
QuestionCombobox Values using two different SQL tables Pin
gherkin1230-Apr-18 11:44
gherkin1230-Apr-18 11:44 
Questionmath challenge Pin
santi nuñez29-Apr-18 11:35
santi nuñez29-Apr-18 11:35 
AnswerRe: math challenge Pin
Richard MacCutchan29-Apr-18 21:25
mveRichard MacCutchan29-Apr-18 21:25 
GeneralRe: math challenge Pin
santi nuñez30-Apr-18 4:31
santi nuñez30-Apr-18 4:31 
GeneralRe: math challenge Pin
Richard MacCutchan30-Apr-18 5:38
mveRichard MacCutchan30-Apr-18 5:38 

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.