Answer Questions
mbr_rptusr Integration with Explorer Search?
Hi Does anybody know of a way to interact with the built-in search function in the Windows File explorer. We have en inhouse application in which we would like to be able to search through some files, doing content search much like Explorer does it. Is it possible from within c# to call an api that exposes this functionality Best regards Anders It's suggested that you do not write shell extensions (Windows Explorer extensions, etc.) in a managed language like C# or VB.NET. For details see http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=125283&SiteID=1 and http://blogs.msdn.com/oldnewthing/archive/2006/12/18/1317290.aspx . Hi Peter. I'm not sure i have explained my purpose clear enoug ...Show All
S_Mayu Shutdown.exe problems
Process shutdown = new Process(); shutdown.StartInfo.FileName = "C:/WINDOWS/System32/Shutdown.exe"; shutdown.StartInfo.Arguments = "-s -f -t 20 -m \\deruu"; shutdown.Start(); I can get it to log me out using argument -l only, but with that I only get a "Frozen" cmd window titled "Shutdown.exe" and nothing happens. try this: Process shutdown = new Process("shutdown"); shutdown.StartInfo.WorkingDirectory = Environment.GetFolder(Environment.SpecialFolder.System); shutdown.StartInfo.Arguments = "/s /f /t 20 /m \\deruu"; shutdown.Start(); you may want to try to take out the /f switch just in case and see what happens, it could be the fact ...Show All
BJ Custard CursorConverter Error
I am getting the following Error very often.. "CursorConverter' is unable to convert 'System.Windows.Forms.Cursor' to 'System.ComponentModel.Design.Serialization.InstanceDescriptor" Also that when i tried to rename a control (which is copied from the same screen) i will get the error - "property name is not valid" and details part of the error shows the reason as same as above error... i checked and there is no redundant references... can anyone help Thanks in advance. The CursorConverter error... do you know where in the code that is happening If so could you paste that area for us so we have a better idea of what you are doing Am using VS 2005 Pro Edition versi ...Show All
efriese Make stand alone exe
I posted this in one of the visual studio 2005 forums and someone suggested I try posting it here. In Visual Studio 2005 is there any way to actually make just a standalone exe file, like in visual studio 6.0 where you just go to Build or Make EXE or something similar All I can find is the publishing section which creates a setup.exe which then "installs" the program and checks for updates etc. I just want to make one exe file that can be run from any PC anywhere that you just double click and away it goes, straight into your program, in visual studio 6.0 this was no problem at all yet I have spent hours searching and am still unable to do this in VS 2005. Thanks yer I can understand that but still I dont understand wh ...Show All
13117 How to find the folder or file path dynamically?
Hi.. I needed to access the folder name in which the user has selected. For this i tried the FileInfo method. This is the code i tried: FileInfo fi1 = new FileInfo (path); txtDocName.Text = fi1.Name; But i need to get the path of the folder or file which the user selects. so here i cannot pass the path as static one. How to provide the folder or file path dynamically Musafir wrote: I have a small query in context menu. Here if i do the registry changes, it affects in my machine ,rite. If i am going to deploy my application in some other machine, what should i do to get the context menu Seriously, did you actually read the article provided by Geert Hell, if you want I can ...Show All
hrubesh copying a windows folder structure to sql server
Has any one coded some thing that copies a windows root folder structure to sql server Thanks a lot That wont be that tough to do, I suppose the most important question is why are you doing it no ross you re right. i m not sure this is the best way especially there will be no user. this script will run only one time by me on a specific rootfolder. The reason why i thought about sql was that I thought there is a way in sharepoint to upload things from sql directly to a site structure, but that doesn t seem to be the case. Any way i started doing that in sharepoint sdk as you suggested. let me know if u think of any easier way . waiting for your help. thanks amigo I i want to upload that structure to a sharepoint ...Show All
vtortola Thread.Sleep problem
I have a thread doing some work and sleeping for a certain amount of time and doing the work again. The time it sleeps is a specific length of time minus the time it takes to do the work. I found that it always sleeps a couple of millisenconds less than the time I passed to Thread.Sleep. Could some one give me some help on this Is there a formal assessment on the accurance of server based timer The Form based timeer has accuracy of 5ms. Server based timer is said to be "much more accurate", but i couldn't find a quantitive discussion. I looked into accurate timing before and the old solution was to use API calls such as QueryPerformanceCounter and QueryPerformanceFrequency. On the ...Show All
doug finke Long serial number.
Dear All, I have problem here with my long serial numbers. My length of serial numbers are in the range of 20 to 30 digits. So what I did i know that the database cant support that long of int so I kept in database as varchar. The problem now is that when I do a select from the database I need to group this serial number base on their number in terms of difference of 1. Ex. I have a list of serial say as below 12345678909999999991 12345678909999999992 12345678909999999993 444444489099999999913 444444489099999999914 So when I run the for loop I will store the first value that is 12345678909999999991 then compare with the next one that is 12345678909999999992 so the difference is 1 then compare the second value of ...Show All
worldhello "PInvokeStackImbalance was detected" error when opening Crystal Report Viewer
Hi, I am trying to load a crystal report using c#. My form has the CrystalReportViewer control on it. When the form is loaded, i get the following error: PInvokeStackImbalance was detected Message: A call to PInvoke function 'CrystalDecisions.Windows.Forms!CrystalDecisions.Windows.Forms. :: b' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature. It occurs in the InitializeComponent method, on this line: this.crystalReportViewer = new CrystalDecisions.Windows.Forms.CrystalReportViewer(); Any ideas on how to fix this error ...Show All
A.Carter Generic type parameter constraint is not enforced correctly
or at least it doesn't seems... Hello, I'm working on a weird but really usefull design that allows to write static methods in generic type using the type parameter. The type parameter is then infered, so the FxCop team told me it was a design that could bypass the DoNotDeclareStaticMembersOnGene ricTypes rule. To make it more understandable, here is a short code sample : public abstract class BaseGenericClass <T> where T : BaseGenericClass <T>, new () { private static T instance = LoadInstance(); public static T Instance { get { return instance; }} ...Show All
Sol of Solitude Working with Public Folder Data on Exchange 2003 Server in c#
Hello everyone, I'm currently trying to write a windows service application that deals with data in the public folder of an exchange 2003 server using c#, there seems to be some documentation about doing this in visual basic with older versions of exchange and CDO (which I believe needs to be used in this case). I don't know vb, but that aside they are articles from 1999 so they probably are out of date and I was wanting more recent documentation using c#. This has me really stumped, so if any one could help or lead me in the right direction I would greatly appretiate it. Regards, Bevan ...Show All
Andy Ventura Inheritance Bugs in Windows Forms
I'm using the Visual Studio 2005 to do WinForms development and have been repeatedly running into problems with inheritance. What happens is that sometimes when I override methods in a base class the override isn't called - but the base class method is called instead. I've verified repeatedly that the code is correct, the method signatures match, and the override should be called (polymorphically) rather than the base class method - and yet it calls the base method instead. I haven't seen in in none Form-based classes so far, but I've seen it several times in specialized Forms that I've created. In each case, the problem is the same. The base class method is invoked rather than the override method. It appears to be a bug in the compiler. N ...Show All
apaspula Conditional References
I probably named my thread wrong, but I didn't know what to call it. Basically, I'm making an application which interfaces with various media players. To do this, I reference and use each media player's COM library/interface. This all works fine, however, to use the COM the user must have the specific media player installed. So theoretically, at the moment, for someone to use my application they would have to have all media players supported by my program installed, this is a major downfall. So I was wondering if there was a way to conditionally 'reference' these COM interfaces, in such a way that I can ask the user which media player(s) he would like to support and then use those interfaces, therefore avoiding a problem ( Or I can also si ...Show All
Derek Comingore security error
i am developing an application with c#. i want to put exe file to a server that clients can run i. installed instance in server work properly when run in server but when i run it from one of clients, this error raise : request for the permission of type system.security.permission.securitypermission, mscorlib, version=1.0.5000.0,culture=neutral,publickeytoken=b77a5c561034e089 failed. my database is sql server. Galin Iliev wrote: you probably are trying to execute application from network share. Everything that are not on local machine is evaluated with limited permissions take a look at http://content1.skillsoft.com/contentLIB4/cm/230981_ENG/summary.htm hope this helps how can i configure my ...Show All
lax4u How to get returned String Array from C++ based DLL while called in C#(P/Invoke related)?
Hi, I am a newbie in this forum. I want to use VC++ to develop a dll and integrate it in C# I searched internet and get some information from MSDN. But I still don't know how to return a string array from dll to C#. Like this: in C++: extern "C" __declspec(dllexport) int myFunc(char *** varTemp) { *varTemp = new char*[10]; for(int i = 0; i < 10; i ++) { (*varTemp)[ i ] = new char[20]; ::strcpy((*varTemp)[ i ], "My Test"); } return 10; } in C# [DllImport("MyDLL.dll", EntryPoint="myFunc")] public static extern int myFunc(....); What shall I use to replace "...." Thx Don't think I've ever replaced a cha ...Show All
