|
There is nothing like that built into the framework.
You can look at GraphicsPath though
|
|
|
|
|
Thanks. I had not seen GraphicsPath before. It may be useful for what I am planning to do.
|
|
|
|
|
I accidentally stumbled on a project which does exactly what I am looking for.
http://www.codeproject.com/csharp/drawtools.asp
I showed this to my manager and it's perfect. It's more likely I will need to stay in the MFC world (similar sample app is DRAWCLI), but the DrawTools sample is EXACTLY what I am looking for should we decide to implement it in C#.
|
|
|
|
|
I was wondering, I probably don't quite know enough about the painting events.
I have an application that I created and when I start with processing data, the progress window becomes the up most window and The lower one gets partially blanked as a result of the heavy working. The same happends If I press on another application and then return back to mine, everything is blanked, I can't see the progress.
How can I overcome the problem.
What events should I catch, and what functions for repainting ?
Thank you,
Clint
|
|
|
|
|
If you do your processing on a worker thread that gives up a CPU cycle now and then, the main GUI thread will handle repainting itself.
--
I've killed again, haven't I?
|
|
|
|
|
|
I know that one conext menu can be associated with multiple controls, however I need to change the view of ListView depending on the respective ListView that was clicked.
I found some stuff on msdn that talked about ContextMenu.SourceControl but for some reason I am not able to use it on Click event. I am getting a null for ContextMenu.SourceControl .
Any ideas as to how I can do that ?
private void tsTile_Click(object sender, EventArgs e)
{
if (lvCD == ContextMenu.SourceControl)
{
lvCD.View = View.Tile;
}
if(lvDisk == ContextMenu.SourceControl)
{
lvDisk.View = View.Tile;
}
}
Thanks in advance.
|
|
|
|
|
Honestly, I don't get the point of your question and as there are no other responses I'm probably not the only one.
student_rhr wrote: however I need to change the view of ListView depending on the respective ListView that was clicked.
What has this to do with your ContextMenu? Writing a click event handler for both listviews should do the trick:
lvCD.Click += new EventHandler(listView_Click);
lvDisk.Click += new EventHandler(listView_Click);
private void listView_Click(object sender, EventArgs e)
{
((ListView) sender).View = View.Tile;
}
"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
www.troschuetz.de
|
|
|
|
|
Hi I want to convert an ArrayList into a single string (not an array of strings)
Looking forward for help
Regards,
|
|
|
|
|
string myString;
foreach(object obj in myArrayList)
myString += obj.ToString();
You could also add a separator between each item so it's easier to
separate if you need to later.
For instance "mystring += obj.ToString() + ":";
Then you can separate on ":".
-Larantz-
|
|
|
|
|
What is wrong with the answers that Christian Graus and I have already given you?
|
|
|
|
|
Rizwan Rathore wrote: Looking forward for help
If, when you've been given the correct answer, you don't understand it, you should respond and ask for more info. Given how trivial the answer is, you should probably post a code sample of what you're trying to do, so we can work out what is confusing you.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yeah, I saw this and wondered why my answer had disappeared
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
sorry sir, the answer was rite but i was not able to find this thread b4 coz i have just started using this question answer thing here.... so after trying a little i thought its easy to repost it...
but now i have understand it and i ll take care about it
Regards,
|
|
|
|
|
That's fine - if you configure your setting to have a valid email address, you'll get an email with a link when people reply to you.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
:(i trying to make a project to get the total 65 in table of 7x7 in multidimentional array. i want to get awnser 65 in all the ways horiaental or vertical.plz help me make it in vb or viual c++.
thanx
QASIM MASUD
|
|
|
|
|
We have C++ and VB forums here, why did you ask this in the C# forum ?
This smells like homework - we don't do people's homework for them ( although we will gladly help if you ask questions and post code when you get stuck )
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
He probably thought C# was half way between C++ and VB.NET
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
A hospital has a large no. of registered physicians . Atteributes of PHISIACIAN include Physician_ID (the identifier ) and Specialy.patients r admitted to the hospital by physicians. Attributes of PATIENTS include patient_ID (the identifier) & Patient_Name. Any patient who admitted must have exactly one admitting physician . a physician may optionally admitted any no. of patients. Once admitted, a given patient must b treated by at least 1 physician a particular physician may treat any no. of patients , or may not treat any patients. Whoever a patient is treated by a physician, the hospital wishes to record the details of the treatment (treatment_detail). Components of treatments_detail include date, time and results.
QASIM
|
|
|
|
|
Very interesting. Is there a question you wish to ask also? Or did you just want to tell us about your database?
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
------------------------------------
| 65 | 0 | 0 | 0 | 0 | 0 | 0 |
|----+----+----+----+----+----+----|
| 0 | 0 | 0 | 0 | 65 | 0 | 0 |
|----+----+----+----+----+----+----|
| 0 | 65 | 0 | 0 | 0 | 0 | 0 |
|----+----+----+----+----+----+----|
| 0 | 0 | 0 | 0 | 0 | 65 | 0 |
|----+----+----+----+----+----+----|
| 0 | 0 | 65 | 0 | 0 | 0 | 0 |
|----+----+----+----+----+----+----|
| 0 | 0 | 0 | 0 | 0 | 0 | 65 |
|----+----+----+----+----+----+----|
| 0 | 0 | 0 | 65 | 0 | 0 | 0 |
------------------------------------
Code is left as an exercise for the reader.
--
I've killed again, haven't I?
|
|
|
|
|
Hi..
I want to use the CmdLoadFromResource() method of ths speech SDK 5.1 to make the xml file that includes the Grammar embeded but i dont know how to use this method in C#.
This code shows how i used this method:
[System.Runtime.InteropServices.DllImport("kernel32")]
private static extern long LoadLibrary(string lpLibFileName);
private void button2_Click(object sender, System.EventArgs e)
{
this.objRecoContext = new SpSharedRecoContext();
this.objRecoContext.Recognition += new _ISpeechRecoContextEvents_RecognitionEventHandler(RecoContext_Recognition);
this.objRecoContext.State=SpeechRecoContextState.SRCS_Enabled;
grammar = objRecoContext.CreateGrammar(0);
int hModule=Convert.ToInt32(LoadLibrary("ReviewWinApp.dll"));
int langID=409;
grammar.CmdLoadFromResource(hModule,"tryRecog.xml","CFGGRAMMAR",langID,SpeechLoadOption.SLODynamic);
grammar.State=SpeechGrammarState.SGSEnabled;
grammar.CmdSetRuleIdState(1,SpeechRuleState.SGDSActive);
}
When i click this button i got the error:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in ReviewWinApp.exe
Additional information: The specified resource type cannot be found in the image file.
I am not good in COM programming.Could any one give me a C# code sample for using this method?
|
|
|
|
|
Hey Peeps! I recently d/l a program which does exactly what I need it to do, but it is a little loose for what I want because it allows you to see it running in the notification area.
What this little program does is disable the X to close a window on programs that you specify. And in the Command Window, it disables Close from the system menu also. This is perfect, but the program is always in the notification area and anyone can access it.
Does anybody know how to come to the same result...what command could be used to do this? is it a registry trick?
Thanx in advance!
Jude
|
|
|
|
|
You handle the OnClosing event, and the event args passed in include a flag you can set to stop the app from closing.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
How do you access the event from another program...such as a command window?
Jude
|
|
|
|