|
Check your task manager. I suspect that Calc is being started up "invisible" under the Network Services user account.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
You are correct, sir. Thanks. The examples, of course, didn't mention this possiblity.
Now to do something more useful.
only two letters away from being an asset
|
|
|
|
|
You're welcome. Those examples, they're really great aren't they?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hello. I have this class that overloads the comparisson operator (== ). It is throwing me an overflow exception:
public class DataItem
{
private int _id;
...
public static bool operator== (DataItem item1, DataItem item2)
{
if (item1 != null && item2 != null)
return item1._id == item2._id;
else
return false;
}
public static bool operator!= (DataItem item1, DataItem item2)
{
return !(item1 == item2);
}
...
}
The problem is that in the operator== method, I validate that both items are not null, but (because of the comparisson of the object to null) it calls again the operator== method. So it seems that I cannot validate whether the objects are null or not. Anyone has an idea of what can I do about this?
Thanks in advance.
Hope is the negation of reality - Raistlin Majere
|
|
|
|
|
|
Thanks!
Hope is the negation of reality - Raistlin Majere
|
|
|
|
|
i have a datagridview on a form the single operation i want is that when the data displayed on the gridview the gridview.enabled command must be false but i want the scroll bars to be active i have done the following code
datgridview1.enabled = false; but it also locks the scrollbars both vertical and horizontal i want that this must be active
sas
|
|
|
|
|
As you can see it doesn't work that way. What is it you are trying to accomplish?
only two letters away from being an asset
|
|
|
|
|
the problem i wanto solve is the datagridview must be locked but its vertical and horizontal scroll bars must be active
sas
|
|
|
|
|
What do you mean by locked? Don't allow the uses to edit it then.
only two letters away from being an asset
|
|
|
|
|
sir dont u understand my qestion its simple i have written the following code
datgridview1.enabled= false;
the problem is that the scroll bars are also disabled i want the scroll bars to be active
sas
|
|
|
|
|
sajid.salim.khan wrote: dont u understand my qestion
Apparently not.
Again, what is the desired outcome you are looking for? Do you want to display the datagrid to the user with the ability scroll, but without the ability to edit records?
If this isn't what you want, perhaps you need to take a few moments to think about it, and describe your problem better.
only two letters away from being an asset
|
|
|
|
|
I you want to display the datagrid to the user with the ability scroll, but without the ability to edit records
sas
|
|
|
|
|
Then don't put it in edit mode How much simpler can it be? What don't you understand?
only two letters away from being an asset
|
|
|
|
|
I look over some projects in CodeProject about creating FolderViev, FolderTreeView etc. in An "Explorer Style" and I see everywhere are used shell operations. Is that the only one way to do controls like this? Isn't there any simple method? Does C# and .Net provide owns classes and methods including shell instructions, or I have to write it always myself? And I have one mor questions: Is there any reason that everybody use shell to manage folders instead of using such C# classes like Directory[info], File[info] and others classes included in System.IO namespace?
|
|
|
|
|
Don't cross post in multiple forums.
Krecik_PL wrote: and I see everywhere are used shell operations. Is that the only one way to do controls like this?
What operations?? Perhaps you could point to an example?
Krecik_PL wrote: Isn't there any simple method? Does C# and .Net provide owns classes and methods including shell instructions,
Yes, everything under the System.IO namespace. But that also depends on what you mean by "shell instructions".
Krecik_PL wrote: Is there any reason that everybody use shell to manage folders
Because that "everyone" doesn't know what they're doing.
|
|
|
|
|
First of all I am sorry for crossing post. My mistake...
Dave Kreskowiak wrote: What operations??
For Exmaple Extracting icons from file system. I know there is System.Drawing.Icon.ExtractAssociatedIcon in .Net class but it takes icon only from file. What with folders and such virtual folders like "My Computer", "Desktop", disks, CD-ROM's etc? In article "C# File Browser" or "FilesListBox" autors use the shell to do this. Is there any other way?
Others samples are for expamle DragAndDrop support or System context menu used in Windows Explorer.
Dave Kreskowiak wrote: Because that "everyone" doesn't know what they're doing.
Saying "everyone" I don't mean all programers, but autors of some articles I look trough. Want you say that using the shell in C# is bad idea in some implements??
-- modified at 14:15 Monday 1st October, 2007
|
|
|
|
|
Krecik_PL wrote: For Exmaple Extracting icons from file system. I know there is System.Drawing.Icon.ExtractAssociatedIcon in .Net class but it takes icon only from file....Is there any other way?
The article you're talking about uses the Shell's API, not shelling out to another process, to grab the icons. No, there is no other way to do this.
Krecik_PL wrote: Dave Kreskowiak wrote:
Because that "everyone" doesn't know what they're doing.
Saying "everyone" I don't mean all programers, but autors of some articles I look trough. Want you say that using the shell in C# is bad idea in some implements??
I said this because I thought you were talking about shelling out to the command prompt to do things like rename files, copy files, doing whatever to files.
You didn't say anything about grabbing icons from anywhere.
|
|
|
|
|
You have right - I don't specify precisely my question - Shell's API is more adequate then shell instructions. I thought about more advenced operations provided by Shell's API to manage Windows namespaces.
Thanks for the answers...
|
|
|
|
|
I want to create a kind of active folder or a drive in such a way that when user selects it, instead of showing the files and folders inside it, it should load my dll or my com component. My dll should be able to provide the contents. I want to show some database collections and objects inside those collections.
This should be ingrated with the Windows file system so that whenever user selects the folder either from explorer or by any other means, my dll should be called. Also when user selects any other folder or file that is inside that folder, windows gives control to my dll with the name and properties of the selected object. My component should be able to take the appropriate action.
Thanks a ton
Nish
Nish
|
|
|
|
|
Just the fact that you're posting this question says you don't have the requisite knowledge to even start a project like this.
Ahhh! The wonders of the installable file system[^].
Forget writing this in C#. You'll be writing Interop code 'til your brains fall out.
|
|
|
|
|
You may be right but believe me Sir, I have achieved much more in my life. I never handled anything related to manipulating the file system. In this case too I will find the answer doesn't matter you help me or not. Thanks for the link.
Nish
nothing
|
|
|
|
|
If you are only looking to extend the Windows Explorer then you can check out Shell namespace extensions: here[^] and this commerical product[^].
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
In my code I create three combo boxes, and store them in an ArrayList. So:
myArrayList.Insert(0, new System.Windows.Forms.ComboBox());<br />
myArrayList.Insert(1, new System.Windows.Forms.ComboBox());<br />
myArrayList.Insert(2, new System.Windows.Forms.ComboBox());
I then add each of these comboboxes to my form; at the same time, I bind each of them to a shared data source and a shared event handler:
<br />
myForm.Controls.Add((ComboBox)myArrayList[0]);<br />
((ComboBox)myArrayList[0]).DataSource = aComparisonList_Strings;<br />
((ComboBox)myArrayList[0]).SelectedIndexChanged += new EventHandler(cmbComparison_SelectedIndexChanged);<br />
<br />
myForm.Controls.Add((ComboBox)myArrayList[1]);<br />
((ComboBox)myArrayList[1]).DataSource = aComparisonList_Strings;<br />
((ComboBox)myArrayList[1]).SelectedIndexChanged += new EventHandler(cmbComparison_SelectedIndexChanged);<br />
<br />
myForm.Controls.Add((ComboBox)myArrayList[2]);<br />
((ComboBox)myArrayList[2]).DataSource = aComparisonList_Strings;<br />
((ComboBox)myArrayList[2]).SelectedIndexChanged += new EventHandler(cmbComparison_SelectedIndexChanged);<br />
When the user chooses an item in the first combo box control, the SelectedIndex changes for ALL THREE CONTROLS. That's not what I want; I just want the three controls to share a datasource and an event handler. What am I doing wrong?
|
|
|
|
|
I don't think you will be able to share the data source like that. I believe datasources have a single "current record", which all the combo boxes are going to show. So if you change one, then the others will reflect that change also. This is typically the desired behavior.
What is the type of your data source? You may be able to Clone it to get around this problem.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|