Jump to content
Xtreme .Net Talk

mpappert

Avatar/Signature
  • Posts

    58
  • Joined

  • Last visited

mpappert's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hey Everyone, I'm trying to find a control (or class) that will allow me to record and playback audio streams from a sound card. My purpose is to try and create a voice notes application and I've pretty much scoured the web for such a control. The best I could find was NCT AudioStudio 2.2 but when I tried to even run the samples it generated errors (and installed a bunch of crap on my system - not sure if its spyware or adware - crap nonetheless). Any light you can shed on this would be GREATLY appreciated ... Thanks!! M.
  2. The COM version? Can u give me a few more details, which COM object do I reference? Thanks! M.
  3. I've found this VB6 code that enumerates the list of available servers, I'll try converting it to .NET, but if anyone knows of .NET classes that will do this, please let me know! Thanks! M. Public Function AvailableSQLServers() As String() '*********************************************** 'PURPOSE: Returns array list name of all SQL Servers ' on the network that are visible to the ' machine ' 'RETURNS: String array containing names of all ' available SQL Servers (or an array with one ' element containing empty string if no ' SQL Servers are available/visible) 'REQUIRES: Reference to Microsoft SQLDMO object library ' VB6 Because array is returned ' Assumes Option Base is not set to 1 ' If you don't have VB6, and/or Option Base 1 ' is set, it should not be very hard to modify ' this code for you own purposes 'EXAMPLE: 'Dim sServers() As String 'Dim iCtr As Integer 'sServers = AvailableSQLServers 'If sServers(0) = "" Then ' MsgBox "No SQL Servers Available" 'Else ' For iCtr = 0 To UBound(sServers) ' Debug.Print sServers(iCtr) ' Next 'End If '*********************************************** Dim oServer As New SQLDMO.Application Dim oNameList As SQLDMO.NameList Dim iElement As Integer Dim sAns() As String Dim lCtr As Long, lCount As Long On Error GoTo ErrorHandler ReDim sAns(0) As String Set oNameList = oServer.ListAvailableSQLServers With oNameList lCount = .Count If lCount > 0 Then For lCtr = 1 To .Count iElement = IIf(sAns(0) = "", 0, UBound(sAns) + 1) ReDim Preserve sAns(iElement) As String sAns(iElement) = oNameList.Item(lCtr) Next End If End With AvailableSQLServers = sAns Exit Function ErrorHandler: 'Return array with one empty element on error ReDim sAns(0) As String AvailableSQLServers = sAns End Function
  4. Hi All, I was wondering if there is a .NET method for determining all of the SQL Servers on the network, like you can for say local hard disks: Dim drive As String For Each drive In Environment.GetLogicalDrives() Console.WriteLine(drive) Next Possibly some code like this but that enumerates the SQL Servers on the local network. Thanks! M.
  5. Background Gradient Fill Hey Everyone, I'm trying to paint a background gradient on my forms, but I can't intercept the Form1_Paint because there is no WithEvents declared. Can someone help me out with where I should place the WithEvents code (and what it should read) or if there is another method I should use to give the background a gradient fill .. Thanks! M.
  6. I've only heard of the one that ActiveState includes with their Komodo product ... just wondering if anyone knew of a standalone product ... M.
  7. Anyone know of a good Regular Expression Editor for Windows? TIA! M.
  8. I like the regular expression approach .. there are a total of 17 fields that are stored in this magnet swipe string ... I'm guessing I have to write one regular expression that matches the format of the string, but then how do I use the match function to seek the data in the string? The match function searches for data matches (if I use that example Nerseus posted earlier) it looks for "S" ... not everything has a separator .. some information (at the beginning and end) is size delimited (ie. fixed length fields) ... Can this be parsed using RegEx? M.
  9. Thanks Nerseus!!! M.
  10. Ok .. I will look at regular expressions! Thanks!! M.
  11. LOL ... How? :) M.
  12. I've heard that you can somehow make a form return true or false, probably by overriding the windows form class somehow ... Here is my problem: I have a form that I am trapping KeyPress events (turning KeyPreview On) and checking the key's for validity (this is for reading a magnetic stripe) ... it has specific characters that mark the beginning and end of the "data string" ... so I watch for these using the KeyPress event ... if I am able to get all the data successfully then I want the form to return True and go through validation, if it didn't read the swipe properly then it returns False, so a warning can be displayed to the user and they can swipe the card again ... Any ideas? Thanks (again)! M.
  13. Thanks Divil! That is *MUCH* better! ;)
  14. Again, another post to see if there is a better means for doing this ... I am taking a name such as "ashlyn" and making it read "Ashlyn" ... m_strFirstName = UCase$(Left$(m_strFirstName,1)) & Right$(m_strFirstName, Len(m_strFirstName) -1) Thanks, M.
  15. I'm just wondering if there is a .NET method for doing this tedious task ... I have data set (obtained from swiping a magnetic card) that is stored in a single string ... The data is separated sometimes by actual field length, and in some instances by separators. I am using code like this to parse the data and was wondering if there was a better .NET method for handling strings in this manner ... TIA! M. ' Card Number m_strCardNumber = Mid$(strSwipeData, 9, 10) ' First, Middle, Last from "^Last/First Middle^" ' Last ends at a '/', First and Middle separated by Space ' enclosed in '^' (carots) For iLoop = 1 To Len(strSwipeData) Select Case Mid$(strSwipeData, iLoop, 1) Case "^" If intNameLOC_Begin = 0 Then intNameLOC_Begin = iLoop + 1 Else intNameLOC_End = iLoop + 1 Exit For End If Case "/" intNameLOC_FirstName = iLoop + 1 Case " " intNameLOC_MiddleName = iLoop + 1 End Select Next iLoop m_strName_Last = Mid$(strSwipeData, intNameLOC_Begin, intNameLOC_FirstName - intNameLOC_Begin - 1) m_strName_First = Mid$(strSwipeData, intNameLOC_FirstName, intNameLOC_MiddleName - intNameLOC_FirstName - 1) m_strName_Middle = Mid$(strSwipeData, intNameLOC_MiddleName, intNameLOC_End - intNameLOC_MiddleName - 1)
×
×
  • Create New...