|
It's simple: the input is ready after reading one char. The ENTER key is like any other character and can be read so I could know when the user's input is over.
I just want to read characters one by one, byte by byte.
It can be easily done with C/C++, but I don't know how to do it with C#
In fact, "ReadConsoleInput" from kernel32.dll does what I need but I can't use it as I have explained before.
|
|
|
|
|
Oh,I know what is your means.
you want to do :while((c=getchar())=="key");
maybe you can do it in C# with the same way.
I will try it hurry up.
sorry for my poor English.
sorry for my poor English
|
|
|
|
|
|
The MSDN doc says that Console.Read()
reads the next Character from standard
input.
Thank You
Bo Hunter
|
|
|
|
|
I have gotten some information about it. It works in the Console but I still need to get it working in my particular environment. If anyone is interested:
http://www.dotnet247.com/247reference/msgs/1/5930.aspx
http://www.gotdotnet.com/community/usersamples/Default.aspx?query=ConsoleEx
http://www.mentalis.org/soft/class.qpx?id=2
regards.
|
|
|
|
|
I am getting a Stack Overflow Exception anytime I try to instantiate my custom class any ideas?
|
|
|
|
|
Any recursive method/contructor calls?
|
|
|
|
|
Um like reinstantiating the class in the constructor?
|
|
|
|
|
Did you trace the constructor call in single-step mode? Maybe it calls a neverending method, or it calls itself like that:
public MyClass(int x):this(x){}
|
|
|
|
|
Or just do it in DataGrid
|
|
|
|
|
Hi all,
I was wondering if anybody could help me figure how to make an icon appear on the tab part of the tab pages along with the text.
-Vish
|
|
|
|
|
Hello again,
My earlier post got results related to invoking a script within the context of a page. This is interesting but not what I was looking to do. The execScript() method referred to lets you pass in a script string and have it executed.
I need to invoke a script that is part of the downloaded page after it loads. An example script would be signalling a custom event. Can anyone out there help?
Thanks in advance and Happy Thanksgiving!
|
|
|
|
|
Me think the necesssary tool is already provided.
execScript(scriptcode) allows to execute arbitrary javascript code, so if we assume that the function you are willing to call from the web page is called myfunction() , why wouldn't you do just that :
execScript("<script>myfunction();</script>");
RSS feed
|
|
|
|
|
If this worked for me I'd be psyched. I've tried it and the code in NavigateComplete does not find the methods on the page. Odd thing is, I can set a variable value from the NavigateComplete method with code like:
scriptStr = "var scriptVal = \"this is the C sharp value\";";
try
{
Object retVal = iwnd.execScript(scriptStr, "JScript");
}
catch (Exception ex)
{
Console.WriteLine("SCRIPT EXC: " + ex.Message);
}
// The following is a snippet of script from a web page that displays the
// value of "scriptVal" that was set from the C# code in NavigateComplete.
var scriptVal;
alert("ScriptVal == " + scriptVal);
The "alert" in the html page displays the string value set with the execScript method. I've tried:
- changing the script language in the execScript method to "null"
(Object retVal = iwnd.execScript(scriptStr, null);) and this works.
- bracketed the script passed to execScript with the open/close script tags and this does NOT work.
- passed in the name of a valid script method to the execScript method and this does NOT work.
- bracketed the method with open/close script tags, passed it to the execScript method and this did NOT work.
(the prior two with explicitly specifying language in execScript and that did NOT work either)
I know I'm close to a solution here but I'm missing something fundamental.
Do I need to get the ScriptControl somehow and use the methods in there to solve this?
Thanks
|
|
|
|
|
Hiya I have a dataset filled with my data and need to write this dataset to my blank crystal report I have inserted into the project.
Because I want to then view the data in the Crystal Report Viewer.
How do I do this??
Thanks.
|
|
|
|
|
Try this. It might help! good luck!
http://www.tek-tips.com/gfaqs.cfm/pid/796/fid/3940
knvsolutions
|
|
|
|
|
Hey
I am about to make a Simple 2D game with tanks. A game where you will drive you tank around on a map an shoot on other tanks(simple).
I are thinking of using the regular Direct X, and have started to learn this, but i heard somthing about DirectX managed, and that sounds simple.
But what shold i go with ?
and if i shold go with DirectX manged is there any beginning turtotials on this subject?
Best regards
Jimmy
PS sorry for the bad english
|
|
|
|
|
|
Please look at the sample code in this[^] MSDN page for the ControlBindingsCollection.Add method.
What is the purpose of binding those rows to the control? How is that useful? Which of the 3 rows does it bind to? I guess I just don't understand the purpose of that code. Please enlighten me!
Thanks in advance,
Alvaro
He who laughs last, thinks slowest.
|
|
|
|
|
The example binds various fields in a DataTable to properties of a control. Initially, the control is bound to the first row. When the Position is changed in a CurrencyManager (which you can get from the BindingContext of a control), the properties of that control then use properties of the row pointed to by the Position property. You should also look up information on the BindingContext property for controls for more details and sample code.
If you've used Microsoft Access, think of a Form bound to a result set and with the navigation bar visible. When you click the navigation buttons, the Form's controls are bound to the data for the current result.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Thanks for clearing it up Heath. I should have seen the BindingContext property.
I looked up CurrencyManager in MSDN and the example they have there[^] shows what you're talking about.
Regards,
Alvaro
He who laughs last, thinks slowest.
|
|
|
|
|
Hello people,
How can I load the control (like Button) in designMode on my form. It's meen that the control will be painted and proceeded by it own designer.
regards,
OPopov
|
|
|
|
|
The control must still handle it's own painting, otherwise it wouldn't even show up (or redraw itself when necessary) at runtime. You can use the ControlDesigner that you would create to paint adornments (like grips) on the control, though. Painting is just part of any UI control.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
VS.NET IDE using designers to proceed controls painting and message handling at design-time. So we can see designers own paint on the IDE Design page (IMHO). And the problem is to emulate IDE Designer. It's meen that we can load control from assembly and show it on our own form. But we must see and touch control-designer not the control.
Regards,
OPopov
|
|
|
|
|
No, any Windows Forms .NET hosting environment still lets the control paint itself. The routines are already there and pre-empting that would be stupid. Designers can paint on top of the controls. If the designer does pre-empt the painting, it isn't exposed through the .NET framework. This is all documented in the VSHIK and you should read it if you're wanting to venture this way.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|