Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Can anyone help me with an icon problem?

Ok, i custom made an icon for a file but when i display it i have a black line bordering the left side and the bottom, any idea how to get rid of the black line? The black line wasn't apart of my original image btw.

Update:

Oh if you can't find the answer thats ok, there is an alternative and thats can you find a way to open specific notepad files using vbscript? I can open all files besides desired notepad ones and when i do open them they are invisible (can't see them but appear in taskmgr). That would be all thxs.

Update 2:

xD, thanks new to scripting but anyway it doesn't seem to work, it says Error: Expected ')'.

Where you have the '_' mean that the next lines a continuation?

Anyway here's what i got for the script. '@@@@@' is where i put my file name.

Private Sub Open_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Open.Click

Dim openFile1 As New OpenFileDialog()

openFile1.DefaultExt = "Text Files|*.txt"

openFile1.Filter = "Text Files|*.txt|RTF Files|*.rtf"

If (openFile1.ShowDialog() = System.Windows.Forms.DialogResult.OK) And (openFile1.@@@@@.Length > 0) Then RTB4.LoadFile(openFile1.@@@@@)

Dim name As String = System.IO.Path.GetFileNameWithoutExtensions

Me.Text = "@@@@@"

End If

End Sub

Update 3:

Oh half the script just disappeared =/ when submitted >.<

1 Answer

Relevance
  • MARK
    Lv 6
    1 decade ago
    Favorite Answer

    If you want to open files with VB, just use an OpenFileDialog box. It's that easy.

    Private Sub Open_Click(ByVal sender As System.Object, _

    ByVal e As System.EventArgs) Handles Open.Click

    Dim openFile1 As New OpenFileDialog()

    openFile1.DefaultExt = "Text Files|*.txt"

    openFile1.Filter = "Text Files|*.txt|RTF Files|*.rtf"

    If (openFile1.ShowDialog() = System.Windows.Forms.DialogResult.OK) _

    And (openFile1.FileName.Length > 0) Then

    RTB4.LoadFile(openFile1.FileName)

    Dim name As String = _

    System.IO.Path.GetFileNameWithoutExtension(openFile1.FileName)

    Me.Text = name

    End If

    End Sub

    ^ ^ This is the OpenFileDialog from one of my programs. ^ ^

    PS on the above...

    RTB4 is the RichTextBox's name in this program. You can use the name of whatever textbox you want to assign the file to in it's place.

    PPs...

    Notepad files are saved as *.txt

    Wordpad files are saved as *.rtf

    I added this just in case you didn't already know this, but I'm pretty sure you already do.

    Far as your icon dilemma, try this:

    http://icofx.ro/downloads.html

    It's free, & the one I use for all my programs. You can even modify photo, and convert them into icons with this one! There will be no color spills, or distortions with this one.

    Source(s): I write VB all the time. If I need a program, I write one! Don't need an icon editor, I USE this one!
Still have questions? Get your answers by asking now.