can this be done in C# / .NET / WinForms?
-
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 -
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 | doxygenpeterchen 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
-
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
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 -
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 | doxygenpeterchen 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
-
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 -
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
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