Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. can this be done in C# / .NET / WinForms?

can this be done in C# / .NET / WinForms?

Scheduled Pinned Locked Moved C#
csharpc++htmlwinformscom
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    peterchen
    wrote on last edited by
    #1

    I'm trying to bash my stubborn head through the .NET/ C# wall with a little project. before I start, I'd like to ask: Can the following be done with reasonable effort: - pretty heavy List Control custom draw - Getting a DLL's version number - Using WebForms for an app that can run both as Standalone Client and as a server-based application?


    Pandoras Gift #44: Hope. The one that keeps you on suffering.
    aber.. "Wie gesagt, der Scheiss is' Therapie"
    boost your code || Fold With Us! || sighist | doxygen

    J H 2 Replies Last reply
    0
    • P peterchen

      I'm trying to bash my stubborn head through the .NET/ C# wall with a little project. before I start, I'd like to ask: Can the following be done with reasonable effort: - pretty heavy List Control custom draw - Getting a DLL's version number - Using WebForms for an app that can run both as Standalone Client and as a server-based application?


      Pandoras Gift #44: Hope. The one that keeps you on suffering.
      aber.. "Wie gesagt, der Scheiss is' Therapie"
      boost your code || Fold With Us! || sighist | doxygen

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      peterchen wrote: pretty heavy List Control custom draw Yep, custom drawing is a common practice, and I don't see why you couldn't do your own list control. Keep in mind though, it's better to reuse existing control, overriding only the parts you need. Writing a control from scratch, though it seems fairly simple, is quite the large task in the end. peterchen wrote: - Getting a DLL's version number Yeah, sure:

      using System.Reflection;
      ...
      // Get the assembly
      Assembly executingAssembly = Assembly.GetExecutingAssembly();

      // Get the assembly name (which includes version)
      AssemblyName assemblyName = executingAssembly.GetName();

      // Get the version of the assembly.
      Version assemblyVersion = assemblyName.Version;

      peterchen wrote: - Using WebForms for an app that can run both as Standalone Client and as a server-based application? I'm not sure why you'd want to do this. A WebForms app as a standalone executable and as a server app (are we talking console app?) This is probably unlikely, I don't think you'd want to do this. What you *could* do is create a web forms app, then build a simply Windows Forms app that contains the WebBrowser control from Microsoft. Navigate the browser control to your webforms aspx file, and voila, you have webforms running as a standalone client application. Again, I don't recommend this. Depending on what you're doing, there's likely a much easier way of accomplishing your goals, but you'd have to let us know what you're trying to do before I can help further.

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Cops & Robbers Judah Himango

      P 1 Reply Last reply
      0
      • J Judah Gabriel Himango

        peterchen wrote: pretty heavy List Control custom draw Yep, custom drawing is a common practice, and I don't see why you couldn't do your own list control. Keep in mind though, it's better to reuse existing control, overriding only the parts you need. Writing a control from scratch, though it seems fairly simple, is quite the large task in the end. peterchen wrote: - Getting a DLL's version number Yeah, sure:

        using System.Reflection;
        ...
        // Get the assembly
        Assembly executingAssembly = Assembly.GetExecutingAssembly();

        // Get the assembly name (which includes version)
        AssemblyName assemblyName = executingAssembly.GetName();

        // Get the version of the assembly.
        Version assemblyVersion = assemblyName.Version;

        peterchen wrote: - Using WebForms for an app that can run both as Standalone Client and as a server-based application? I'm not sure why you'd want to do this. A WebForms app as a standalone executable and as a server app (are we talking console app?) This is probably unlikely, I don't think you'd want to do this. What you *could* do is create a web forms app, then build a simply Windows Forms app that contains the WebBrowser control from Microsoft. Navigate the browser control to your webforms aspx file, and voila, you have webforms running as a standalone client application. Again, I don't recommend this. Depending on what you're doing, there's likely a much easier way of accomplishing your goals, but you'd have to let us know what you're trying to do before I can help further.

        Tech, life, family, faith: Give me a visit. I'm currently blogging about: Cops & Robbers Judah Himango

        P Offline
        P Offline
        peterchen
        wrote on last edited by
        #3

        Thanks :) Judah Himango wrote: Getting a DLL's version number Does that work for "normal" Win32 binaries, too? Judah Himango wrote: I'm not sure why you'd want to do this Just an idea (You see, I don't have a good overview of whast's suitable with the individual technologies). The app would be useful both as standalone, and across the LAN, and I wondered if I could feed both with the same code base. But I don't want to put significant extra work into it, and the LAN part is sufficient with push-publishing static HTML, too.


        Pandoras Gift #44: Hope. The one that keeps you on suffering.
        aber.. "Wie gesagt, der Scheiss is' Therapie"
        boost your code || Fold With Us! || sighist | doxygen

        J 1 Reply Last reply
        0
        • P peterchen

          Thanks :) Judah Himango wrote: Getting a DLL's version number Does that work for "normal" Win32 binaries, too? Judah Himango wrote: I'm not sure why you'd want to do this Just an idea (You see, I don't have a good overview of whast's suitable with the individual technologies). The app would be useful both as standalone, and across the LAN, and I wondered if I could feed both with the same code base. But I don't want to put significant extra work into it, and the LAN part is sufficient with push-publishing static HTML, too.


          Pandoras Gift #44: Hope. The one that keeps you on suffering.
          aber.. "Wie gesagt, der Scheiss is' Therapie"
          boost your code || Fold With Us! || sighist | doxygen

          J Offline
          J Offline
          Judah Gabriel Himango
          wrote on last edited by
          #4

          peterchen wrote: Does that work for "normal" Win32 binaries, too? I believe the reflection stuff is for .NET CLR assemblies only. There's probably a way to find the version number of Win32 dlls as well, most likely as part of the System.Diagnostics process (for instance, you can get the version number of a dll using the System.Diagnostics.ProcessModule class). peterchen wrote: Just an idea If you mean inter-computer communication within a LAN, I'd use either .NET remoting or web serivces. Remoting is quite a bit faster than web services, but less portable and is for .NET-to-.NET communication only.

          Tech, life, family, faith: Give me a visit. I'm currently blogging about: Cops & Robbers Judah Himango

          M 1 Reply Last reply
          0
          • P peterchen

            I'm trying to bash my stubborn head through the .NET/ C# wall with a little project. before I start, I'd like to ask: Can the following be done with reasonable effort: - pretty heavy List Control custom draw - Getting a DLL's version number - Using WebForms for an app that can run both as Standalone Client and as a server-based application?


            Pandoras Gift #44: Hope. The one that keeps you on suffering.
            aber.. "Wie gesagt, der Scheiss is' Therapie"
            boost your code || Fold With Us! || sighist | doxygen

            H Offline
            H Offline
            hamster1
            wrote on last edited by
            #5

            There is actually a trick on using ASP.NET applications as standalone - you would need to write a small .exe which hosts the ASP.NET Runtime. I believe the article can be found in the MSDN Magazine (not 100% sure though...) ---------------------- ~hamster1

            1 Reply Last reply
            0
            • J Judah Gabriel Himango

              peterchen wrote: Does that work for "normal" Win32 binaries, too? I believe the reflection stuff is for .NET CLR assemblies only. There's probably a way to find the version number of Win32 dlls as well, most likely as part of the System.Diagnostics process (for instance, you can get the version number of a dll using the System.Diagnostics.ProcessModule class). peterchen wrote: Just an idea If you mean inter-computer communication within a LAN, I'd use either .NET remoting or web serivces. Remoting is quite a bit faster than web services, but less portable and is for .NET-to-.NET communication only.

              Tech, life, family, faith: Give me a visit. I'm currently blogging about: Cops & Robbers Judah Himango

              M Offline
              M Offline
              Mathew Hall
              wrote on last edited by
              #6

              There's probably a way to find the version number of Win32 dlls as well You can PInvoke and use DllGetVersion "I think I speak on behalf of everyone here when I say huh?" - Buffy

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups