Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Good to know. If I want to add anything further I'll do it by adding a post in the thread.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I added that after it was posted because I felt it was important to state the development environment I was using. I presume that by making the edit the category got switched from tutorial to article. How should changes be handled to avoid this?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Somehow I think we are getting lost in the explanation which is unclear. I can't make heads or tails out of your description. Can you perhaps just give us some sample input and what output you expect to get? I suggest you avoid terms such as "like" because what I am looking for is exact input and exact output.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I found it here but for some reason it no longer appears as a tutorial. I think the same thing happened with a previous tutorial on backgroundworker threads.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

OK. For some reason it was unflagged as a tutorial but the article is still here

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I posted a rather lengthy tutorial a week or so ago on embedding Windows Media Player in a vb.net app to build a video library. I don't see it in the vb.net tutorial section anymore. Could somebody please look into this and put it back? I wanted to refer a new poster to it but when I went to get the link it wasn't there. I put a lot of work into it and I'd hate to think it has been deleted.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If you have a specific question we'll try to answer it but your question is a little broad for this forum other than to answer in broad terms

  1. learn vb.net
  2. develop a GUI
  3. write your own codecs
  4. debug everything

However, if all you want to do is present Windows Media Player in a vb.net app then I can point you to a tutorial I recently posted on just that. At least I could if it hadn't disappeared. I'll post the link when I find out what happened to it.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Sometimes you want to add a little functionality to an existing class but you don't want to go to the trouble of sub-classing. A technique that you can use is known as Extending. For example, I frequently use regular expressions when working with strings. Wouldn't it be nice if strings supported regular expressions directly, but because they don't I have three choices:

  1. sub-class the string class and add the functionality
  2. write a separate function that takes a string and a regular expression as parameters
  3. Extend the string class

Extending can only be done within a module so to extend the string class create a module and call it StringPlus. Replace the module code with

Imports System.Runtime.CompilerServices
Imports System.Text.RegularExpressions

Module StringPlus

    <Extension()> Public Function MatchesRegexp(str As String, strexp As String) As Boolean

        Dim rexp As New Regex(strexp)
        Return rexp.IsMatch(str)

    End Function

End Module

Note that vb knows that you are extending String because the first parameter of your sub is of type String. When you invoke this method, the string will not be included as a parameter (see example below).

Now in the rest of your project you can use MatchesRegExp just like any other string method. For example

Dim pn As String = "633-0828"

If pn.MatchesRegexp("^[2-9]\d{2}-\d{4}$") Then
    MsgBox("is phone number")
Else
    MsgBox("is not phone number")
End If

While coding, your extension methods will appear in the intellisense pop-up lists.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Clearly it's not my day to be answering questions.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

OK. Now that I'm awake (I really shouldn't answer questions at 4:00 am), you never call GetExamGrades so your values are always 0.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

ARS Technica has an ongoing history of the Amiga that makes for interesting reading.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

That's why I said "strictly speaking". Technically the war has not ended. North and South Korea are currently in a cease fire so the war is still ongoing. They just aren't shooting at each other at the moment. That's not a win. That's a stalemate.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

How about changing

dblAvgTotal  CalculateTotalAverage(dblMidTerm, dblFinal) 

to

dblAvgTotal = CalculateTotalAverage(dblMidTerm, dblFinal) 
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I think they'd like to forget most of them. They didn't win in Viet Nam. They didn't win in Korea. They didn't win in Iraq or Afghanistan. True, they got Hussein but look at the aftermath. Is Iraq peaceful and stable after "liberation"? Has the Taliban been crushed in Afghanistan? Both countries are in total disarray more than a decade after American troops went in. Has America won the war on terror? Al Quaeda is better organized and has grown steadily since 9/11. Every action the US has taken in the middle east has only guaranteed ever increasing recruits for the terrorists and US citizens are gradually giving up all their rights as government repeatedly cries "it's for your own good". Doesn't sound like "winning" to me.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Reverend Jim thought that you were talking about 4K as in 4 kilobytes

