# VBForums UtilityBank > UtilityBank - Utilities >  Private Message Viewer

## MartinLiss

Utility: Viewer for downloaded Private Message files

Title: Private Message Viewer

Description: Allows Private Messages that you have downloaded in XML format to be viewed in a form very similar to what you see when you view a PM in VB Forums

Feature list:
Version 1.0
PMs from all VB Forums PM folders appear merged in date orderPMs can be searched by date and/or Member Name and/or contentOne by one PM navigation or jump to first or last PMWords selected by content are highlightedMultiple download files to be opened and duplicates caused by overlapping downloads are eliminatedThe viewed PM can by exported to a file in plain text or Rich Text format

Version 1.1
Corrected non-animation of animated smilies where there is a non-animated one in the PM.Corrected error caused when total length of filenames exceeded 256Added ability to export to XML. This is mostly for me in that someone who finds a problem with the tool can export the PM and send it to me so I can check it out.Added ability to print the current PMAdded right-click popup that displays hidden URLsAdded selection by folder nameAdded save window position user optionAdded animate/not animate smilies user optionAdded VB code formatting user option. This let's you view VB code as God intended.Added display of selected file name(s)Added ability to translate/not translate smilies in a given PMChanged member name selection to a dropdown list list rather than manual input

Version 1.2
At some point vBulletin changed the structure of the XML download file and this version now handles both file structuresAdded ability to jump to a particular PM numberSpeeded up the loading of the PM recordsAdded ToolTipsWhen the To name in the PM consists of multiple names I added the ability to find the PM using any of the names in addition to the multiple-name stringThe program now saves the path to the last used XML file folderAdded a tooltip-like display that shows all the PM file names selected if they don't all fit in the area of the form designed to show the namesMade it unnecessary to click a button after the files are loaded and also changed UI a bit as a part of that change

Version 1.3
Added support for Indent tagsAdded support for Thread and Post tagsAdded support for Code tagsAdded support for Noparse tagsAdded wildcard and multiple-word ability to the Search By Content option along with a Help button that explains how to use it.Changed Date/Time display and added folder name to displayCorrected a problem that occurred when smilies were right next to each otherCorrected a problem with some color namesCorrected a problem with default, yellow, highlightingCorrected a problem with the loading of the PM recordsCorrected a problem with some URL linksCorrected and improved the formatting of quotes (thank you dilettante)Corrected bolding and underlining problemsChanged the source location for one of the application's classes so that the code can be compiled by someone other than me

Known Problems:
None
Screen-shots: See below

Author Name: Martin Liss Note: This program would not have been possible without the help of VB Forum members, especially the excellent rich text code samples and assistance of moeur, and for V 1.3 the help given me by dilettante.

Notes: 
1)You are of course free to make changes to the code, but if you want to do that you should first go to Project|Private_Message_Viewer Properties|Make and change the Conditional Compilation Arguments from Testing = 0 to Testing = 1. The value of 1 indicates to the app that you are testing and that subclassing should be turned off, otherwise the app may crash VB after certain errors occur. In order to be able to compile the app you'll need to change it back to Testing = 0.

2) I've attached both code and installation package zip files.

----------


## si_the_geek

The source code for the files within this thread (updated:  02-26-2006) have been checked for malware by a moderator.

Disclaimer: _This does not necessarily mean that any compiled files (DLL/EXE/OCX etc) are completely safe, but any supplied code does not contain any obvious malware.  It also does not imply that code is error free, or that it performs exactly as described.

It is recommended that you manually check any code before running it, and/or use an automated tool such as Source Search by Minnow (available here or here).  
If you find any serious issues (ie: the code causes damage or some sort), please contact a moderator of this forum.

Usage of any code/software posted on this forum is at your own risk._

----------


## gep13

Hello Marty,

I have just tried to run your application with a downloaded version of my Private Messages.  I chose the option to "Download all Private Messages as:" and then XML.  However, when I try and load the XML file in the application, I get the following:

"blah.xml does not seem to be a valid XML Private Message download file.  Please try again."

Is it possible that the format of the downloaded XML has changed in such a way that this program no longer works?

Thanks

Gary

----------


## MartinLiss

Hmm. I didn't get the invalid file message but the file format has definitely changed. I'll look into it.

----------


## gep13

Hey,

Okay, thank you very much!!

Gary

----------


## MartinLiss

Version 1.2 released. See post #1.

----------


## MartinLiss

Version 1.3 released. See post #1.

----------


## gep13

Hey Marty,

I just tried the setup.exe on my Windows XP 64 Bit machine and after trying to run the program, I got the following:



