|
|
IIRC we had a similar problem some years ago. We needed to tick a checkbox in the Office setup of the target machine to include Interop into the installation.
The good thing about pessimism is, that you are always either right or pleasently surprised.
|
|
|
|
|
Could you please elaborate more on this?
|
|
|
|
|
emma.sun.sts wrote: So I included Microsoft.Vbe.Interop in References
And where exactly did you reference it from?
|
|
|
|
|
From
C:\Program Files (x86)\Microsoft Visual Studio 13.0\Visual Studio Tools for Office\PIA\Office14
|
|
|
|
|
Excellent.
You might have to play round with the options a bit since they move. But basically you need to find an option that will cause the dll to be copied into your build (when you look at the build directory the file will be there.)
Under VS 2008 you do this by (I think)
- Right clicking on reference
- Click on properties
- Set "Copy local" to true.
|
|
|
|
|
Hi Friend My name is makbul badi
and i Create one application to required video Conference(video chat )
application then how can i create using this application use in javascript or C#.net
thank you
modified 17-Feb-14 6:09am.
|
|
|
|
|
Member 10527273 wrote: so please help me With what? You have merely told us what you are trying to do, not what you need help with. If you are looking for sample code then go to the CodeProject Articles section[^].
Veni, vidi, abiit domum
|
|
|
|
|
i use OnItemCreated in repeater like :
<asp:Repeater runat="server" ID="DaysRepeater" DataSourceID="ObjDsDaysRepeater" OnItemCreated="DaysRepeater_ItemCreated">
<ItemTemplate>
<asp:repeater runat="server" id="PersonelsRepeater" datasourceid="ObjDsDevisionPersonel" onitemdatabound="PersonelsRepeater_ItemDataBound">
and
protected void DaysRepeater_ItemCreated(object sender, RepeaterItemEventArgs e)
{
}
protected void PersonelsRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
DataModel model = new DataModel();
Label label = (Label)((Repeater)sender).Parent.FindControl("lblCurrentDate");
int num = Convert.ToInt32(label.Text);
if ((e.Item.ItemType == ListItemType.AlternatingItem) || (e.Item.ItemType == ListItemType.Item))
{
DataTable totalIssuancePersonelDataWithID = model.GetTotalIssuancePersonelDataWithID(this._wfItemId);
if (totalIssuancePersonelDataWithID != null)
{
}
but in debug none of the function didnt run
Does any body know what can i do?
|
|
|
|
|
As the problem is more ASP.net I would suggest that you put the question in that forum[^].
Also you said that none of the method ran, have you put a breakpoint on the first line of the method and stepped through it?
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
I'm working on a project in which I'm working with my serial ports. When I open my serial port after that I'll have to send 4 requests. SO for sending request my code is:
private string ByteArrayToHexString(byte[] data)
{
StringBuilder sb = new StringBuilder(data.Length * 3);
foreach (byte b in data)
sb.Append(Convert.ToString(b, 16).PadLeft(2, '0').PadRight(3, ' '));
return sb.ToString().ToUpper();
}
private void senddata1(String str)
{
byte[] data = HexStringToByteArray(str);
comport.Write(data, 0, data.Length);
}
This function will create a method to send data. On timer tick event I'm sending this Data:
private void timer1_Tick(object sender, EventArgs e)
{
senddata1(s1);
senddata1(s2);
senddata1(s3);
senddata1(s4);
}
Note:after every senddata1() function system will get a response.
So the problem is When I'm sending data I'm not getting the response because system is unable to read all senddata. I want to manage my program in a way so that I can send data after every 250 mili second. Like this:
SendData1(s1);
get response from the system
senddata1(s2);
get response from the system
get response is being handled in like this:
comport.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived);
So is there a way I can manage my program. Please share your opinions.
modified 16-Jan-14 4:46am.
|
|
|
|
|
Since you send all 4 strings directly after each other, you cannot receive the responses in between, of course. Send one string, receive the response, send next string, receive, etc. After having received the response for the last string, restart the timer.
|
|
|
|
|
Do you really mean 250 seconds ? My guess is: you mean milliseconds.
Why don't you set a boolean flag in the comport.DataReceived EventHandler, and use a 'while loop in your code after each send ? Here's a very rough sketch [1]:
using System.Diagnostics;
private bool hasResponded = false;
private Stopwatch theStopWatch;
private int waitHowLong1 = 250;
private int waitHowLong2 = 3000;
private void SerialDataReceivedEventHandler(dynamic port_DataReceived)
{
hasResponded = true;
}
private void senddata1(String str)
{
hasResponded = false;
theStopWatch = Stopwatch.StartNew();
while(true)
{
if (theStopWatch.ElapsedMilliseconds >= waitHowLong1) break;
}
Console.WriteLine("250 ms. wait done");
theStopWatch.Stop();
theStopWatch.Reset();
theStopWatch.Start();
while (true)
{
if (theStopWatch.ElapsedMilliseconds >= waitHowLong2) break;
}
theStopWatch.Stop();
Console.WriteLine("3000 ms. wait done");
if (! hasResponded) Console.WriteLine("failed to handle update");
} [1] Note: the above is untested code: it will compile as shown here (certain lines commented out, and missing parameter Type for SerialDataReceivedEventHandler "fudged"), but there's no guarantee beyond that; use this code as a source of ideas only.
[2] examples of using System.Diagnostic.Stopwatch: [^]
[3] Note: if you are working with .NET 4.5, and Windows 8, by all means use the new Task.Delay method with Wait argument in System.Threading.Tasks: [^].
“But I don't want to go among mad people,” Alice remarked.
“Oh, you can't help that,” said the Cat: “we're all mad here. I'm mad. You're mad.”
“How do you know I'm mad?” said Alice.
“You must be," said the Cat, or you wouldn't have come here.” Lewis Carroll
|
|
|
|
|
May I know how can I solve with the problem describe?
Problem:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
* The problem occured when debug with the code below in MVC C#:
<p>Last Checked on : <a href="/Members/utility">@Utility</a>ConvertToDateTime(@Model[0].Timestamp).ToString("dd/MM/yyyy") <a href="/Members/utility">@Utility</a>ConvertToDateTime(@Model[0].Timestamp).ToString("HH:mm:ss")</p>
|
|
|
|
|
I suspect @Modelcollection is empty, the out of range error indicates that it cannot find @Model0]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Please check whether model collection is empty or not
|
|
|
|
|
hi there trying to interop WCF with unmanaged C++ clients.
First question is, where can you download sproxy.exe[^]
|
|
|
|
|
admittedly Im only using VS2005(*), but sproxy is installed already for me under VC (... Microsoft Visual Studio 8\VC\Bin\) , I haven't downloaded/installed it
It may be you need a particular 'Version' of Visual Studio VS<wxyz> eg Professional/Ultimate/Architect
(*) Professional version
'g'
|
|
|
|
|
There is no place to download it from.
It's installed with Visual Studio 2003 and 2005. It's not needed in later releases of Visual Studio as the ATL Server Library was deprecated and now lives in a retirement home here [^] on CodePlex.
|
|
|
|
|
|
$5 to make you hola
Member for 7 years and that's your first post?
|
|
|
|
|
Hola, spanish hello, gui developer using linux and shouting, what else needs to be said
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
I dint understand. Please explain me the meaning of this.
Thanks
|
|
|
|
|
Hi,
m a starter C# programming.I am working on Lab Machine and I'm being told to make a software to interface and fetch data from machine.
Please help I really need to retrieve information from this machine and store in our database also to show it in our WPF application.
I have to interface machines like Advia,Coulter,Liaision,Sysmex.
Anyone having knowledge on the same please respond back.
TIA.
|
|
|
|