|
next time, post your question in the vb.net forums, it really helps to know what language you are dealing with.
Secondly, use the pre tags.
Thirdly, this is how I did it (in vb.net)
Public Sub Terminate()
If _excelApplication IsNot Nothing Then
_excelApplication.DisplayAlerts = False
_excelApplication.Quit()
System.Runtime.InteropServices.Marshal.ReleaseComObject(_excelApplication)
_excelApplication = Nothing
_excelApplication.Finalize()
End If
End Sub
jeez.
|
|
|
|
|
Sorry about that. The reason I posted it here is because I did not think it will get to the point where I need to post code.
Still no luck. The process exists after doing all of the above.
EliottA wrote: Thirdly, this is how I did it (in vb.net)
You mean it worked for you? Finalize() is not a member of Excel.Application.
CodingYoshi
Visual Basic is for basic people, C# is for sharp people. Farid Tarin '07
|
|
|
|
|
Sorry, did not mean to throw that line in there.
CodingYoshi wrote: he reason I posted it here is because I did not think it will get to the point where I need to post code.
Still belongs in the VB.Net forum.
CodingYoshi wrote: The process exists after doing all of the above.
Err....ummm....does the process exist before execution...?
|
|
|
|
|
No, I manually check to make sure no process exists before the execution and I also kill all the instances programmatically just to reassure using this code:
foreach (Process p in Process.GetProcessesByName("EXCEL"))
{
p.Kill();
}
CodingYoshi
Visual Basic is for basic people, C# is for sharp people. Farid Tarin '07
|
|
|
|
|
Again that is horrible design, what if a client has excel running?
Create a new instance of excel, and set it's IgnoreRemoteRequests property to true, this will cause *your* instance of excel to operate under a new process.
|
|
|
|
|
How do you create excell processes?
System.Diagnostics.Process.Start("...") Something like that? If so save the process that you create.
List<Process> list = new List<Process>();
Process p = System.Diagnostics.Process.Start("...");
list.Add(p);
...
list[i].Kill();
|
|
|
|
|
No, the problem is to make excel spreadsheets you have to create a new instance of the application class and add workbooks to it. This creates a process and I am trying to kill the process which I created but no luck so far. Here is the snippet:
public void Constructor(Parameters params)
{
this._xlApp = New Application(); // This is the process I want to kill once I am finished creating the file.
this._workBook = Me._xlApp.Workbooks.Add();
this._repoHelper = null;
this._sheets = New Dictionary<String, Worksheet>(53);
this._parameters = params;
}
CodingYoshi
Visual Basic is for basic people, C# is for sharp people. Farid Tarin '07
|
|
|
|
|
Hi,
I'm kind of new to programming and to c# about 18 months c# and twice that with vba with bits of javascrip and, vbscript... and a hobbyist so it sounds a lot but it isn't!
Anyways I have never used images before in programming other than to swap a picture given a value in the code.
I now want to be able to have an image on a windows form that you can left click and a dialogue box appear that shows the position in pixels the mouse is on the image.
To be honest I'd be happy with just that. BUT really on the picture I want to have (probably the wrong word) but 'hotspots'/hot areas.
I am designing a form to be able to record where on a person has an injury. I want the user to be able to click say on the left shoulder of the person on the image and the program know that the user clicked on the left shoulder at the image pixel count of (100, 100) for example.
Would it be best to do this thru a browser displayed image that has a javascript script running on it and embedding in it somehow position (left shoulder) the user has clicked?
The reason why I want need the pixel count is because the results will be shown on a website.
Am I attempting too much? Could somebody please give me some direction?
Thank you in advance,
Mark
|
|
|
|
|
Take a look at The Hot Spot .NET Control[^], to see if it gives you any ideas.
A friend of mine did an application for Bronchoscopy using similar techniques in VB 3.0 some time ago.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Henry Minute wrote: in VB 3.0 some time three decades ago
ftfy
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
You exaggerate!
It was only about 13(ish) years ago.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Henry Minute wrote: about 13(ish) years ago
30(ish)?
it's all in the articulation
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Luc Pattyn wrote: it's all in the articulation
Since it featured a diagram of the human body, there was some degree of articulation, certainly.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Come to realize VB3.0 probably is more 13ishish, real PCs[^] not being around for 30 years yet.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Yes, it was about 1995-7, and given that it was VB, it was actually quite a nice app.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi
Actually I made a visual C# application & want it to Run on LAN with a Centralized database server so that my People can use the database situated at server from their client through a Client C# Application. How Can I do so.
is it simply making the setup file & then deploying into network machines....or is it some thing else...
regards
AKshay
Akshay Deep Lamba
|
|
|
|
|
Akshaylamba wrote: so that my People
Isn't that a bit Messianic?
You don't need to deploy your application on the LAN to use a database on the LAN.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
look into clickonce deployment - we use it extensively and are very happy with it.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
I would like log my keyboad strokes in a xml file. The attribute can be the key, and the value can be the timestamps or the other way ( doesn't matter). I would like to write the schema in the way that my output of schema would be exactly like this:
<LoggingActions>
<Keyboad>
<Entry key="a">0</Entry>
<Entry key="b">1213</Entry>
<Entry key="c">3445</Entry>
</Keyboad>
</LoggingActions>
so far, this is my schema:
<xs:element name="MyEvents">
<xs:complexType>
<xs:sequence>
<xs:element ref="LoggingActions"/>
</xs:sequence>
</xs:complexType> </xs:element>
<xs:element name="KeyboardEvent">
<xs:complexType>
<xs:sequence>
<xs:element ref="MyKeyEntry"/>
<xs:element ref="Time"/>
</xs:sequence>
</xs:complexType> </xs:element>
<xs:element name="MyKeyEntry"> <xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="keyReference"/> </xs:sequence> </xs:complexType> </xs:element>
<xs:element name="Time">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="timeRef"/>
</xs:sequence>
</xs:complexType> </xs:element>
<xs:element name="keyReference" type="xs:string"/> <xs:element name="timeRef" type="xs:int"/>
Instead, I am getting this xml as my output:
<LoggingActionsxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<LoggedKey>
<MyKeyEntry>a</MyKeyEntry>
<MyKeyEntry>b</MyKeyEntry>
<MyKeyEntry>c</MyKeyEntry>
</LoggedKey>
<Time>
<timeRef>0</timeRef>
<timeRef>1213</timeRef>
<timeRef>3445</timeRef>
</Time>
</LoggingActions>
How can I combine these two together?
thanks,
modified on Monday, June 8, 2009 2:49 PM
|
|
|
|
|
Your XML is not well formed, <Entry="c"> is never well formed XML regardless of the schema (schema's don't affect well-formedness). <Entry key="c"> would be well formed and may be valid depending on your schema.
|
|
|
|
|
You're right, I mistyped it.
|
|
|
|
|
Hi,
I'm doing a small program to work with SAPI (Speech Recognition).
The main goal of the program is a client send a WAV file from a TCP client, and a server receive it and store it in hard disk. Then before closing the TCP connection, I want to "recognize" the file saved.
The problem I'm getting is, after the file is saved, I go to the function that does the speech recognition. When I go on debug, the events of speech recognition doesn't fire up. I've tried and in a stand-alone version (i only input a WAV and then do the voice recognition part) and it works.
Maybe some code to help:
After TCPListner and TCPClient
.....
FileStream fs = new FileStream(@"C:\\" + filenameOnly, FileMode.Create);
... and then I write a buffer[] (from a StreamReader) to a file.
fs.Flush();
fs.Close();
..... Then I call the SR functions and declare the events.
sr.SetInputToWaveFile(ficheiro);
sr.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(sr_SpeechRecognized);
sr.SpeechHypothesized += new EventHandler<SpeechHypothesizedEventArgs>(sr_SpeechHypothesized);
sr.SpeechRecognitionRejected += new EventHandler<SpeechRecognitionRejectedEventArgs>(sr_SpeechRecognitionRejected);
sr.RecognizeAsync(RecognizeMode.Multiple);
Any suggestion?
Thanks in forward.
|
|
|
|
|
the project which i am doing is windows based project . In that i need to generate some reports , so i did that with crystal reports and then i created a setup file and then i installed in another system, then i am getting the exception . After that i removed crystal reports from my project and again i installed the setup file , then its working fine. I want to know how to include the reports.
And also i have one more doubt, that is for a label control i dynmically changed the font and color of the text and then i stored those values in the database 'access' and i want to apply the values stored in the database to other labels. How to apply those stored values to other labels from the database. I retrieved from database i got the values as string , then how to apply these string values to change the color of the label.
|
|
|
|
|
Please help. Here is a snippet of my code:
using TD=System.Threading;
TD.Timer m_tMonitor;
m_tMonitor = new TD.Timer(new TD.TimerCallback(MonitorFunc), 1, 0, 60000);
I am trying to monitor a schedule every minute, and if schedule is past due then I am performing some tasks. My problem is sometimes monitorfunc is not completed in 1 minute so timercallback is triggered again. Is there a way I can use something like WAIT for monitorfunc to complete what is is doing before I call it again.
HELP!!!
|
|
|
|
|
Hi,
what do you want to happen when MonitorFunc hasn't finished in one minute:
- drop one execution (i.e. ignore the new one that overlaps, so the next run is up to one minute after the current one finishes);
- stop the running one and run the new one;
- finish the running one, then immediately run the new one?
You decide, and code accordingly!
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|