|
Hi Gareth,
if you dont understand why it now works I wouldnt call it "problem solved", but
rather "problem postponed to the future where it will hit me again at an even less
convenient moment, possibly after having deployed my new product in many copies".
So get a chance at understanding what is going wrong, I would suggest you replace
the catch(FileNotFoundException) by a very general catch(Exception).
Inside that catch block, show the full Exception.ToString() for the exception you
caught itself, then for its InnerException, then its InnerException, and keep doing
that until the InnerException is null.
Output everything to a window or better yet a file (not to a MessageBox !).
Now compare such outputs from two machines that behave differently and probably
things will become clear now.
Good luck !
|
|
|
|
|
Hi.
Would you happen to have a code snippet which shows how to programaticaly install a client certificate(in the form of a X509Certificate object) to the personal store and also how to delete it afterwards?
Thanks a lot.
|
|
|
|
|
I've done this in the past.......But don't have the code for it anymore.
This can't be done via explorer for a start so has to be a windows programs (com or dll etc...)
Have you tried the samples that are bunged with Capicom.
http://msdn2.microsoft.com/en-us/library/ms995332.aspx[^]
You also might want to look for cardspace as well.
Regards
Frank
Grady Booch: I told Google to their face...what you need is some serious adult supervision. (2007 Turing lecture)
http:\\www.frankkerrigan.com
|
|
|
|
|
I want to show the line count of all the word file for the specific user, as he worked on.
In my design i got 2 list view.
As i select 1 voicefile from voice list view property it shows me related documents file in document list view.
i made one property named line count details it should show the details there.in that i want total line count for the all files he worked on.
Parag Joshi
|
|
|
|
|
hi all,
i've created a user control
its working very fine..
My req is. I have to use this control in another form..so i've added the dlll and working on it.
PLEASE TELL ME HOW TO MANUALL TAKE THE CREATED USerCOntrol AS AN ARRY..SO that whenever i needed to create more than one usercontrols i'll do in runtime hope u got me
prashanth,
s/w Engineer,
Syfnosys.
|
|
|
|
|
You just need to keep creating them and adding them to the controls collection of your form. You could write a help method to add controls from an array, which takes the array and iterates over it, if you want to.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
can u please, explain with a sample application.
prashanth,
s/w Engineer,
Syfnosys.
|
|
|
|
|
Hi,
everything you can do graphically with Visual Studio Designer, you can do
programmatically by writing some code. In fact Designer generates exactly that
code for you, so you can look at that code and do something similar
(but dont do it inside InitializeComponent() since that method is completely
generated by Designer and will be overwritten every time Designer decides it should.
Hope this helps.
|
|
|
|
|
Hi
I'm creating ActiveX controller using VC++.Net and being used in C# windows application. I was able to ceate Setup Deployment project and was able to register the ActiveX control automatically (by enabling property Regiter as vsdrfCOM )while installing the setup anywhere and any machine. This all went very well in Visual Studio 2003.
I have upgraded the whole project into Visual Studio 2005 and enabled same option toregister the ActiveX control it is not registering by default. If ig go register it by using regsv32-i it is working. What should i do to make it aoutomatic registration while istalling it. That is in Visual Studio 2005.
|
|
|
|
|
HELLO,
I want to fire an event in c# after a certain amount of time let's suppose 5 seconds. How is it possible? Please remember I don't want to refresh page every time. Waiting....
Regards,
Abubakar
|
|
|
|
|
Hello,
Use a timer!
Like System.Windows.Forms.Timer with the "tick" event.
Make sure that this timer class fitts your needs, as there are many more available.
Abubakarsb wrote: Please remember I don't want to refresh page every time.
What is the connection to the timer question?
All the best,
Martin
|
|
|
|
|
I want to use it in asp.net, I mean for web project not for desktop.
|
|
|
|
|
c# will be running on the server, not the client.
You'll need some kind of client side javascript timer
Russell
|
|
|
|
|
So can anyone of you send me code in javascript in which i can fire an event defined in C# after a certain amount of time after page has been loaded?
|
|
|
|
|
<script language="Javascript">
<!--
var lengthOfTime
var id = null
var running = false
function Setup()
{
lengthOfTime = 5
Stop()
}
function Stop()
{
if (running)
clearTimeout(id)
running = false
}
function Start()
{
if (lengthOfTime == 0)
{
Stop()
}
else
{
--lengthOfTime
running = true
id = self.setTimeout("Start()", 1000)
}
}
</script>
All you need to do then, is to put the following in your code <body on Load="Setup()"> and trigger your item by calling the Start() function. Note that you will probably want to use a mechanism such as Ajax to actually trigger the C#.
(BTW remove the space between on and Load.)
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi
Could anyone tell me how to get a default value for a combo box in C#.
Keshav Kamat
India.
|
|
|
|
|
In Page Load event put.
<br />
PubicMyString = textbox1.Text<br />
You will find in the InitializeComponent() event the value is set by code as shown below.
private void InitializeComponent()<br />
{<br />
.<br />
.<br />
.<br />
<br />
this.textBox1.Text = "ThisISDefaultText";<br />
<br />
.<br />
.<br />
.<br />
}
Grady Booch: I told Google to their face...what you need is some serious adult supervision. (2007 Turing lecture)
http:\\www.frankkerrigan.com
|
|
|
|
|
Hey thanks Frank.
Got it. I knew a long procedure, to have a default value. This thing is the most efficient one that I found till date for the purpose.
Thanks once again.
Keshav Kamat
India
|
|
|
|
|
Hi,
I have a weird problem. You can color a button by button.BackColor = ....;
In the design window I see the colored button, but when I will simulate the program, the buttons are just gray (default). Is it cause of WindowsCE?
I can color the form or change the font of the text in a button, but I can't color a button.
Thanks in advance
|
|
|
|
|
check the appearance property of button it might be set on System
|
|
|
|
|
At the properties window, I don't see something is set on System. The following things are there:
-Appearance
+Font
Text
-Behavior
...
...
...
but nothing else what is set on System
|
|
|
|
|
Hi guys,
I needs some help with this challenge I'm facing please.
This is my challenge:
I have a string with "parent object" and item in the format of pipe delimited between "parent objects" and comma delimited between items. Like this
string sample = "Object1,Item1,Item2-Object2,Item1,Item2-Object3,Item1,Item2";
How will I go about manipulating the string to use the "objects" and items in this format.
I basically need to get the "object" and the items and in some cases I will need to work with one entire entry at a time, lets say Object1,Item1,Item2 .
I am not to familiar with the System.String functions yet and would love if anybody around here could show me how this could be done or possibly some references.
Thanks.
R
|
|
|
|
|
Hi
I have added comments for each line. Hope it helps you.
string StrObjectItems = "";
StrObjectItems = "Object1,Item1,Item2-Object2,Item1,Item2-Object3,Item1,Item2";
string[] StrObjectsArray = StrObjectItems.Split(new char[] { '-' });
for (int i = 0; i <= StrObjectsArray.GetUpperBound(0); i++)
{
string StrObjects = StrObjectsArray[i].ToString();
string[] StrItemsArray = StrObjects.Split(new char[] { ',' });
for (int j = 0; j <= StrItemsArray.GetUpperBound(0); j++)
{
string StrItems = StrItemsArray[j].ToString();
}
}
-- modified at 5:23 Tuesday 6th March, 2007
Rate this message. Thank you. Harini
|
|
|
|
|
I don't see any pipe (|) characters in the string. I suppose that you mean that the parent strings are delimited by a dash (-).
To get the parent string in an array, split on a dash:
string[] parents = sample.Split('-');
The property parents.Length will give you the number of strings.
To get the child strings of a parent, split it on a comma:
string[] children = parents[0].Split(',');
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks to both of you that replied.
It all makes sense now.
Thank you once again!
R
|
|
|
|