I created the data folder, and moved the files which were in the route of the application folder, and after that, it was fine.  I am going to try running the setup on another machine, and will let you know how I get on.

Gary

----------


## Pradeep1210

It seems you forgot to include the richtextbox ocx files in the latest setup.
This is what I get when I try to execute the application after running the setup.
This is on a Windows XP system I formatted about a month ago and VB6 is not installed.

----------


## gep13

Any thoughts on this marty?

Gary

----------


## MartinLiss

> It seems you forgot to include the richtextbox ocx files in the latest setup.
> This is what I get when I try to execute the application after running the setup.
> This is on a Windows XP system I formatted about a month ago and VB6 is not installed.


Sorry, but the only installer I'd used in the past 8 years or so had been the P&D Wizard, and for all it's problems it was, at least, fairly automatic when it came to ocx's. I'm now trying to use Inno and I didn't realize that I had to manually include things like the RTB ocx which I'll need to figure out how to do. Is there an installer that will do it for me automatically like the P&D Wizard did?

----------


## Pradeep1210

It's a long time since I last used InnoSetup. But I remember there used to be an addon to it that could be used to automatically find dependency and also generate the script file, just like P&D wizard.

----------


## MartinLiss

> It's a long time since I last used InnoSetup. But I remember there used to be an addon to it that could be used to automatically find dependency and also generate the script file, just like P&D wizard.


Yes, Inno Script.

----------


## gep13

Hey Marty,

I have just tried to install this on another machine and I have ran into the same ocx problem.  Were you able to create a new setup.exe for the project?

Gary

----------


## MartinLiss

I gave up on this but I can supply any missing OCXs if that will help.

----------


## gep13

Hey,

Yeah, that would be great.  It is Richtx32.ocx that is missing.  Then the question becomes, what do I do with that ocx file?  Sorry if this shows my ignorance, but I am a .Net kind of a guy  :Smilie: 

Gary

----------


## MartinLiss

Start->Run     regsvr32 c:\windows\system32\richtx32.ocx

----------


## gep13

Hey,

Thanks for that.

Looks like this good be a bit of a saga though... I am now getting this error:

"Component 'comdlg32.ocx' or one its dependencies not correctly registered: a file is missing or invalid"

Gary

----------


## MartinLiss

I'm willing if you are.

----------


## Pradeep1210

Just download and install the VB6 SP6 runtime pack. It should probably take care of the problem you are facing.

http://support.microsoft.com/kb/290887

----------


## gep13

Hey,

Thanks for the suggestion Pradeep.  I am not on the computer that is causing this problem just now, but I will test it out when I get a chance, and I will let you know.

If it doesn't I will register the above ocx Marty, and come back to you if I need another one  :Thumb: 

Gary

----------


## MartinLiss

Please let me know either way.

----------


## gep13

Hello Pradeep,

I have tried installing the suggested Runtime Pack, but it doesn't seem to have made any difference (assuming of course that I don't need to restart my machine for it to take effect).

Marty, I have just registered that other ocx file, and I now got this error:

"Can't find C:\Program Files (x86)\Private Message Viewer\data\vbkywords.txt VB Code Markup will not work"

I check that directory, and there doesn't seem to be a data folder in the Private Message Viewer folder.  I created one, and added the files into it, and now the application loads correctly, but now I am back to an old problem...




> File C:\...\privatemessages-gep13-Nov 30th, 2010.xml
> does not seem to be a valid XML Private Message download file. 
> Please try again.


Any ideas?

Gary

----------


## Pradeep1210

It looks like now your problem with dll/ocx is now resolved. But this is some other problem related to the code in program. Marty may be able to confirm.

----------


## MartinLiss

> Hello Pradeep,
> 
> I have tried installing the suggested Runtime Pack, but it doesn't seem to have made any difference (assuming of course that I don't need to restart my machine for it to take effect).
> 
> Marty, I have just registered that other ocx file, and I now got this error:
> 
> "Can't find C:\Program Files (x86)\Private Message Viewer\data\vbkywords.txt VB Code Markup will not work"
> 
> I check that directory, and there doesn't seem to be a data folder in the Private Message Viewer folder.  I created one, and added the files into it, and now the application loads correctly, but now I am back to an old problem...
> ...


I've attached the files in two folders that you may be missing.

----------


## MartinLiss

Gep, the file you sent me works fine for me. The only strange thing I see is that in the file name in the picture there's a comma before 2010.xml whereas the file appears the have a blank.

----------


## gep13

Hey,

Ok, let me see if I can do some digging here to see what might be going on.  I will report back if I find anything.

Gary

----------

