|
hi
I have a major problem.I am designing a simple simulator for my college project,in this simulator I may have some code running simultanesly (vitrual).I mean, in this simulator ,simulator engine may wait on an object and run another object an then return back to the original object like what we have in calling Methods.In this way parallel programming and multi threading in the Apllication layer comes possible.
I need to know if I can do this by halting execution in some point of the code manulay and run another code and the return back to the original code.This simulator runs on a single thread and may have many objects in it and can not have one thread per each object in order to use Mutex.
Thanks
|
|
|
|
|
Hi!
In my program I have to change the language of user's input programmaticaly. User of course is able to do it by himself using CTRL+SHIFT or whatever. But I have to make it by myself. Is there any property that will allow me to do it?
|
|
|
|
|
|
you can use System.Windows.Forms.InputLanguage Class to do this
Installed Languages can be retrieved through InstalledInputLaguages property
changing and retrieving current input language can be done through CurrentInputLanguage property
here is an example to change the input language to Farsi
<code>
foreach (InputLanguage lang in InputLanguage.InstalledInputLanguages)
if(lang.LayoutName == "Farsi")
{
InputLanguage.CurrentInputLanguage = lang;
break;
}
</code>
and another way to change the language is through using cultures like
InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(CultureInfo.CurrentCulture);
good luck
|
|
|
|
|
|
oops. Sorry. I just realized that I need this change in Console, not in Windows.Forms.
|
|
|
|
|
hello
I want to introduce you a tool in c# . with this tool you can connect to telnet.this is terminalemulator.
|
|
|
|
|
Hello,
I'm trying to work out a way to replace some text using regular expressions, but seems to be missing something. Here goes:
--------
inputstring = "<b>Str</b>: Large<br><b>Color</b>: Black<br>".
output should be: "Large-Black"
OR
inputstring = "<b>Str</b>: Small<br>"
output should be: "Small"
OR
inputstring = "<b>Str</b>: Large<br><b>Color</b>: Black<br><b>Engraving</b>: yes<br>"
output should be: "Large-Black-yes";
my regularexpression method looks like this:
{
string s = Regex.Replace(attribut, @"(<b>.*</b>)+:\s(?<keeper>.*)<br>", "${keeper}-");
return s.Remove(s.Length-1, 1);
}
But this will only give me the last ocourance of <keeper>. Eg Black for the first example given.
Any clue/help is very appreciated.
thanks
Frank
|
|
|
|
|
Have you checked your regex? Look for Expresso on this site. It is a wonderful tool for testing your regular expressions.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Dear all,
Quick question. I'm trying implement the project " TaskBarNotifier " ( http://www.codeproject.com/cs/miscctrl/taskbarnotifier.asp[^] in my application. On compilation everything goes well, but during execution it throws an exception:
Resource 'skin.bmp' cannot be found in class 'ICNS.MainApplication'.
I've added the bmp to the resources, even tried setting the path manually but to no avail.
I've put the following code in the constructor of my main form :
taskbarNotifier = new TaskbarNotifier();<br />
taskbarNotifier.SetBackgroundBitmap(new Bitmap(GetType(), "skin.bmp"), Color.FromArgb(255, 0, 255));<br />
taskbarNotifier.SetCloseBitmap(new Bitmap(GetType(), "close.bmp"), Color.FromArgb(255, 0, 255), new Point(280, 57));<br />
taskbarNotifier.TitleRectangle = new Rectangle(150, 57, 125, 28);<br />
taskbarNotifier.ContentRectangle = new Rectangle(75, 92, 215, 55);<br />
taskbarNotifier.ContentClick += new EventHandler(ContentClick);<br />
taskbarNotifier.CloseClick += new EventHandler(CloseClick);
Can anyone tell me what I am doing wrong ?
|
|
|
|
|
Not sure but you may want to ask the author of the article...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hello.i workwith C#.net.i want to use twain.dll.i add twain.dll to my project with add refrence but there are error:"twain.dll" is not a valid assembly or COM componenet.help me for solve this problem and use from this dll.
|
|
|
|
|
twain.dll cannot be added direcly to projects
you must use it through invoking with DllImport
this may help http://www.codeproject.com/dotnet/twaindotnet.asp[^]
and there is another way for using scanners beside the twain you can do it through WIA too.
good luck
|
|
|
|
|
Read the How to get an answer to your question post at the top before posting anything else.
Hello and error are not very good subjects
only two letters away from being an asset
|
|
|
|
|
iwork with C#.net.i download gdtwain.ocx and then add to my project with add refrence.i have error:gdtwain.twainclass.twainclass() is inaccesible due to its protection level help me for solvethisproblem.thanks
|
|
|
|
|
That's probably because the reference, or the ocx modifier is set to private. Try public.
|
|
|
|
|
I am locking for get the function names through .Net tools like dumpbin.exe
from the dlls like use32.dll and shell32.dll it provide the name of function included int that dll but does not show the number of argument and datatype of the arguments.
Plz help me out and give me some helpful hints.
|
|
|
|
|
you can't get any information on the function arguments, neither does dumpbin.
that information is not available, short of interpreting the assembly code and
guessing a lot.
you can get the export list, the import list, etc. but these show function names
only. I have C# code that does exactly that.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi there,
I want to auto generate an ASP web page which includes a display of selected data from a database.
What I am doing here is as follows;
* I've got a standlalone appdone in C#.
* I am selecting what tables I need to display using ASP, thorough the UI.
* What I want to do is, create the ASP page, so that the selected columns from the selected table will be displayed.
The generation of the ASP page is giving me trouble. How can it be done with the minimum effort?
Regards,
A
|
|
|
|
|
Well, the simplest way is that you'd have a basic page laid out, and then with a string builder you can loop in a data repeater or an html table with the results.
That's as minimal as I can imagine.
But why would you want a server script page being auto-generated? its simpler to have a plain html page rigged up with some precoded JavaScript routines.
Are you trying to build a report?
There are 10 kinds of people in this world. Those who understand binary and those who don't...
______________________
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
|
|
|
|
|
hi
i want to create help for my application.
and want to know what is best way to create help ?
and what is the way to convert a word document to chm?
tanks
|
|
|
|
|
|
Word does not produce very efficient HTML code, but you may store a word document as HTML. Best way is to use an html editor th create all pages and import the in HTML Workshop to create the .chm file. It is abit more work, bur much more flexible. You can use full html, including style sheets (which I recommend to do). Do not forget to test the resulting chm file thoroughly, to make sure all your help texts just do what you want them to do.
Rudolf Heijink
|
|
|
|
|
I want to insert a sub report in my report the data in the sub report filterd by the group data in the Main report
merwa
|
|
|
|
|
I am trying to convert a Delphi project to c# project. As part of the project a C-dll is called to conduct simulation (pipe network analysis).
On some of the forms I have placed custom controls such as Numeric text boxes and ZedGraph. I am able to create these forms immediately before conducting simulation (calling unmanaged C dll). But immediately after simulation (i.e., calling unmanaged C dll), I am not able to create these forms. The application is abruptly getting terminated. I tried to debug it, and found that termination is occuring inside InitializeComponents() function (in particular, it is occuring when trying to initialize custom controls). All other forms (which does not contain custom c***rols) are working fine. I am not able to pinpoint the error. Anyone outhere could please help me in correcting the mistake.
I can email the source code if someone wishes to view it. I cannot post it here because it is a large file.
Thanks in advance.
Regards,
Prasad
|
|
|
|