BP Forums
I need help Programing a new program. - Printable Version

+- BP Forums (https://bpforums.info)
+-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55)
+--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56)
+---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8)
+----- Forum: Programming Help (https://bpforums.info/forumdisplay.php?fid=9)
+----- Thread: I need help Programing a new program. (/showthread.php?tid=463)



I need help Programing a new program. - Aaron Rogers118 - 02-23-2012

I need to know how to make the icon, program a media player, and program a Web-browser. Any Ideas?


Re: I need help Programing a new program. - brandonio21 - 02-23-2012

Well, this seems like a very large job. Well, WebBrowser tutorials and icon tutorials can be found here:


WebBrowser:
<!-- m --><a class="postlink" href="http://www.youtube.com/watch?v=5R8I1fYzBm0&feature=plcp&context=C34c3132UDOEgsToPDskIFjM_uTtAoE9sqlnE73sIm">http://www.youtube.com/watch?v=5R8I1fYz ... sqlnE73sIm</a><!-- m -->

Icon:
<!-- m --><a class="postlink" href="http://www.youtube.com/watch?v=BkO4EAsHvw0&feature=plcp&context=C322e31eUDOEgsToPDskK9c_-OCENEeHwzWSO_Mojs">http://www.youtube.com/watch?v=BkO4EAsH ... wzWSO_Mojs</a><!-- m -->

This reply made me realize that I talked really slow in my older videos.


Re: I need help Programing a new program. - Aaron Rogers118 - 02-24-2012

Thanks! Any thing on Medea players or do you not know the code for that one yet?


Re: I need help Programing a new program. - brandonio21 - 02-24-2012

Hm, I don't really know the code for that yet, sorry!


Re: I need help Programing a new program. - Aaron Rogers118 - 02-29-2012

One more question.
Is it possible to search For a file and open it threw Web Browser 1? If not then haw do you search for a file and have it open automatically or show up on Panel 2? This is the cod that I used
Code:
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        If CheckBox1.Checked = True Then
            WebBrowser1.Navigate(FileOpen, ComboBox1.Text)
        Else
            If ComboBox1.Text = "" Then
                MsgBox("Please enter website", MsgBoxStyle.Critical, "Brouser-Bus")
            Else
                WebBrowser1.Navigate(ComboBox1.Text)
            End If
        End If
    End Sub
(Note:I'm new at Visual Basic and I lurn fast but
Code:
WebBrowser1.Navigate(FileOpen, ComboBox1.Text)
didn't Work.) <!-- sSad --><img src="{SMILIES_PATH}/icon_e_sad.gif" alt="Sad" title="Sad" /><!-- sSad -->


Re: I need help Programing a new program. - brandonio21 - 02-29-2012

I do not know what the variable FileOpen is doing... but remove that from your code, and it should work!


Re: I need help Programing a new program. - Aaron Rogers118 - 02-29-2012

I,m Trying to git it to search and automatically view a file in WebBrouser1.Is that possible?


Re: I need help Programing a new program. - brandonio21 - 02-29-2012

Well, what do you mean by search. Do you want the user to find the file themselves?


Re: I need help Programing a new program. - Aaron Rogers118 - 02-29-2012

No, when I type in the File I wanna open into ComboBox1 I want WebBrowser1 to find it and automatically open it by itself threw WebBrowser1.... That is, If it's Possible.


Re: I need help Programing a new program. - brandonio21 - 03-01-2012

Well, This is kind of tedious to do, but you would need to scroll through every file in the computer, and see if it has the same name as your String "FileOpen". Here is the code that you are looking for:

Code:
Dim file As String = "readme.txt"
        Dim d As New System.IO.DirectoryInfo("C:/")
        Dim f As System.IO.FileInfo()
        f = d.GetFiles(file, IO.SearchOption.AllDirectories)
        If f.Length > 1 Then
            'There are multiple occurences of this file
        Else
            For Each element In f
                WebBrowser1.Navigate(element.FullName)
            Next
        End If



Re: I need help Programing a new program. - Aaron Rogers118 - 03-02-2012

Access to the path 'C:\$Recycle.Bin\S-1-5-21-2123078216-1120606443-2303232418-500\' is denied.
Code:
f = d.GetFiles(file, IO.SearchOption.AllDirectories)



Re: I need help Programing a new program. - brandonio21 - 03-02-2012

Just surround the statement with a try/catch block, and when it catches an error just
Code:
continue For



Re: I need help Programing a new program. - Aaron Rogers118 - 03-04-2012

What's a try/catch block?


Re: I need help Programing a new program. - brandonio21 - 03-04-2012

It is a segment of code that catches all errors in a code, so for example:

Code:
Try
Dim file As String = "readme.txt"
        Dim d As New System.IO.DirectoryInfo("C:/")
        Dim f As System.IO.FileInfo()
        f = d.GetFiles(file, IO.SearchOption.AllDirectories)
        If f.Length > 1 Then
            'There are multiple occurences of this file
        Else
            For Each element In f
                WebBrowser1.Navigate(element.FullName)
            Next
        End If
Catch ex As Exception
   Continue For
End Try



Re: I need help Programing a new program. - Aaron Rogers118 - 03-08-2012

Now I just need to figure out how to make a Download manager and I’m dun. Can you help me?


Re: I need help Programing a new program. - brandonio21 - 03-08-2012

Well, I must mention that it does seem like I am doing your whole project for you.. But this is what this forum is here for!

Unfortunately, I am not sure how to make a download manager. Sorry!


Re: I need help Programing a new program. - Aaron Rogers118 - 03-12-2012

Actually, I've been doing other stuff on it to and when I'm dun I'll post an attachment to show what all I've dun to it.

It's pretty cool to........ Or, At least, thats what me, my mom, and my frends thank.

Let me know what you thank Ones it's posted!


Re: I need help Programing a new program. - Aaron Rogers118 - 05-04-2012

How do you program timer1?