Search results for query: *

  1. E

    Trying to Remove new line in string

    Your regex would have worked if you had Regex.Replace(s, "\n|\r", "") instead I think. The way you did it there had to be both \r (vbCr) and \n vbLf. If you use the bars its \n OR \r (or both) that are replaced.
  2. E

    List of objects to CSV?

    Depending on what you are trying to achieve it might be just as easy to use the office API. This walk through has some examples: https://msdn.microsoft.com/en-us/library/ee342218.aspx
  3. E

    Need a little help with Xml Serialization

    Yeah I had tried that also, but I decided to go back to the way it originally was, because attributes wouldn't work very nice for nested dictionaries.
  4. E

    Need a little help with Xml Serialization

    I have a Dictionary which I am Serializing with some code I found. (Converted to vb.net) It works great, but the output is like <item> <key></key> <value></value> </item> etc. I'm trying to make it so that it uses attributes instead like this: <item key="" value=""/> I tried using...
  5. E

    Opening IE without menus or address bar

    Just make a form and put a web browser control on it, the web browser control uses IE anyway, and then you can make the window however you like.
  6. E

    Question Creating an array with a variable value

    Or, if you need to access them by name, you could use a Dictionary, like this: 'File: array.csv contains: ' Howdy, 1, 2, 4, 3, 6, 5, 9, 8, 7 ' Hi(thar, 12, 21, 42, 37, 65, 59, 94, 86, 70) ' Hai!, 22, 34, 27, 69, 52, 87, 41, 64, 33 Dim ListOfArrays As New...
  7. E

    Smaller Number

    Right here: If (Price1 / Ounce1) > (Price2 / Ounce2) Then lblBetter.Text = "Item #1 is the better buy!" lblCost.Text = "The Cost Per Ounce is $" & (Price1 / Ounce1) Else lblBetter.Text = "Item #2 is the better buy!" lblCost.Text =...
  8. E

    Question Find Child Window

    I'm pretty darn sure its blocked, it it wasn't it would make UAC 100% useless... Why in the world do you need to do this for a legit application? :confused:
  9. E

    Question FindWindow - what if caption changes?

    Perhaps this is more like what you needed, Zexor. It finds all processes with the process-name "notepad" then it restores the first process with the name and gives it focus. (For no real reason, just to show you that you can use win-API functions) <DllImport("user32.dll"...
  10. E

    Write String as Byte

    The example I posted above should work, is there some part of it you don't understand?
  11. E

    Write String as Byte

    Edit: My first example wouldn't have worked, because your value is over the max value of a byte. However: BitConverter.GetBytes(Integer.Parse("2995030")) will return a byte array and then you can do fs.Write(ByteArrayItem) for each byte in the array. (don't have visual basic atm so I didn't...
  12. E

    custom VBproj MSBuild project

    I'm trying to create a custom MSBuild project to compile some modules written in VB and one written in C++ into one assembly. I found an example of compiling C# and VB files to one assembly here, which I'm attempting to base mine off of. Currently VS locks up when I try to open my project, and...
  13. E

    Implement IDictionary or Inherit DictionaryBase?

    If I use a normal dictionary(like the code below), it works great. Dim Example As New Dictionary(Of String, MyObject) For Each pair As KeyValuePair(Of String, MyObject) In Example 'Do stuff. Next However I want to add a few properties and subs, so I want to...
  14. E

    Collection Item Changed Index

    Is there any way to get the index of the changed item? I couldn't find any examples.
  15. E

    Question Visual studio

    Why do you need 2005? you can target older versions of the .net framework with 2008.
  16. E

    Package Load Failure

    Well I used to be unable to make WPF projects (XML package load failure) so in reinstalled, which fixed it. I don't know why this happens so often, I'm gonna have to reinstall every few weeks at this rate. Wish there was some other fix that didn't take a hour. Oh well. Edit: Reinstalling...
  17. E

    Package Load Failure

    I get a package load failure when I debug any program at it finds and exception. Package 'Visual Studio Explorers and Designers' has failed to load properly 9 GUID = {8D8529D3-625D-4496-8354-3DAD630ECC1B} ). etc etc. Any ideas why this would suddenly start happening and how to fix it?
  18. E

    Capacity measurement

    Okay, whatever works! :D
  19. E

    TreeNode Value property missing

    TreeNode Properties (System.Windows.Forms) I don't think it HAS such a value in any version so far. I could be wrong though.
  20. E

    Capacity measurement

    Public time As New Stopwatch Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load MessageBox.Show(SerialPort.GetPortNames().Length) Try SerialPort1.Open() Catch ex As Exception If...
Back
Top