Search results for query: *

  1. I

    Some trouble starting an application minimized to the tray

    Yeah, I've got it working like I want it by including Me.Hide in the form loader. I did try that approach of not using the application framework, but I want to do stuff like have the application close when you close the form, and it already does that. Easier just to put Me.Hide in the form...
  2. I

    Some trouble starting an application minimized to the tray

    If I don't do this, then it will show up when I Alt+Tab. I don't want that. Maybe not. How would I go about starting the application without the form? Under my application settings, the "Startup form" field is mandatory.
  3. I

    Some trouble starting an application minimized to the tray

    Which are the three? I think I got it working as I want it, but I needed code in the load handler and the designer. In the designer, I set these properties on the form: ShowInTaskbar=False WindowState=Minimized And in Form1_Load, I changed the last line to this: Me.Hide() If I don't do that...
  4. I

    Some trouble starting an application minimized to the tray

    I wrote an application that by design, when minimized, goes to the tray, and will only show up as a normal form when you doubleclick the icon in the tray. To do this, I added a NotifyIcon, and added these functions: Private Sub Form1_Resize(sender As System.Object, e As System.EventArgs)...
  5. I

    Concatenating conditional XPaths - can this be done easier than this ugly expression?

    Take this XML: <Root> <SourceData> <Name> <Abbreviation>IRS</Abbreviation> </Name> <Type> <Code>T26</Code> </Type> </SourceData> <Employee> <FirstName> <FirstNames> <Name>Bill</Name> </FirstNames> </FirstName> <LastName>...
  6. I

    Conditional Xpath?

    This isn't really a VB question, more of an XML question. Suppose this XML document: <Root> <Gender>Male</Gender> <Name>Bill Gates</Name> <BirthName>William Gates</BirthName> </Root> And this one: <Root> <Gender>Female</Gender> <Name>Melinda Gates</Name> <BirthName>Melinda Ann...
  7. I

    List of objects to CSV?

    Given this code: Public Class Foo Property thing1 As String Property thing2 As String Property thing3 As String Property thing4 As String Property thing5 As String End Class Sub Main() Dim s as String = "" Dim l As List(Of...
  8. I

    Adding a node to a document via XPath?

    I went and added an XPath walker anyway. Dim t() As String = address.Split({"/"}, System.StringSplitOptions.RemoveEmptyEntries) For i As Integer = 1 To t.Length - 1 Dim nodeToCheck As String = "" Dim nodeToAdd As String = t(i) For j As Integer...
  9. I

    Adding a node to a document via XPath?

    Take this XML element: <root> <Alice> <HiredDate>1/1/2016</HiredDate> </Alice> </root> And this code - myXe is type "XElement": dim address as string = "/root/Alice/HiredDate" dim value as string = "2/1/2016" myXe.XPathSelectElement(address).Value = value The first two lines simulate...
  10. I

    How can I deal with XML a namespace, and XPath without a namespace?

    Take this sample code: Dim sXml As String = "<n1 xmlns=" & ControlChars.Quote & "n2" & ControlChars.Quote & "><n3>n4</n3></n1>" Dim address As String = "n1/n3" Dim xDoc As New XmlDocument xDoc.LoadXml(sXml) Dim xNsmgr As New...
  11. I

    Can you programmatically retrieve method information, without knowing the container?

    This is the first time I've heard of an assembly being loaded from a byte array, and not from a DLL file. If this is the case, is there any way to retrieve this assembly's metadata? Or am I at a dead end?
  12. I

    Can you programmatically retrieve method information, without knowing the container?

    Thanks, that worked! I made some headway on the REAL problem, but ran into a new roadblock. I ran this code: Dim a As Func(Of Object, Object) = AddressOf MysteryFunction Dim mi As MethodInfo = a.Method msgbox(mi.DeclaringType.FullName) msgbox(mi.ReflectedType.Assembly.Location)...
  13. I

    Can you programmatically retrieve method information, without knowing the container?

    Thanks, that worked for Console.Readline. What about MsgBox? I'm getting stumped on this one. MsgBox has this signature: Public Function MsgBox(Prompt As Object, Optional Buttons As Microsoft.VisualBasic.MsgBoxStyle = OkOnly, Optional Title As Object = Nothing) As...
  14. I

    Can you programmatically retrieve method information, without knowing the container?

    Found something that works sometimes, but not always. This: Dim a As Action = AddressOf Console.WriteLine Dim mi As MethodInfo = a.Method Console.WriteLine(mi.DeclaringType.FullName) Console.WriteLine(mi.ReflectedType.Assembly.Location) Will output this...
  15. I

    Can you programmatically retrieve method information, without knowing the container?

    Take this code: Dim s As String = Foo(AddressOf MsgBox) Console.WriteLine(s) I would like this to print information about the method. This would be good output: Member of Microsoft.VisualBasic.Interaction This would be even better output: Assembly Microsoft.VisualBasic...
  16. I

    Looking for a free and fairly simple tree graph visualizing library

    Found it! Microsoft AGL is doing the trick very nicely. https://github.com/Microsoft/automatic-graph-layout
  17. I

    Looking for a free and fairly simple tree graph visualizing library

    I have a table, like this: Thing Category Apple Food Bill Gates People Bread Food Chai Tea Edibles Dreamcast Electronics Edibles Everything Electronics Everything FireTV Stick Electronics Food Edibles People Everything Rocks Everything I want to...
  18. I

    troubleshooting a memory leak

    My app has a memory leak. As a first step, I've inserted this line into the main loop: Dim c As Process = Process.GetCurrentProcess() Dim s As String = "Mem: " & c.WorkingSet64 / 1024 & " K " & _ "VM: " & c.PagedMemorySize64 / 1024 & " K " & _ "GC: " &...
  19. I

    Registry virtualization

    I am trying to do what this article suggests: https://msdn.microsoft.com/en-us/library/windows/desktop/aa965884%28v=vs.85%29.aspx Here is my code: Imports Microsoft.Win32 Module Module1 Sub Main() Dim regKey As RegistryKey regKey =...
  20. I

    VS2013: 'warning MSB3061: Unable to delete file' when building a COM interop project

    Not even possible. I can create a brand new library project, set it to "Register for COM Interop," build, then rebuild and get that error message. No program could possibly be referencing it, because I created it ten seconds ago.
Back
Top