dxpsteve's Q&A profile
Visual Studio Express Editions copy new files
I am new to VB express. I am trying to write some code to copy files from 3 different directories on a server to 3 different directories on a local HD but only copy files that are newer or do not exist. Can anyone point me to some code samples. thanks in advance I suggest you investigate My.Computer.FileSystem There you will find functions to determine if a file exists and functions and properties to determine the time (and date) when it was last written. Then all you need (in pseudo code) is: If Not FileExists then Copy the file ElseIf Destination_Date_Time < Source_Date_Time then Copy the file End If ...Show All
Visual Studio Tools for Office ItemAdd handler applied only to last Folder Processed...help!
I want to attach an ItemAdd event handler to each folder within the inbox. Here is the code... namespace OutlookAddIn1 { public partial class myAddin { private Outlook.Items myMailItems; private Outlook.Folders myFolders; private Outlook.MAPIFolder theInboxFolder; private void ThisAddIn_Startup(object sender, System.EventArgs e) { Outlook.NameSpace ns = this.Application.ActiveExplorer().Session; theInboxFolder = ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox); myFolders = theInboxFolder.Folders; try //HELP!!!!!! { foreach (Outlook.MAPIFolder _folder in myFolders) { //attach item event handler to every folder myMailItems = _folder.Items; myMa ...Show All
Visual Basic C# to vb .net (2005) help
help me to convert the following c# code in vb .net (2.0) do { while (bl_counts[--incrBitLen] == 0); do { bl_counts[incrBitLen]--; bl_counts[++incrBitLen]++; overflow -= 1 << (maxLength - 1 - incrBitLen); } while (overflow > 0 && incrBitLen < maxLength - 1); } what is the meaning of while loop without curly braces in c# awaiting reply. Thanks Javfarary If windowFilled = WindowSize Then windowFilled += 1 .... etc. (possibly using the updated value of 'windowFilled' Else windowFilled += 1 'updated regardless End If prefix and postfix operations do not depend on the condition you're testing. David Anton www.tangiblesoftwaresolutions.com Instant C#: VB to C# converter Instant V ...Show All
Visual C# Converting a string to int
I'am building a console program and need to convert a string that the user types to an int. If I use convert.ToInt32 a get the ascii code for the number but not the number it self. can anyone help me find a easy way to do this, if there is one :) I fixed the problem by doing it this way for ( int i = 0; i < str1.Length; i++) { if ( Char .IsDigit(str1,i)) { number = Convert .ToString(str1 ); if ( int .TryParse(number, out theResult)) { Console .WriteLine( "input string successfully parsed to Int: " + theResult.ToString()); } } } Thanks agin for your help Damon ...Show All
Visual Studio Team System Migrating Team Foundation Server workgroup to the full version without a product key
Hi, We've been using the workgroup edition of TFS since it became available (using betas and RCs before that). We've now purchased the full version, and are waiting for media to be delivered. The version that is on its way apparently doesn't have a product key because we are using volume licencing. I saw an MSDN article indicating that there was a way I could get a product key to do an update via the maintenance screen. Could someone tell me how I go about doing this Kevin Just tried this and this also works for upgrading from the Trial Version of Team Foundation Server to the actual Workgroup edition. The licensing support people at Microsoft should be informed of this because I was just ...Show All
Visual Studio 2008 (Pre-release) Custom Controls
I asked the question below in the Blend forum and was told I should ask it here instead. Ploease help. I have created a few custom controls for a project I am working on. The idea is that these controls can be used anywhere in the project. Back in the EID all I had to do was change to library from Framework to the name of the project and a list of my controls would be there. Then I couls just double-click and add them to my current xaml. I've noticed that in Blend I can use the Asset Library, click on User Controls and see my custom controls. However, how can I make these controls easily accesible to the develpers on my team through VS I tried adding them to the VS toolbox, but am unable. How can my developers use VS to add ...Show All
Visual Basic Accessing Windows Forms Class
I have found the following problem: 1. I have a Form1, which has a non-private constant named TestConstant. 2. I have a Form2, which on Load will retrieve the constant from Form1, using the syntax of Form1.TestConstant. 3. The compiler generates a warning about accessing constant via an instance. Most likely is caused by the default instance of Windows Forms. Any way to remove this warning (by accessing the class not the instance) Hi, have you considered something like using read-only shared variable instead of constant Public Shared ReadOnly TestConstant As String = "TestConstant" Andrej ...Show All
SQL Server SQL 2005 Server DDL Trigger Errors
Greetings! I've been working on a SQL 2005 project, and have really been excited about the new DDL triggers. I managed to implement some database-level DDL triggers successfully. However, I keep getting an error when I try to create a server-level DDL trigger. For several of the event groups, I keep getting the following error: Msg 1082, Level 15, State 1, Procedure tr_Server_Audit_Security, Line 44 "DROP_SERVER_ROLE_MEMBER" does not support synchronous trigger registration. I can't figure this one out for the life of me. Here's a sample of the trigger I'm trying to create (BTW, this code works for database triggers, with some slight mods of course): create trigger tr_Server_Audit_Security on all server for drop_server_role ...Show All
Visual Studio Express Editions How can I insert my program to the msconfig startup list?
Hi, I want that the user will run my program ones and then the program will run automatically when the user is turn on the computer. How can I force that my program will start before other program that in the list(when the computer start) If I can run my program automatically only 1 restart Best Regards, Yaniv Pinhas Yup, the task scheduler is really useful: that's how I start off my backups (never found a better backup mechanism other than good old XCOPY). ...Show All
SQL Server OpenQuery() to Linked Server hangs, leaving SPID with open tran, then templog.ldf grows without limit.
Hi, We have a customer that is using SQL Server 2000, and experiencing the following intermittent problem -- occasionally templog.ldf will grow and grow until it fills the entire disk. This is a rare problem, it has happened less than 10 times in the past two years, for a job that runs once a minute. But it has happened on 3 different SQL Servers, (two production servers, and one test server). Our suspicion is that the root cause is an OPENQUERY() to pull data from a linked server (Oracle database on Unix). We have seen that these OPENQUERY() statements occasionally hang and cannot be killed. The OPENQUERY() is used to populate a local table, and when we originally populated permanent tables with OPENQUERY(), then there would be a ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Mesh Classes?
I don't find any Base Mesh classes or support for Key Framed Animations... Why does MS choosed to not put those classes in the framework Not generic enough There is a Model class in the framework. You don't currently have any way to load data into a Model, though: that functionality is provided by the Content Pipeline, which was not included in the beta. ...Show All
SQL Server what is the best way to do this search?
what is the best way to do this search I want a stored procedure which can serach in any of the filled form on my C# windows application. The textBoxes are: txtFileNo txtIDNumber txtContactNumber txtName txtBuilding txtBlock txtBox txtEmail I want SQL Server to search for any fiiled text, so if the user enterred txtName and txtEmail this it will onlt search for txtName and txtEmail. I know how to do this directly from the form but I want to perform this using stored procedure. The definitive documentation on this is in Erland's paper: Dynamic Search Conditions in T-SQL http://www.sommarskog.se/dyn-search.html The basics of which is that you can try something like: create procedure yourTable ( @fileNo varcha ...Show All
Visual C# Usage of Container.DataItem
CS0021: Cannot apply indexing with [] to an expression of type 'object' Compilation Error is:" CS0021: Cannot apply indexing with [] to an expression of type 'object' ". How can I solve this problem I tried to change "[]" into "()", but I got another error "CS0118: System.Web.UI.WebControls.DataGridItem.DataItem' denotes a 'property' where a 'method' was expected" <ASP:Templatecolumn HeaderText="Article Title"> <itemTemplate> <a href=articleupdate.aspx articleid=<%#Container.DataItem["articleid"]%>&colid=<%#Container.DataItem["colid"]%>>& ...Show All
Visual Studio Team System How to uninstall TFS SP1
Because of failures during installation of the sp1 (see post: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1030781 ) I needed to uninstall the sp1, because we did not have any access to our source code! Unfortunaly it's not as easy to uninstall the sp as it could be. There are no entries in the add/remove programs, so here is the way to go: There are 3 packages to remove: Microsoft Visual Studio 2005 Team Foundation Server (services) - ENU Microsoft Visual Studio 2005 Team Foundation Server (builds) - ENU Microsoft Visual Studio 2005 Team Foundation Server (databases) - ENU Go to the registry-editor: \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\ there are the keys for the 3 packages (or 2 (and 1 on the data-layer) if yo ...Show All
Smart Device Development Button Control
I apologize if this is too simple an issue, but I am just beginning a project targeted at smartphones (e.g., Treo 700w). Why is there no button control in the toolbox for these devices I am porting an application from desktop and other Pocket PC devices, and I need the same look/feel on each device; i.e., I need to use buttons. Buttons (and some other controls) are indeed not available on SmartPhone platform. That is because SmartPhone does not have a touch screen so buttons would be unusable. However, it’s not really an issue in case of Treo 700w as is not a SmartPhone but Pocket PC Phone Edition. Treo 700w has touch screen and it has buttons. If you’re targeting SmartPhone platform (e.g. Moto ...Show All
