|
I have been using XNA for a while now and have gotten comfortable accustomed to its elegant design however a quick read on my upcoming University course shows that I will need to learn Direct X in C++ soon...
Would continuing to learn XNA benefit me for what awaits?
(I do know C++ by the way )
|
|
|
|
|
Yes, a lot of it works the same. Not everything though - XNA makes some things easier by hiding "the complicated stuff" if you do things the normal way. Of course, as soon as you need something out of the ordinary, things get dirty - such as setting up a non-default device on a non-default adapter (so it's hard to get it to work with PerfHUD and I never even got it working 100%).
The rendering itself is pretty much the same, but with less options in XNA.
|
|
|
|
|
Hi!!
i need to know about TSR(terminate and stay resident) programs in C#...
plz.. guide me...
i wanna learn how to make TSR programs in C#
|
|
|
|
|
TSR? I haven't seen that notion for the last 10 years. If you mean a program that loads once, and sits idle waiting to help you somehow, maybe visible in the task bar (with a NotifyIcon and a ContextMenu), yes those are just plain Windows applications. Examples are plenty here and elsewhere; I have one here: LP#TrayIconBuster[^]
|
|
|
|
|
Since Windows allows multiple programs to be loaded at the same time, TSR is no longer something special. Your C# programs are already TSR programs.
|
|
|
|
|
TSRs are rare (Extinct?) these days, I don't think it is possible in .net.
You can look at writing a service in .net (plenty of stuff on the Internet about .net services), this will probably achieve what you need.
[edit]
You can tell who the old people are on this forum, because we know what a TSR is !
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
My flight sim requires 620k of base memory do I don't like pesky TSR's.
|
|
|
|
|
Make sure you have sufficient EMS and XMS. And write the IRQ and DMA for your sound card on the side of the monitor...
|
|
|
|
|
Wow, I forgot all about that, kicking TSRs into upper memory with EMM386 when wanting to play F15 Strike Eagle. Happy days!
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
|
Dear all.
I want to access the user.config file from the installer itself, the problem is that I don't know how to get the path of the newly installed application. I know that the user.config file for my main application is somewhere in "'user'\AppData\Local\.... but I don't know how to access this area from the installer itself.
In my main application it is very simple, I just call:
Configuration _usrConfigLoc = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal);
Inside the installer I have tried:
Configuration _usrConfigLoc = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal); This returns the path of the config file of the installer (and not my main application)
Does anybody have a way to find the freshly installed user.config file from the installer application?
|
|
|
|
|
protected override void OnAfterInstall(System.Collections.IDictionary savedState)
{
string t_path = this.Context.Parameters["assemblypath"].ToString();
Configuration _usrConfigLoc = System.Configuration.ConfigurationManager.OpenExeConfiguration(Path.Combine(t_path,"user.config"));
base.OnAfterInstall(savedState);
}
|
|
|
|
|
Thanks for the quick reply, however this doesn't work exactly as I want to.... When running this code I get the C:\Program Files\..... folder and the corresponding .config file.
However I want to access the .config file which lies in:
"Users\user\AppData\Local\CompanyName\AssName++++\VersionNo\user.config"
Any ideas?
|
|
|
|
|
Application.UserAppDataPath
It'll return like follow:
"C:\\Documents and Settings\\mis-hongwenshi\\Application Data\\ccc\\WindowsApplication11\\1.0.0.0"
|
|
|
|
|
Thanks again for the very quick replies, however my problem is that I want to find the main application path and not the installer path.
If I call Application.UserAppDataPath inside the installer it gives me:
C:\Users\Kåre Tragethon\AppData\Roaming\Microsoft Corporation\Windows Installer - Unicode\5.0.7600.16385
I want to be able to find the main application path:
C:\Users\Kåre Tragethon\AppData\Local\Tragethon_Teknikk\EasyNetTools.exe_Url_mxn53vo4iinbepot2fslrsybsd0vtoiz\0.8.4.9
Let me know if anything is not clear and I will try to explain some more.....
|
|
|
|
|
How about this
AppDomain.CurrentDomain.BaseDirectory
I think you deploy the project use the clickonce,am I right?
|
|
|
|
|
Thanks again for the very quick replies, and for helping me out and sorry for my bad English and explanations.
No I don't use clickonce. I will do some more explaining:
I have a main project (main application) which can be installed on any computer. This application contains user settings (user.config) which lies in the following directory:
C:\Users\Kåre Tragethon\AppData\Local\Tragethon_Teknikk\EasyNetTools.exe_Url_mxn53vo4iinbepot2fslrsybsd0vtoiz\0.8.4.9
This is the standard location of user settings file, however when the main application changes version a new folder is created, e.g.:
C:\Users\Kåre Tragethon\AppData\Local\Tragethon_Teknikk\EasyNetTools.exe_Url_mxn53vo4iinbepot2fslrsybsd0vtoiz\10.8.4.9
I also have an installer application in my project (the standard VS built-in installer). When I un-install the application I want to access the user.config file and get all the settings from this file (and I will save all the settings in the TEMP directory) so that when I install the application again I am able to retrieve all the settings (access the user.config file and write all the previously saved settings).
Most often the reason for uninstall->install is that I have made a new version of the software and therefor I cannot rely on a static path to the user.config file, I will have to get it programmaticly.
|
|
|
|
|
|
|
Hello,
So I have the following layout in my project:
Solution ('sol')
namespace A
------folder 1A
------------folder 1A1
------------------file Af.cs
namespace B
------folder 1B
------------file Bf.cs
Now, in file Bf.cs I want to call a method which is in file Af.cs. How can I do that? I can't create an object of type Af, because I cannot call the namespace A for some reason. I am getting a message namespace A cannot be found whenever I use: using A.1A.1A1;
The dashes above are there just to show the hierarchy ( indentation ).
Thank you!
|
|
|
|
|
If "namespace A" and "namespace B" represent projects, then you have to add reference to project A in project B (right-click project B icon -> "Add reference" -> tab "Projects" select project A and click OK).
|
|
|
|
|
martingeorgiev wrote: Solution ('sol')namespace A------folder 1A
You can have multiple (or nested) folders with the same namespace - so make sure you actually have those namespaces available on those folders.
|
|
|
|
|
I don't see where folders come into the picture.
Maybe you have a Java background, where there was a strong link between namespace structure and file structure; there is no such thing in .NET
Files reside in folders.
Types reside in namespaces.
You can have (parts of) more than one namespace in a file.
You can have a namespace spread over many files and folders.
The project holds files, and the compiler will locate and deal with all types in them.
And to locate types in some other project, you'd have to add a reference.
|
|
|
|
|
Luc Pattyn wrote: there is no such thing in .NET real programming.
|
|
|
|
|
Thanks everybody for your assistance!
|
|
|
|