|
Hi, and thanks for the advise.
I do not know what I am doing wrong in vb when it comes to arrays, but things that easily works with arrays in C++ or Java I can not make to work in VB6 or VB.NET..
However, I am now putting only unique emailaddresses in a StringDictionary thanks to your advise.
If anybody knows how I can add strings directly to the StringDictionary collection without extracting them first to a MatchCollection, I would appr. it. I think it should be possible to use the class Match and a method called findNext or something like that. It may reduce the overhead of having data added first in one collection, and then into an other.
This is the code:
Private Function ExtractEmailAddressesFromString2(ByVal source As String) As StringDictionary<br />
Dim mc As MatchCollection<br />
Dim i As Integer<br />
Dim myCol As New StringDictionary<br />
Dim m As String<br />
' expression from www.regexlib.com extracting email-addresses<br />
mc = Regex.Matches(source, "([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})") <br />
<br />
For i = 0 To mc.Count - 1<br />
'if address is not in collection from before, it is added <br />
If myCol.ContainsKey(mc(i).Value )=False Then <br />
myCol.Add(mc(i).Value, "") 'key + value <br />
End If<br />
Next <br />
Return myCol<br />
End function
|
|
|
|
|
Hey All
Does anyone know how to capture or record the screen into an AVI file through VB? I work in a call centre and for training purpose would like to capture the agents movements while on a call...
Any help would be great!
Later
|
|
|
|
|
Why write the code? Why not just use the Windows Media Encoder (free from here[^]) and record everything you do on the screen into an AVI?
RageInTheMachine9532
|
|
|
|
|
I need to code this because our software is connected to the PBX, so when a call comes in I would like to capture what the agent does on his/her screen. This will enhance our ability to maintain standards.
Any ideas??
|
|
|
|
|
Sounds like a very specialized app. You'll still need the Media 9 SDK and/or the Capture 9 Series tools to accomplish this, both come with code examples. The main problems you are going to have are storage requirements for the AVI's and a performance hit on the capture if the machine is not fast enough to do it AND perform the normal support functions at the same time. Capturing audio and video requires more than a little bit of CPU horsepower and the capture can fall behind and get jumpy if the machine is busy doing other things like loading Word, Excel, ... I would recommend testing the performance of such a setup by using the normal capture tools to see if the performance is acceptable before writing any code.
http://www.microsoft.com/windows/windowsmedia/download/default.asp[^]
RageInTheMachine9532
|
|
|
|
|
Thanks Dave for the quick responses.
I understand the problem I will face with resources but this would only be installed on new agents p.c's. This would help us to see how he/she is performing... I would only have to capture the video side of things because I already have a datavoice which captures all incoming and outgoing calls. Just incase of any problems.
Anyway thanks for you help
Later
|
|
|
|
|
I did timeworked in a call center for a while. The manager asked me to write an app that scanned the task list of the workstation for applications being run that were not part of the regular apps needed to do thier work and then report it back as an alarm to the manager.
Grrrrr.... but it ended up paying me so....
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
I created a simple database with 3 fields in it. When i tried to access it through VB.NET it says unknown data and will not let me go any further. any information on how to correct this problem would be appreciated. Thank you
|
|
|
|
|
You'll have to describe HOW your trying to access the database before anyone can tell you what's going on. Without seeing the code your using, it's near impossile to give you an accurate answer.
RageInTheMachine9532
|
|
|
|
|
sorry about that. I make the connection with jet 4.0 and i use a data adapter and im still good but when i try to generate the dataset it throws an error. The problem only happens when i try to access databases that i have created. When i use a database from example code it works fine. It must be something in the formatting of the database.
|
|
|
|
|
What's the error? What does the code look like? What line is the error on?
Details! Lots of details!
RageInTheMachine9532
|
|
|
|
|
Hi Guys can you help me with this:
1. How can I create an on-the-fly documentation generation for my codes so that when i compile my application the documentation is written in an html file?
2. How can i create my own description of the method i defined in my class such that when i call this method a TOOLTIP will come out exposing the Description i wrote for that particular method. Just like the members of any class in any assembly. When you press period (.) the members will come out and a tooltip will be displayed categorically showing the signature, return type and purpose for this method. Tnx a lot!
|
|
|
|
|
By default, the current version of VB.NET does not support this. You'll either have to write the .XML documentation file yourself or use a third party tool like the VBCommentor PowerToy, found here[^] at GotDotNet.
RageInTheMachine9532
|
|
|
|
|
The description i wrote didn't come out as part of tooltip when the intellisense was invoke. I installed VBCommenter 1.1.1 and activate the xml everytime i build my project under Options menu. I was able to add some comment/description thru the " ''' " but when i called the method its not coming out although it created an .xml file. Am i missing something maybe some sort of configuration so that it will come out once intellisense is invoke? Tnx!
|
|
|
|
|
I've never used it myself, but after looking thru the Forums on the GotDotNet.com site under VBCommentor, it looks like your won't see anything in Intellisense until the .DLL that is built is referenced in another project. You won't see anything in the current project...
RageInTheMachine9532
|
|
|
|
|
Is something wrong or is this OK. If I add two variables with a data type of single and like (845.12 + 312.14) and sent this directly to a text property of a label the display shows 1157.26. But if I store the sum into a variable with a data type of Double then display, it shows
1157.26000976563. Am I not allowed to convert a single to a double?
|
|
|
|
|
You are allowed to do this, but because of representation differences, you'll get results like these. The best way to do this is to use consistant data types. If the results of your calculations are requiring doubles, then use doubles for all the operands involved, not singles.
This is directly from the VS.NET 2003 documentation:
A conversion from a value type stores a copy of the source value in the destination of the conversion. However, this copy is not an exact image of the source value. The destination data type stores values differently, and even the value being represented might change, depending on the kind of conversion being performed.
RageInTheMachine9532
|
|
|
|
|
The problem is that I am pulling data from Microsoft Access. No matter what data type I use in Access I can only place that data in a Single data type within VB.
I used a little cheatiing by multiplying the return value by 100 and then transfering to a double and then deviding by 100.
This if fine if the data in Access is currency but other data would just have to only be transfered to a VB single data type.
|
|
|
|
|
I am developing a client/server application using VB.NET in VS.NET 2002. The client application have a form (Form A) that query the server application via Winsock and once Form A received the server's response (DataIn event) it launch Form B and hide Form A. The problem that I am having is that Form B is not responsive after it's launched. What is the problem? Please help?
I tried launching Form B using a button in Form A and it works perfectly. But Form B is not responsive when it's launched to in the DataIn event, it's not responsive at all. Please help.
|
|
|
|
|
The DataIn event is probably firing on another thread than the UI thread (ie Asynchronous processing). You must using the Invoke method of the form (or indeed any control on the form) to execute the code on the UI thread.
Look at the Control.Invoke method is VS Help.
|
|
|
|
|
Me.Invoke(New MethodInvoker(New <functionname>)) worked. Thanks..
|
|
|
|
|
I am trying to print a label to an older dot matrix printer. I want to be able to print one or two labels and then not feed any more labels through the printer. I have tried changing the pagesize in the documents pagesettings with no noticable results. The printer still feeds the entire page. Anyway any help or suggestions would be appreciated. Thanks
|
|
|
|
|
I've never done it (because I haven't had any reason to use a dot matrix printer in about 10 years!), but you'll probably need to send RAW data to the printer, bypassing the printing classes in the .NET FCL. You could TRY mapping LPT1: to your printer and sending the data out the LPT port using a Stream. I don't have any example code...
RageInTheMachine9532
|
|
|
|
|
I have created a registry search program, but it speed is crawling. It takes about 100 seconds to pass throught CLSID, Interface and Typelib keys. I wonder if i could speed up the search (by loading the whole keys into memory for example). I use VB6 with standart registry manipulation APIs: (RegOpenKey,RegEnumKey,RegEnumValue).
Only Absolute Power and Absolutely No power matters. The rest is slavery.
|
|
|
|
|
There's no way to load it in memory first. You might want to look at your code, very closely, for optimization opportunities. Since you didn't supply any code sample, it's really hard to tell you what you might try to get an advantage.
RageInTheMachine9532
|
|
|
|