Andrey Makarov's Q&A profile
Visual C# How to do a file search?
Hi, I would like to ask how can I implement a file search on a local or network drive I have read about implementing a recursive search. I would also like to use wild cards too. Once the program is done, it should have the same functions as “Windows Search Companion”. Is there any API available for doing search Any suggestions or code examples will be wonderful; I am fairly new to C#. Thank you very much! Here is a recursive function to find files based on a given file mask. You will have to modify it to do exactly what you want but it is a start..... static void search(String path, String pattern, bool printFiles) { String[] dirs = System.IO.Directory.GetFiles(path,pattern); String ...Show All
Visual Studio Tools for Office Toolbox weird behavior!!! - My Solution
I am using VSTO 2005. I am working on an Excel Template. Suddenly the toolbox becomes disabled and prevents me from adding controls to the Excel sheet but it is enabled in regard to the taskpane. I reinstalled VSTO and it was enabled but now disabled again. Do you have any idea this is very urgent.... Thank you........ Hello, I thought I would add how I fixed this problem, and what I suspect might have been the cause. As everyone else, I had the same problem and it occured after I created a setup project for my VSTO Excel Application and then tried to test it on a computer with Visual Studio and VSTO currently installed. Every computer that I tested my project on, subsequently, had this prob ...Show All
Windows Forms Can I unsign a ClickOnce manifest
Without breaking the projects and having to reinstall the app. ClickOnce doesn't have an option for you to unsign the manifest. You can only create a new manifest with the same attributes and not signing it. May I ask why you want to unsign the manifest Thanks, Patty ...Show All
Software Development for Windows Vista Is the method "WorkflowInstance.Load" required?
Hello, Do I need to call the method " Load " of the WorkflowInstance class myself, or will it automatically be called when I use the method " RunWorkflow(instanceID) " of the ManualWorkflowSchedulerService I tried both possibilities and did not see any difference in result... Also, I cannot find any documentation about this topic. The only information I found was WHAT the method " Load " does, but not WHEN it's needed. Thank you for you time! Most likely what you're seeing is that the instance, if it isn't already in memory, is being loaded when the message is delivered to it (we have to have an instance in memory to deliver messages to it). It's already in memory s ...Show All
SQL Server Frauds of Test King and other Brain Dump Sites
I need help for done MCP SQL server exam. I want question & e-books. Microsoft has already filed a case against www.testking.com. There are more than 400 sites related to this site only. If you want to know the people behind this site, visit the the following site and know welll before purchasing any thing from such sites: http://tainapublication.netfirms.com I hope this would help the people from wasting their money and brains. Taina ...Show All
Visual Studio Tools for Office Invoke Word Document from C#
I've created a Word Document project that allows me to find and replace a set of values within the document, what i would like todo I call this from something like a winform Button event and pass it a DataSet as a parameter so that i can find and replace with the correct data. Is this possible or am i only limited to Word Documents with C# code and word plugins Any help would be really appreciated See if this discussion thread helps :-) http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=462998&SiteID=1 ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Custom GameComponent properties greyed out in designer
I created a custom game component which represents a sprite and has three properties. private Vector2 position; public Vector2 Position { get { return position; } set { position = value; } } private Color color; public Color Color { get { return color; } set { color = value; } } private string filePath; public string FilePath { get { return filePath; } set { filePath = value; } } The problem is, in designer mode, I can only edit the FilePath. The Color and Position properties are grayed out. picture My guess is that the designer doesn't have access to Vector2 and Color because they arent included in the 'using' statements. What's the best way get this working For the color you might want to try some ...Show All
Visual Basic possible to automate ms word if Ms word is not installed?
Is it possible to automate a Ms word file using vb.net while there is no Ms Word installed on tat pc It means you need to provide some other way to generate a report that does not require word. Then, you can fall back on that lesser quality report if Word is not present, as you can't use it if it is not there. ...Show All
Visual Basic Kill Thread upon exit
Hello all, I have an app that starts a thread running upon the push of a button. That thread opens a server socket and listens for incoming clients. When I kill the app by hitting the X on the form it closes with no problem. But when I resart the app and I hit my thread start button again it gives me an error. I have to ctrl-alt-delete, find the process and kill it. Then I can restart the app and the thread without a problem. So for some reason when I close the app my server thread does not die with it. Can someone shed some light on how to make all processes that this app starts die when it is closed Any help would be appreciated. Hi Try setting your threa to run in the background eg dim t as new th ...Show All
Windows Forms Designer Fails to Show From after VS 2003 Port - Problem Fixed!!!!!
Original Problem: After porting a project to VS 2005, the designer fails to show the forms in my project. When I try to view the designer, I get Object reference not set to an instance of an object How do I fix this Is it possible that the resx files are corrupt Can I regenerate them ------------------------------------------------------------ Solution The problem was solved. It turns out that one of the project wide language resx files (we have four) had a slightly different format than the other project wide language resx files. When we made the resx files consistent, the designer worked. The individual form resx files were ok as is. I gue ...Show All
SQL Server View 'order by' not working
Hi there, I have a view created using the following code. The view works perfectly but does not order by the name column as I've asked it to do. In the view designer if I click on execute then the order is applied but if I save the view and run it externally (i.e. in an ASP page or within the management terminal) it does not order correctly and seems to order by the Id column. Any help would be much appreciated. Here's the code: SELECT TOP (100) PERCENT dbo.Members.DivisionID, COUNT(*) AS Members, dbo.Country.Name FROM dbo.Members INNER JOIN dbo.Country ON dbo.Members.DivisionID = dbo.Country.CountryID AND dbo.Members.CountryID = dbo.Country.CountryID GROUP BY dbo.Members.DivisionID, dbo.Country.Name ORDER BY dbo. ...Show All
Visual C# Buried Panels
I have a usercontrol that has 5 panels of different dock and size... I want to add a a "main" panel ....to contain all these panels...can't seem to select and maintain zorder...among other things. When you have the form designer open, select View|Other Windows|Document Outline. That opens a window within which you can drag the various form items to change their parents and/or z-order. ...Show All
Visual Studio 2008 (Pre-release) How to handle a collection of Words in a FlowDocument
I would like to develop a richly interactive FlowDocument or RichTextBox. Some examples of what I would like to do are Fire events when a user navigates (either with mouse or keyboard) to beginning or end of a word in the Document. Fire events when a user modifies a word, such as deleting a word, shortening a word, or lengthening a word. as is, the Document class does not provide a Words collection. Overall, i've found manipulating a RichTextBox to be very difficult in terms of reading what text is actually in the RichTextBox and responding to events at the Inline, block or Run level. Any guidance would be appreciated With some code, you can read words in a FlowDocument. I posted a code snippe ...Show All
.NET Development WSE 3.0 and Kerberos with Windows Forms Client?
Hi. I'm trying out the QuickStart samples from the WSE 3.0 crew. I got them installed on my Server 2003 machine, logged on with my laptop and it works, with the ASP.NET client. But when i try the Windows Forms client i get this error message (same policy settings): System.Security.SecurityException: WSE594: InitializeSecurityContext call failed with the following error message: There are currently no logon servers available to service the logon request. at Microsoft.Web.Services3.Security.Tokens.Kerberos.KerberosClientContext.InitializeContext(Byte[] inToken) at Microsoft.Web.Services3.Security.Tokens.Kerberos.KerberosClientContext.InitializeContext() at Microsoft.Web.Services3.Security.Tokens.KerberosToken..ctor(String ...Show All
Visual C# What is the maximum literal address for a local file?
I thort it was 255 but when tried I found it only == 248 CHAR full LITERAL filename & path string length!!! How do I determine what the user can enter before submitting it to the OS as the intended filename Yup thanks Peter they use a literal so I can too but I need to find out how much of that literal has been used up so far, any ideas on how I should do that ...Show All
