|
For the interested ones, I found a solution:
<br />
Type t = Type.GetType(typestring);<br />
object o = Activator.CreateInstance(t); <br />
This works, if you serialize the type on saving with GetType().ToString().
|
|
|
|
|
Hello!
I think it's a simple question, but i don't know where to start looking for the answer... I have a program which launches several processes. But, i don't want the program to launch a process if the application (the one the process is supposed to launch) is already running. My problem is checking whether the process must be launched or not. I thought searching the Task Manager, but i have no idea on how to get there.
Thanks a lot!
|
|
|
|
|
string processName = "MyProcess1";
Process[] processes = Process.GetProcessesByName(processName);
if(processes.Length > 0)
{
}
else
{
Process.Start(@"c:\MyProcess1.exe");
}
|
|
|
|
|
hi all i try to use tree view in my application but it didn't display the tree insted it display simple text like
Master1 Detail1
Master2 Detail2
i am using IE 6...Here is my code...what's wrong with my code...
TreeNode nodeProdDetail, nodeProdMaster;
nodeProdMaster = new TreeNode();
nodeProdMaster.Text = "Master1";
nodeProdMaster.ID = "1";
nodeProdDetail = new TreeNode();
nodeProdDetail.Text = "Detail1";
nodeProdDetail.ID = "1.1";
nodeProdDetail.NavigateUrl = "SomePage.aspx";
nodeProdMaster.Nodes.Add(nodeProdDetail);
Treeview1.Nodes.Add(nodeProdMaster);
nodeProdMaster = new TreeNode();
nodeProdMaster.Text = "Master2";
nodeProdMaster.ID = "2";
nodeProdDetail = new TreeNode();
nodeProdDetail.Text = "Detail2";
nodeProdDetail.ID = "2.1";
nodeProdDetail.NavigateUrl = "SomeOtherPage.aspx";
nodeProdMaster.Nodes.Add(nodeProdDetail);
Treeview1.Nodes.Add(nodeProdMaster);
ayyp
|
|
|
|
|
Hello Dear all
please help me how we can implement download functionality in windows based application project.
thanks
|
|
|
|
|
Hello
Depends on what you are trying to download -P2P, Http, ftp, etc...-
I'll assume you are trying to make a download accelerator like program!! Well, if so, try This article as a start[^]
Regards
|
|
|
|
|
Hello Friend
yes you are right i want to create a windows application like download accelerator in C# if you have any idea then how can i do the download file functionality then please tell me
thanks
|
|
|
|
|
|
How to add context menu in OUTLOOK "Preview Pane" ?
I mean IN the area where the subject, from ,to etc has been displayed..
"You can do any thing you set to your mind" - theGhost_k8
|
|
|
|
|
Hello
I've never worked with it before, but doesn't it have a Right click event?? If it has you can handle the event and check the MousePosition property relative to your control's location.
Regards
|
|
|
|
|
well thats the problem... no such event as far as my knowledge is concerned..
well i think u have not understood the question .. Preview Panel ... do u know na?
"You can do any thing you set to your mind" - theGhost_k8
|
|
|
|
|
Sorry!! Never used it before.
Regards
|
|
|
|
|
Hi,
I need help from anyone.
I have a datagrid, in that one column (Check boxes) is created by using item template.
I have two buttons beside to datgrid.one is up and another is down.
now my task is, after selecting a record in the grid, If click on the up button record should be moved up, if I click on down button record should be moved down.For the first record up button shoud not work. For the last record doen button should not work.
Please send me the code.
Thanks in advance.
|
|
|
|
|
Hello
Pinnapureddy wrote: Please send me the code.
It's not approperiate to ask for how the answer is posted this way. Maybe you declare that code snippets are preferable, but almost no one will post you "The code"!!
Now, to your issue. There many approaches to solve it. One is to make a column at the begining of the grid. You may cal it "Order". Now make that column invisible and store the order you want the columns to appear with in these cells. Sort the Grid according to that column.
When the user clicks up, swap the order value of the selected row with the one above and resort. When the user clicks down vice versa.
Before changing the values, check if order = 0, or order = MaxValue. If so, return without doing anything.
Regards
|
|
|
|
|
hi,
Thank you for your reply.
|
|
|
|
|
Hi,
using VS2005;
I have successfully setup Crystal Reports but only if I create a new oledbconnection using the Crystal Reports Database selector.
When I select a table in the Database Selector from an available Project Data -> ADO.Net DataSets -> dataset -> table I can chose the columns etc BUT when I run the program the report only shows the column names and not the actual data.
I presume I need to load the data into the reportviewer but I can't figure out how and nor can I find any help here or on the net.
Glen Harvy
|
|
|
|
|
Hi All!
I try to understand and improve my application cold start.
I already load as little as possible in the Main().
Now I have a test which gives strange results, and I try to understand what it means.
test 1:
====
I reboot, launch a small .NET executable, which takes 7 seconds, and launch my application, which takes 30 seconds.
test 2:
====
I reboot, launch my application, which takes 70 seconds.
Now this doesn't add-up, why?
Any idea what's going on?
I'm thinking to write a small "QuickStart" application which "initialize" everything. How should it work?
|
|
|
|
|
Super Lloyd wrote:
Now this doesn't add-up, why?
That's probably because most of the .NET framework runtime code was loaded in the cache when you launched the first .NET application. That still doesn't explain the 40 second drop though.
OTOH, 70 seconds to launch an application ? What does your application do to take such a long time to startup?
|
|
|
|
|
Warm startup is only about 2 seconds...
So ... I don't know ...
I don't do much!
|
|
|
|
|
|
uh.. intel something IIRC. 32 bits, .NET2, 1GB of RAM.
IT tooks a long while to load "simple classes" (well the most complicated does refer to a lot of other types but NOT that many!)
I suspect that one of my problem is an auto-generated ManagedC++ wrapper around some ObjectiveC API. The top level object class has a few hundreds methods! and each class is very big and there are quite a few object!
But the fact is, I just use a few of them...
|
|
|
|
|
You could try measuring the TimeSpans...
Then you can see what actually takes so much time...
I've found a living worth working for, but I haven't found work worth living for.
<marquee>
|
|
|
|
|
I have a DLL written in C++ (VS6) that has some interfaces in it.
I want to implement these interfaces in C#.
how do I create a class in C# that derives from a class in C++ that is in a DLL ?
|
|
|
|
|
How do you mean, interfaces ? C++ does not support interfaces in the C# sense.
You NEED to derive from the class directly, not just reuse the same method names ? Then you need to rewrite the class using C++/CLI ( that is, VC++ 2005 ). VS6 is not going to give you any joy here - you can call VC6 COM objects in C#, but you're going to see an interface only, no classes you could hope to derive from.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
VS2005 Express Edition:
I made a little class with an ManagementEventWatcher object (called myManagementEventWatcher) inside as an private member.
All works fine till I close my application (which uses my little class) and I receive an System.Runtime.InteropServices.InvalidComObjectException. The exception helper says:
COM object that has been separated from its underlying RCW cannot be used.
May be It's cause is that I placed myManagementEventWatcher.Stop() in the destructor of mij little class? But honeslty I don't really know wherelse te place that line of code?
Can someone help me please? Or give me some advice?
Thanks a lot!
|
|
|
|