Actually, I knew what he was talking about. I was just attempting to be funny (fail). That's why the next sentence started with "seriously".

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

"You'll have to forgive me. I'm Old." - Phil Fish (Abe Vigoda on Barney Miller)

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Strictly speaking, the Korean War never ended. The armistice was signed on July 27, 1953, and was designed to "insure a complete cessation of hostilities and of all acts of armed force in Korea until a final peaceful settlement is achieved." The final settlement is still pending so what we have is a 61 year-long cease fire.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It was called "core" and every computer I used until the mid 70s had it. Even a few into the 80s.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

My guess is that 4k files would be around 4*1024 bytes.

Seriously though, the size of 8 minutes of 1080p could vary greatly depending on the bitrate, frequency of keyframes, motion, etc. A video with low motion should have higher compression. A video with lots of motion or frequent scene changes would have a much lower compression. The same variability would occur no matter what the resolution.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Even though it is unmaintained, why should you stop using it? I am currently using version 7.1a. It does everything I require so even if there are no further versions I will continue to use it as is and be quite satisfied.

But...

This article states that Truecrypt is alive and well and living in Switzerland. While the original authors are no longer maintaining TrueCrypt, perhaps the project has found a new home.

Hiroshe commented: hope the project lives on +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Go to Organize, then Folder and Search Options. In the Folder Options dialog box, select the View tab. Scroll to the bottom and you will see

When Typing into list view
    o Automatically type into the Search Box
    o Select the typed item in the view

Make sure you have the second option selected. I suspect you are using the first option. Make sure you click Apply to Folders after you click Apply.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It is possible to portray higher dimensional objects in lower dimiensions but the result always contains distortions. Just look at maps. Most maps (in the projection which is most commonly used) show Greenland as inordinately large.

In the same way we can portray a cube in two dimensions

cbd01b4660a6ec4ebad71de589f69069

and a tesseract (hypercube or four-dimensional cube) in three dimensions (putty and straws work well), or even two dimensions.

96be8ebd9e9223c99aa3846a1f01d57a

It is also possible that we cannot perceive other dimensions because of scale. When standing on the prairies we perceive the world as flat, not spherical, but from space the actual shape is apparent. If you were reduced to the size of an ant and were standing on a soda straw you could berceive the surface as cyllindrical, but if you were the size of a microbe your perception would be substantially different.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I think pang comes from the old English, ang which means pain. This is also where we get hangnail from. It was originally ang nail which makes more sense. At least as I recall.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You may want to take this quick quiz on whether you are using common phrases correctly. I don't mean to brag (actually, I do) but I got a perfect score.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

