|
Thanks for the info. Changing the format specifier to just f do not fix it, but your suggestion for the mapping name did the trick. Thanks!
|
|
|
|
|
|
Can you explain what you mean by a "UI thread" please?
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
User Interface thread. Not Worker thread.
|
|
|
|
|
Alex_Y wrote:
User Interface thread. Not Worker thread.
When you create a Windows Forms application and run it, it always has a UI thread. Otherwise your application wouldn't be able to handle any UI-related events (see also Multithreaded Windows Forms Control Sample[^]). Besides having a message queue[^] and owning windows[^] it is just a normal thread and you should normally not need to create another thread with a message pump (although it is possible by calling Application.Run()[^]). If you want to manipulate the UI from a thread other than the UI thread to need to marshal the call to the UI thread (see Updating the UI from a Secondary Thread[^]).
Best regards
Dennis
|
|
|
|
|
I am little confused. How I can use resources in C#. I want to have some file where like in *.rc I can put all my strings. I do delopment for several languages.
Thanks
Alex.
|
|
|
|
|
.NET uses .ResX files by default, but the system is flexible and extensible. I encourage you to read Resources in Applications[^] in the .NET Framework SDK. This explains how to create .ResX files (XML files, which can also describe more than just strings by any string-convertible type), compile them (resgen.exe), and use them (the ResourceManager class, or a derivative).
You should also read Working with Resource Files[^] in the Visual Studio .NET product documentation that describes how VS.NET makes it easy to localize your libraries and applications.
Some improvements are being made for Visual Studio 2005. Read my blog entry[^] for details.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Thanks. I just thought that there is something which build in IDE like resource view in VS6.
Thanks.
Alex
|
|
|
|
|
|
In c and c++, i can use the shell function
UINT WinExec(
LPCSTR lpCmdLine,
UINT uCmdShow
);
to execute an application, open files and even open URL
is there an equivalent method i can use in .NET for c# that i can use?
|
|
|
|
|
Check out the Process class and it's Start method
|
|
|
|
|
|
Hello,
In a windows application I want to save the users username and password to remember in subsequent openings.
Where do you recommend me to stare the information. In registry or isolated storage??
|
|
|
|
|
cezeri wrote:
In a windows application I want to save the users username and password to remember in subsequent openings.
Is there only one user of the software per machine? Then I think isolated storage is better. If there are multiple users, then possibly the registry, under CurrentUser.
Are you encrypting the username and password, wherever you store it?
And I guess this begs the question, why have a separate login for your application, rather than using windows authentication? I mean, if the user has successfully logged in to Windows, why does he need to log in again to your app?
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
the same username and password will be used in connecting a remote web service so these information will be saved in server.
Will it be logical to release the windows password to the server?
This is my first project and I seriously consider your recommendations
|
|
|
|
|
cezeri wrote:
Will it be logical to release the windows password to the server?
No, I meant only that if the client application can be launched by the user, then the application can assume that the user is already authenticated. You might consider that the application has a separate login known only to it and the server. This way, the user logs in to Windows using his username and password, and the application connects to your server with its own authentication process.
I guess the first question to ask is, what are you trying to prevent from happening? Unauthorized access to the client application, to the server, or both?
Once the user is authenticated and, if you store the username/password on the client so he doesn't have to type it in again, then what's to prevent someone else from using the application, pretending to be the user?
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
-Unauthorized access to the client application is not important.
The username and password given in client app will be used to connecting server..
Also password will be determined by server administrators. So i think windows authentication could not work.
isolated storage seems as a better solution.
Thanks for help
|
|
|
|
|
Hi,
I´m using c# Windows Forms. Menu-mnemonics are in Windows Xp only shown when I press the ALT-Key or when i change the Windows-Appereance settings.
Is there a way how I can force my application to always show the menu-mnemonics? (e.g. by sending some Message WndProc() ??)
Cu,
Stephan
|
|
|
|
|
stephan.scheele wrote:
Is there a way how I can force my application to always show the menu-mnemonics?
Well, as you pointed out, this is a user-configurable appearance setting. If the user doesn't want the underlines and memnonics, why force them in your app?
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
This is a setting in Windows. Check the Display control panel, Effects tab for the "Hide keyboard navigation indicators until I use the Alt key" checkbox.
No, you can't force your users to turn it on and off. Your code COULD turn this on, but it is considered EXTREMELY bad practice for your code to mess with Windows settings that the user has setup.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Mark and Dave are right. You really should honor your users' settings unless you like unhappy users. You could, however, expose the functionality to enable or disable such a feature in an options dialog, menu, etc.
You can P/Invoke SystemParametersInfo and use SPI_SETKEYBOARDCUES to enable or disable the feature:
[DllImport("user32.dll", EntryPoint="SystemParametersInfo", SetLastError=true)]
static extern bool SetSystemParametersInfo(uint uiAction, uint uiParam,
bool pvParam, uint fWinIni);
[DllImport("user32.dll", EntryPoint="SystemParametersInfo", SetLastError=true)]
static extern bool GetSystemParametersInfo(uint uiAction, uint uiParam,
out bool pvParam, uint fWinIni);
const uint SPI_GETKEYBOARDCUES = 0x100a;
const uint SPI_SETKEYBOARDCUES = 0x100b;
const uint SPIF_UPDATEINIFILE = 0x0001;
const uint SPIF_SENDCHANGE = 0x0002;
public static bool KeyboardCues
{
get
{
bool value = false;
if (!GetSystemParametersInfo(SPI_GETKEYBOARDCUES, 0, out value,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE))
throw new Win32Exception();
return value;
}
set
{
if (!SetSystemParametersInfo(SPI_SETKEYBOARDCUES, 0, value,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE))
throw new Win32Exception();
}
}
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
who can help me write a program C#
|
|
|
|
|
|
I can:
public class MyFirstClass
{
public static void Main()
{
for (int i=0; i<100; i++)
Console.WriteLine("I will come back to the forum when I learned to ask meaningful questions.");
}
} Jeez, kids these days
mav
|
|
|
|
|
Congratulations! You now hold the record for the most generic question ever asked on CodeProject!
Let me see if I can answer this.... ummmm... We can!
But only if you ask a more specific question, such as what you're actually having a problem with...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|