Results 1 to 12 of 12

Thread: [2008] Notify Application

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Location
    Greece
    Posts
    64

    Red face [2008] Notify Application

    I want to make a notify application that will be able to notify me, example I always open my browser and go to the address http://www.apple.com/trailers to see if there is a new trailer available so I want to make my application able to notify me when a new trailer is available, second I want it to have something like a calendar with a specific timezone or able to change the timezone and again have the time right, what I mean is I want to be able to add Movie Title and their release date and because I don't live in America I want to change the timezone and still have the time for my timezone. This was the only reason why I wanted to learn coding with VB, and before starting answering, I haven't build the application yet so I need to learn how to make everything from the beginning, saving the settings (I prefer saving then into a txt or ini file), making a timer that will be able to count the time between the refreshing (Apple won't notify me when a new trailer will be available so I will have to make it refresh and check If a trailer is available) and making it using not a very big amount of memory. Thats all hope I will get some help, If you are reading this and you don't know how to help me with the making of the whole application then you can help me with a part of it or with telling me your ideas on how to make my application better.

  2. #2
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: [2008] Notify Application

    Wow. That just makes my head hurt a) trying to read it and b) trying to comprehend it!

    Try breaking what you want down into smaller pieces.

    You can download the page using a webbrowser control and examine the HTML to see what trailers are on the page and see if they are different to last time you looked, however you will be dependent on Apple not changing the way they code their page, so its not really a bulletproof way of doing it.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Location
    Greece
    Posts
    64

    Re: [2008] Notify Application

    a) adding Release Date for a Movie and get a notify icon when it will be released
    b) Notify when a new trailer is available

    there are smaller pieces that are included into those, like saving the Movie title and the release date etc.

  4. #4
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: [2008] Notify Application

    OK so you need to create a web browser control and load the main page, then when its loaded you need to examine the HTML and identify the link to the individual trailer page. Then load that page and examine the HTML to locate the release date.

    You are totally at the mercy of Apple though in as much as if they change the coding of the pages your application will probaby stop working.

    Once you have that data it is very simple to work out whether there are new films on the page that wern't there last time you looked if you are keeping track of them.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Location
    Greece
    Posts
    64

    Re: [2008] Notify Application

    I know that when a new trailer is available then the poster of the movie is the first of the list, so there is no need of HTML examination, I will just make my application search for the image

  6. #6
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: [2008] Notify Application

    Sounds simple. Don't know why I didn't think of that!

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Location
    Greece
    Posts
    64

    Re: [2008] Notify Application

    I have a problem now, I kinda know the solution but I need help.
    I can't add the Movie Title and the Release Date at the combobox so I am thinking, when the movie title from the combobox is selected then the user will get the release date at a label or a textbox the think that I don't know how to do is how to save the release date from the text box.

    EDIT
    Changed the ComboBox with a listview but now I have a problem with the code, It adds the Movie title every time but it adds the Release date only the first time.
    Code:
        Private Sub AddMovie_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddMovie.Click
            MoviesListView.Items.Add(MovieTitleTextBox.Text)
            MoviesListView.Items(0).SubItems.Add(ReleaseDateTextBox.Text)
        End Sub
    Last edited by Darkaar; Dec 6th, 2008 at 02:51 PM.

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Location
    Greece
    Posts
    64

    Re: [2008] Notify Application

    I know that it is because of the (0) (or am I wrong?) but I don't know how to fix it.

  9. #9
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: [2008] Notify Application

    At the moment you are always referencing the first list item.

    What you need to do is get a reference to the item you've just added :

    Code:
    Private Sub AddMovie_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddMovie.Click
    
            Dim itmTemp as ListViewItem
    
            itmTemp = MoviesListView.Items.Add(MovieTitleTextBox.Text)
            itmTemp.SubItems.Add(ReleaseDateTextBox.Text)
        End Sub

  10. #10

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Location
    Greece
    Posts
    64

    Re: [2008] Notify Application

    ok that works, now how I can save the movie titles and the release date so it will be loading them when I open the form?

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Nov 2008
    Location
    Greece
    Posts
    64

    Re: [2008] Notify Application

    No one? Then what about making a button which clears only the selected item? I am stuck, code isn't working and I can't find the right code.

  12. #12
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: [2008] Notify Application

    For saving/loading the data you'll need to read up on either using databases, or text files/XML files or the registry. They aren't one line answers really - a case of going away and deciding the best one for your application and then finding examples of how to implement them.

    As for deleting the selected items in a listview...
    vb Code:
    1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    2.  
    3.         Dim itmTemp As ListViewItem
    4.  
    5.         For Each itmTemp In ListView1.SelectedItems
    6.             ListView1.Items.Remove(itmTemp)
    7.         Next
    8.         ListView1.SelectedItems.Clear()
    9.  
    10.     End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width