When I was a little boy (many moons ago), an hour long TV show had almost an hour of show. For example, Adventures in Paradise (not a porn movie but a drama/adventure show from the early 60s) was around 52 minutes including 2 minutes of teaser and opening credits and 1 minute of closing credits. That left only 8 minutes for commercials. A recent episode of Castle, meanwhile, was about 43 1/2 minutes with 30 seconds of closing credits. Aside from the extra commercials (which now seem to happen every 6 minutes or so instead of every 15) I now have to put up with opening credits being splashed across the screen for the first 10-12 minutes of the show (who gives a rat's a$$ who the third assistant producer is) as well as the annoying ads that are continuously popping up from the bottom of the screen. I don't care what show is "coming up next". I'm interested in what's on right now. A lot of these shows rely on willing suspension of disbelief in which you are supposed to become immersed in the fantasy of the show. This is difficult when the credits, pop up ads and commercial breaks continuously pull you out of the fantasy.

And the networks' brilliant response to declining viewer numbers caused by excessive commercials is to add yet more commercials to make up for lost revenue. If they add any more commercials to The Big Bang Theory what we will be left with …

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I've been programming since the 70s and I still haven't created one.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Considering that even with 400 videos, entering three search terms and clicking Any brings up a list of the matching files (essentially) instantly I think that there would be very little to gain for the extra effort and complexity. I wrote a variant of this program to use with my photo library. The difference is that I have 9000 photos and they are not all in one folder. The same test on the photos (with 2500 matches) brings up the list in under a second.

Also, my xml skills are essentially non-existent ^_^

But the idea has merit, especially for large collections. I have ACDSee Pro 3 which supports categories. The problem is that you have to manually create the categories, and the indexes are stored in a database. My implementation allows ad hoc categories (and searches) and does not require a database.

But thanks for the suggestion.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Why is it, on cop shows, do they say "the cause of death was a single GSW to the chest?". Why GSW? Is it because it sounds "coppy"? Usually one uses an abbreviation when it is easier to say than the full version. Wouldn't it just be easier to say "gun shot"? Even "gun shot wound" is easier to say than "GSW".

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

One huge mistake I see here too often is asking others to do your homework for you. Ask for help if you need it but make the effort yourself first. And don't wait until the last minute to get started. The rule of thumb is the first 90% of a project takes the first 90% of the time. The last 10% takes the other 90% of the time.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I'm also big on classical. My favourite at the moment is Krystian Zimerman playing Chopin's Ballade #1 in g minor. You can see/hear it here. The pianist is insanely good.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You can get the Microsoft doc for the scripting runtime here. I would imagine that because C# and vb.net use the same core libraries that the native C# functions would also not be able to manage alternate data streams. I've written hundreds of full fledged apps in vbScript over the years, mostly for automation of infrastructure (move files hither and yon, populate databases, monitoring, etc) and most of them are still in service more than 10 years later. vbScript is perfect for these types of apps because

  1. the development environment is so easy to set up (notepad/textpad)
  2. you always know what version is being run (no compiling)
  3. it's easy to patch at 3:00 am on a callout
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I did a little more playing and added a progress bar. While playing a few test videos I noticed that the display got scrambled periodically (and always in the same places). The problems did not occur in either Windows Media Player or the full vlc player so I think I will just abandon the vlc implementation until it is officially supported by the videolan.org. Thanks for the assistance.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Are you looking for free or are you willing to pay? Before retiring I had to coordinate the scheduling of dozens of processes with varying types of triggers. Some were triggered on a time schedule and others were triggered by the appearance of files in folders. I found adTempus a great solution. It provided all the flexibility I needed (and more) and the tech support was second to none. If you contact them tell them you were recommended by Jim (formerly) from Manitoba Hydro. I don't get anything for the promo but they like to know where there referrals come from.

They have a full featured demo version you can download to try.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

vb.net 2010
Windows Pro 7

Create a Video Library with an Embedded Windows Media Player

I have close to 400 video clips in my home movie library. In order to quickly locate any given video I have added certain words into the file names. Even so, locating specific files is clumsy from the Explorer window and playing a clip requires starting an external application and flipping back and forth between Explorer and the media player. That's why I decided to embed the media player directly in the application.

Given a choice, I would have preferred to embed vlc Media Player, however, extensive searching on a procedure to do this proved fruitless. I followed the youtube videos to the letter and got only errors when trying to add the vlc control to my form. As such I was reduced to using Windows Media Player (which supports fewer formats).

I am going to present my application in four parts

  1. Introduction to Alternate Data Streams
  2. Comment text interface code
  3. Embedding Windows Media Player
  4. Adding the functionality

You can only store so much information in a file name before it becomes unwieldy. A better approach would be to store a few useful tags such as date/time, location and names in the file name, then store more descriptive text in a file comment. While Windows provides the capability of adding comments to files, this is available for only certain file types, and the comments cannot be manipulated via code. This is …

ddanbe commented: Great! +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

That did it, although I had to create the control at runtime rather than by dropping it on the form. I was able to playback a video. Are you aware of any documentation on how to add controls such as position, start/stop/pause, volume, etc?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

No apology is necessary. We have differing opinions and we have both aired them :-)E

