|
You mean i'm helpless unless downloading Framework2.0?
|
|
|
|
|
No, you're only helplessuntil you go back and read the replies properly
|
|
|
|
|
Of course not
In Framework 1.0 / 1.1 You have to use Console.Read(), as J4amieC suggested.
Bye!
|
|
|
|
|
But Console.Read() is not as getch().
I only want a single char from keyboard without echo.
|
|
|
|
|
|
I see.
I'm a begginer of C#. So far I don't know how to call a Windows API.
So I think I should learn more firstly.
Thanks all of you.
|
|
|
|
|
I see: if you want to read a single character from the user (any charachter, not an enter key press), and you don't want that character to be shown, the only way to do it on .Net 1.0 /1.1 (the 2.0 Console.ReadKey does the same thing) is to import _getch from msvcrt.dll.
You can use this code (by reinux from http://www.codeproject.com/useritems/PressAnyKeyToContinue.asp):
[DllImport("msvcrt.dll")]
private static extern int _getch();
public static int Getch()
{
try
{
return _getch();
}
catch
{
return Console.Read();
}
}
Insert this into a class and then you should be able to use Getch() to do what you need.
Bye!
|
|
|
|
|
I'm curious about DirectoryEntry.Properties["memberOf"] and "Domain Users". Let's assume that I know a little about AD and that I can properly get the DirectoryEntry to any domain user. Now, every group that the user belongs to is in the memberOf property except for one exception. "Domain Users", is it a special case? Is it implied that if I get a valid DirectoryEntry that, of course, the user is a member of "Domain Users" and therefore "Domain Users" isn't in the memberOf property?
|
|
|
|
|
Hi,
This is my first post here so please be gentle
I know it is possible to copy config files into the GAC such that an assembly can read from it based on its own location. This avoids having to partially hard code a location for the config file. However, is this good practice? What is the best approach for doing this?
Thanks in advance
P
|
|
|
|
|
Really? I thought GAC stood for "Global *Assembly* Cache"?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
<I though GAC stood for "Global *Assembly* Cache"?>
Precisely my point, hence why I asked if this was good practice and if there was a "good" way of referencing configuration information from the GAC.
If the only solution is to hard reference the config file then that is what I have to do. However, if there is another way, then I would really be interested.
Btw - thanks for the reply
P.
|
|
|
|
|
Anyone know how to programitically switch language when the focus hits a textbox? I am writing a dual-language application and want to switch to Thai from English when the user tabs into a textbox, rather than have the user goto the language bar to do so....
Thanx!
Jon Humphreys
ActivePlanet Software
Bangkok, Thailand
|
|
|
|
|
I have create a storage procedure Insert_Data in Oracle, which return a parameter new_ID.
Now I use the OledbCommand to execute the procedure.
How to get the returned parameter new_ID?
Thanks!
|
|
|
|
|
I'm writing a program (Vis. C# .NET) to move files, depending from content, to a backup server. Sometimes the file cannot be deleted afdter copying because it is opened by an other process. The best would be to have a test a first that gives me a result if a specific file is opened by an other process or not.
How this can be done ? At least I need a boolean answer if the file is opened in this moment by anything other or not. The better way would be to have an answer which process has opened it.
Can anybody give me a hint for a good solution ?
Holger
|
|
|
|
|
I would think that you could just try to open the file for exclusive read access - that should throw an exception. As for the ultimate, you would have to use interop and Win32 functions to delve into the finer details. The OpenFile() Win32 function might do a better job than .Net for what you want. This site really helps with the interop stuff....
http://pinvoke.net
Jon Humphreys
ActivePlanet Software
Bangkok, Thailand
|
|
|
|
|
How to validate unicode string from textfield by using regular expression
Thanks
|
|
|
|
|
Hi.
I want to decrypt data encrypted using System.Security.Cryptography.MD5CryptoServiceProvider class .Is there any way to do it?
Thank you.
|
|
|
|
|
Prashant Gadhave wrote: I want to decrypt data encrypted using System.Security.Cryptography.MD5CryptoServiceProvider class .Is there any way to do it?
No, MD5 is a hashing algorhitm. Its intended to be one way.
xacc.ide-0.1-rc2 released! Download and screenshots
|
|
|
|
|
Hello to all
I have to make windows service(in C#.NET) and use ATL Com dll made in visual studio 6
How can i use that.Is by just add reference or there is some other way
I am using visual studio.net 2003
Please help
Ankit Aneja
"Nothing is impossible. The word itself says - I M possible"
|
|
|
|
|
Add a reference to the DLL, and Interop DLL's/Wrapper classes are automatically generated for you - then just make use of the objects in the namespace by the LIB name - class viewer will help you find the generated namespace and object names.
Jon Humphreys
ActivePlanet Software
Bangkok, Thailand
|
|
|
|
|
thanks for help
Ankit Aneja
"Nothing is impossible. The word itself says - I M possible"
|
|
|
|
|
(Please note: I am NOT looking for a ready made control library to pop into an application. I would like to understand how to do this for myself.)
I've searched the .NET fora for an article on implementing dockable windows/forms but wasn't able to find the right info and was wondering if you could help me.
This is what I want to do:
Similar to the VS.NET GUI, I would like to define behaviors for child MDI forms such that if they are moved over certain regions, they should dock in those regions.
The behavior that I desire is identical to that of "Soultion Explorer", "Toolbox" etc in VS.NET.
I have learnt how to spawn child MDI forms. I'm using Visual Studio .NET 2003.
Your pointers, code and any help are much appreciated!
-- modified at 3:17 Friday 11th November, 2005
|
|
|
|
|
What exactly do you want to know? To accomplish docking is not a trivial task. Although you mentioned you don't want a complete control library I suggest looking at this[^] article. You can look into the code and learn everything you need.
|
|
|
|
|
Spliting the Area Partition of polygon(suppose in a polygon there is rectangle,triangle,Curve) I want area of rectangle,area of triangle,Area of Curve separatly to display. please help me.actually i am displaying as a whole.
i.e i have written one method(formule) in that it will take care of displaying the area of polygon.but now i want individually(spliting separatly for all)
For any irregular polygon shape it should show separatly for each shape.
Its very urgent.
Thanks & Regards
Satya
satya
|
|
|
|
|
In VB6 i could instantiate a class in a module as public and this would become global to the entire application. This was useful for a settings class where the settings were loaded from a file when the app started, then classes would share these settings and modify them, then the settings file would updated when the app closed.
Is there a way to do similar in C#? Where do i need to put the settings class so that it is global to all other classes in a namespace?
|
|
|
|