|
I mean Processes from the OS. SystemProcesses.
When I look
to the Task Manager I can not say wich from the
Processes are from Windows. I think it can be usefull
when you search for a Virus. A virus left a Process. When
those from Windows are in a different Color, to me they are
excluded cause they are friendly..
Hope you understand what I mean.
|
|
|
|
|
Hi,
I'd like to put all my strings in a single file, even the error or warning messages that i show to the user, so i can translate my program safelly. How can i do it? Should i use resource files? If so, how do i use them in C#?
Thank u very much,
Dirso
|
|
|
|
|
I recommend you to search MSDN for
"Localizing resources" topic. Especially, take a look at this article:
"LocalizedHelloWorld Sample: Demonstrates Satellite Assemblies for Console Applications"
Robin Panther
|
|
|
|
|
Can there be different JIT compilers for different machines like
applemac etc.
ihtesham
|
|
|
|
|
|
Hi there ,
I have a question on message loops when you create a windows application in c#. Basically after you have created the windows application project , you would notice that there is a Application.Run(new Form1()) line in the main() method of the Form1 class.
I understant that the above line starts a message loop for the form.
My questions are :
1. Is this needed so that the form can continue to receive keyboard and mouse events ?
2. Can only certain classed be used as arguments in the Application.Run(param) method ?
3. If its a message loop doesn't it block the thread ?
Any references to how it was done in the older days for windows programming is welcome.
Thanks,
Alok.
|
|
|
|
|
akarwa wrote:
1. Is this needed so that the form can continue to receive keyboard and mouse events ?
Yes: actually, any window message, as WM_SETTEXT or WM_PAINT, too.
akarwa wrote:
2. Can only certain classed be used as arguments in the Application.Run(param) method ?
The "param" you're mentioning, is just the form the Application.Run method will keep monitoring while it runs the message loop. As soon as the form "param" closes, the Application.Run call will return. You can have as many Application.Run() calls you may want (only one at a time, sure), and can even not pass any form to it, and the message loop will run until Application.ExitThread is called.
akarwa wrote:
3. If its a message loop doesn't it block the thread ?
Yes - aynthing that needs to be run on this thread will only be processed in a response to a window message, e.g., a button click.
Yes, even I am blogging now!
|
|
|
|
|
Hi all
I have created a custom control with three properties. Two integers and one object (an object with two boolean properties).
I have added the control to the toolbox, and it works fine. I can add the custom control to a Form without errors.
My problem is, that only the integers appears normally in the property editor (i.e. i can change their values).
The object property appears in the property editor but is greyed out.
I whant it to appear the same way as for instance Size on a normal control. When you expand the size property the value properties of the Size object appears and can be edited.
Any ideas on how to accomplish this?
spif2001
|
|
|
|
|
Solved it myself.
All i had to do, was let my object inherit from System.ComponentModel.Component (stupid me)
sorry....
|
|
|
|
|
Hi all,
What is the easiest way to count the number of rows in a SQL query? I have been looking for a methode but wasn't able to find one?!
regards
Stijn
|
|
|
|
|
If you are firing SQL queary ,then there is no way to get the number of rows get selected.Untile you collect the records in Dataset.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
do u want the number of records the query fetches.
If yes, prepare the sql string like the one below
Selcet Count(1) as RecordNum, col2, col3.... from table_name;
here "Count(1) as RecordNum" will give you the number of rows.
Regards,
Jay
|
|
|
|
|
Hi,
I tried to query a SPS database with a string query.
My code is like this:
\\It needs slashes to turn \" into "
string sQuery;
sQuery="";
The result shows in a textbox is like this:
The question is how I can make the result looks the same in a xml file without the slashes?
I tried to use the result(sResult) to use loadxml method from XmlDocument but not succeed because there are slashes in the string.
XmlDocument doc = new XmlDocument();
doc.LoadXml(sResult);
Any help would be appricated!
|
|
|
|
|
Hallo,
I am using client activated objects in .Net Remoting, therefore the remote objects are destroyed when the lease has expired. But I want do destroy the objects for myself (or close the connection for myself)
Important is that I want to do this from client's side. The objects inherit from MarshalByRefObject so I tried to call RemotingServices.Disconnect(MarshalByRefObject). However these objects are only proxies. Because of this I get an exeption with a message similiar to this. A possibility is to call this method on server's side.
public void CloseConnection()
{
RemotingServices.Disconnect(this);
}
But this requires additional network traffic for a method call each time.
UnregisterChannel(TcpClientChannel) does not work as well, because already existing connections are not destroyed.
I am able to prevent the client from creating new connections, but not from closing already existing ones. Can anybody help me?
Thanks,
Björn
|
|
|
|
|
Dear Members
I have two questions, plz guide and oblidge
1). I populated the combo box by binding it with a dataset containing record of a user(i.e registrationNumber and userName). I set userName as the DisplayMember of combo box.
But when I tried to get the value of selected user by writing objCombo.SelectedItem.ToString() or objCombo.SelectedValue.ToString() or objCombo.SelectedText it returns me an object of DataRowView type and not the selected value. Plz guide how can I get the selected value? Plz also guide that is it possible that on selection of registrationNumber, I could get the userName against it?
2). How can I perform only the time manipulation through datetime object?
Regards
|
|
|
|
|
You can use Combo1.Text property to get the latest selected value from the list.
And suppose if you want to get the username after selecting the registration number, then you have write some logic to get it.
And what you really mean by time manipulation ?
Will you explain it little bit more ?
Sreejith Nair
[ My Articles ]
|
|
|
|
|
U are trying to get the selectedvalue of your combo while ur datasource is filling up. Change ur event handler to SelectionChangeComitted (only fires when user changes the cbo, not code induced changes, as when filling up the datatable ur are linking to).
If ur source table has the userName and the registration Number, then simply bind the displaymember to the username column and the valuemember to the registrationNumber column. Get the selected item info through Text and SelectedValue.
|
|
|
|
|
Hi,
I'm working on C# with foxpro database and I want to get type of field in a table of Foxpro database from C#. I also want to create a table in Foxpro database from C#.
Would you tell me How to do it? Thanks for your help.
Regard,
|
|
|
|
|
It is posible to embed a Win32 dll into .Net dll?
|
|
|
|
|
|
Yes. You can use Win32 dll's in your .NET dll. The idea P/Invoke is there to help you out. Please refer this link Interoperability
Sreejith Nair
[ My Articles ]
|
|
|
|
|
I'm afraid my question was misunderstood.
I did use the P/Invoke (and C++ Interop as well) to call some functions in Win32 dll, but when I want to run the program on different computer, I need to copy the dlls I called, to the same directory Where the .Exe resists.
There is any way do embed the dlls into the .exe?
My problem is security. I'm afarid that somebody will replace the dlls with his own.
Strong name isn't an option here, since the dlls are Win32 ones.
Thanks,
Yaakov
|
|
|
|
|
You Wrote :when I want to run the program on different computer, I need to copy the dlls I called, to the same directory Where the .Exe resists.
No. Each and every Windows operating system contain this Win32.dll file (excluding Windows 95. I think here it is Win16.dll) in it's System32 directory. So you don't want to copy the calling .dll. Refer using DllImport Attribute. Hope you understood.Please see that url that i attached in my last thread.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
sreejith ss nair wrote:
So you don't want to copy the calling .dll.
Hi.
I DO want to copy the dll, since it isn't a windows dll. it's a dll of some third party API. The program doesn't load without the dll in the running directory.
I'll repeat my problem to make it clear.
I use an external Win32 (i.e. not .Net) dll which contains function foo(). The dll isn't part of Windows. I'm afraid that somebody will place in the folder a dll with the same name, that contains some malicious function foo(), who do some evil job before he calls in turn to the original foo().
I thought I can avoid this, if I find a way to embed the called dll in my application.
I'm open to another suggestion or information.
Thanks for your help.
|
|
|
|
|