The "E" is because I've let my beard get a little shaggy lately.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Yet another internet "fact" that doesn't stand up to the science.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Can you be more specific? What is the trigger? Is it based on date/time? Is it based on some particular action in the database? Is the database on a local machine? What kind of database is it? Does it even matter? Do you know how to access the database?

Are you trying to say "when the user clicks a button, I want to check the database for some condition and display a reminder in a message box if the condition is true"?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I am angry towards those that create images and messages such as those from the site you provided.

Then you've completely missed my point and the point of the J&M site.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Sounds like homework to me. You won't find anyone here to do it for you.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

In 1930, four men were arrested for appearing topless on Coney Island. In 1935, forty-two men were arrested in Atlantic City for doing the same thing in a flash mob.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If you present a position and an argument to defend it, then I point out how insanely absurd your position is by citing examples of how your argument is either internally inconsistent, completely contradicted by evidence, or totally at odds with your stated position then the only thing you should be offended by is your own stupidity for believing in that position in the first place. If you tell me the sky is green and I point to it and say "No it isn't. It's blue. See?" then you are the one at fault for refusing to believe the evidence. By being angry at me you are essentially just blaming the messenger.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

How do you add the downloaded package to the project so that

Dim cnt As New Vlc.DotNet.Forms.VlcControl

actually works? As is typical, the package is provided with essentially no documentation. The site says New documentation is now in progress, should be up soon. That was in April of 2012. Where am I supposed to put the downloaded dll files? Do I have to register them? Too many unknowns here. They don't even bother to list the properties and methods that are available. It seems to consist of "Here's a black box. You figure it out."

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The same word that came to my lips the last time I heard someone mention superfood.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I'm going to go in the other direction here and say that if I hear the word superfood one more time I think I will go postal.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If there is no difference between tags and content text when searching, what is the point in duplicating the text via tags?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

no one is allowed to even draw a picture of the prophet nor allah/god

At the risk of derailing this thread, you have the right to be offended. I have the right to not care. In any case, your statement is incorrect. You are not allowed to draw a picture of Mohammed or Allah. I can do whatever the hell I want, and you can feel as offended as you want. Besides, in the first cartoon the author explains that he is not drawing a picture of the prophet, just someone who looks like him. In any case, since nobody knows what he looked like, who is to say what is or is not actually a drawing of him?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The Amiga booted into an actual operating system, not an mmos.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I created an app to view and tag all of my home movie files. To play back the video I embedded Windows Media Player in the form. It also allows me to add comments to videos and search based on the comments. While it is functional, I would prefer to embed VLC Media Player because of the added functionality and its support for more media formats. Based on the videos I've seen on youtube the procedure seemed to be a simple one, however, I keep getting hung at the second step. I've added the vlc component to my toolbox but whenever I try to drag the control to my form I get

---------------------------
Microsoft Visual Studio
---------------------------
Failed to create component 'AxHost'.  The error message follows:

 'System.Runtime.InteropServices.COMException (0x8002801D): Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))

   at System.Windows.Forms.Design.DocumentDesigner.AxToolboxItem.CreateComponentsCore(IDesignerHost host)

   at System.Drawing.Design.ToolboxItem.CreateComponentsCore(IDesignerHost host, IDictionary defaultValues)

   at System.Drawing.Design.ToolboxItem.CreateComponents(IDesignerHost host, IDictionary defaultValues)

   at System.Windows.Forms.Design.OleDragDropHandler.CreateTool(ToolboxItem tool, Control parent, Int32 x, Int32 y, Int32 width, Int32 height, Boolean hasLocation, Boolean hasSize, ToolboxSnapDragDropEventArgs e)'
---------------------------
OK   
---------------------------

I've seen several posts from Microsoft on this problem but none have helped. Has anyone else found a solution to this? Has anyone embedded vlc in a vb.net app?