Doug Holden's Q&A profile
Smart Device Development Smart Minimize a full screen app via code
I have a full screen app that I'd like to smart minimize via my own button. Can this be done via code Thanks. The Form.WindowState should do the trick. Simply use "myForm.WindowState = FormWindowState.Minimized" on the click handler for your own minimize button. Enjoy, ...Show All
Visual C# Getting applications Paths
Does the System Namespace has something like system.path I need print out the current cs files path.. because for some reason I'm trying to load some images in a program that I'm creating.. but for some reason.. It only works when I add in the full path to it. interesting, it should. It returns a string of the path/location of where your application is running from MessageBox.Show(Application.StartupPath); (or Console.Write) ...Show All
Visual Studio Team System Names of local variables in FxCop analysis output
Hi We have our code base in C# and as part of policing, I wrote a custom rule to pick the local variables (in a method) to check if they confirm to our naming standards. I had the below two variables inside a method //Holds the Return Variable long Return = 0 ; //Holds the DataReader Object IDataReader Output = null; Lets assume the above code resides in a assembly (test.dll). The rule is that the two variables should have the appropriate prefix as defined in our standards. I ran FxCop and the FxCop UI reports the error properly. But if the PDB file (test.pdb) is present in the path of test.dll, the variable names appear properly (like Return and Output). If I don't have the PDB file, the names appear as local0 and local ...Show All
Software Development for Windows Vista critical issues from SUA
Hi all. Please, tell me, how can I know whether some issue from Standard User Analuzer is critical I mean, there are some files or registries or other objects, which will be accessed even from very simple program with one form with nothing on it and with no developer defined functionallity. And SUA will display all these cases of access ! Thank you. There are a number of cases in Windows XP where the OS will attempt operations that succeed only for admin. In most if not all of the cases, the "access-denied" is handled gracefully or doesn't matter. These cases can generally be considered "noise". The reason they appear in the SUA report is because SUA determines that an "acce ...Show All
Windows Forms Project server 2003 login issue
Hi All, i have a project server 2003 login issue. i used single server installation method to configure project server.when i trying to login thru PWA i am getting this error "Project server was unable to login you at this time (5006).i have tried editsdite utility and i haven't faced any problem with installation. please help me to resolve this issue. Thanks in advance... Rajeesh Is this a Windows Forms programming question I would normally delete this post as off topic if I had half a clue what "project server 2003" really is... ...Show All
Visual Studio Express Editions Date formats in timeofday.now
Hi all - when i do timeofday.now, it says it in a certain format. Can you configure it or use a different method to make it long/short/different Cheers, James. btw eg DD-MM-YY Thursday June 2007 and you also have a hand full of methods: Dim MyDateTime As DateTime = Now Debug . Print ( MyDateTime ) Debug . Print ( MyDateTime . ToFileTime ()) Debug . Print ( MyDateTime . ToFileTimeUtc ()) Debug . Print ( MyDateTime . ToLongDateString ()) Debug . Print ( MyDateTime . ToLongTimeString ()) Debug . Print ( MyDateTime . ToShortDateString ()) Debug . Print ( MyDateTime . ToShortTimeString ()) Debug . Print ( MyDateTime . ToString ( "dd-MM-yy" )) Produces: 7/27/2006 2:27:0 ...Show All
Visual Basic Fixing a NullReferenceException
What would be the correct way to do this SubGroups(0).IsGroupMember(0) = False Here is my function but I get an error about NullReferenceException. Private Function GetSubGroupIndex( _ ByVal Title As String , _ ByVal CreateNew As Boolean ) _ As Integer '-1 if not found or created Try '$ GetSubGroupIndex Dim I As Integer = Nothing Dim Found As Boolean Dim SubGroupCount As Integer = Nothing Found = False GetSubGroupIndex = -1 For I = 0 To SubGroupCount - 1 If (UCase(Title) = UCase(SubGroups(I).SGName)) Then GetSubGroupIndex = I Found = True End If Next I If ( Not Found) And CreateNew Then Su ...Show All
Software Development for Windows Vista How to Track StateMachine Workflow in Database?
1. I tried to modify the Hands-On Lab Sample "Hosting Workflows to a StateMachine Workflow" from Sequtial Workflow to a StateMachin one , but it didn't work, the Sequntial one worked fine, and when i changed it to a StataMachine one, then the database stored nothing, and TryGetWorkflow Method always return null. Is there anything different between storing Sequntial Workflow and StateMachine one 2. If the question above resolved, can I get the running Workflow's current state's allowed Events like the Property stateMachineInstance.MessagesAllowed in Hands-On Lab Sample "Creating State Machine Workflows" 3. How to store WorkflowRuntime itself in Database and get it by somethine like Application Guid later ...Show All
Visual Studio Text formatting
I am writing programs in VS 2005, C#. I have the formatting set up the way I want it, but VS doesn't format the text at all. I have "Automatically format completed statement on ;" and "Automatically format completed block on }" both checked in Tools -> Options -> Text Editor -> C# -> Formatting -> General. Is there something else I need to do to get VS to format the text It is extremely annoying that it doesn't do it it should do by default. Not sure if this helps but worth a shot. If you are running VS2005 (non express editions) start > run > devenv /resetide would restore the IDE settings - see if this helps but not guarenteed ...Show All
Windows Forms Reg - Building a presentation table for a datagrid
hi, We have a third party data grid to display data. The datasource is a table, we call it as presentation table It has an universal ID as orimary key. The presentation table is dynamically built based on users preferences. The user can decide what data points he wants to see. The data for the presentation table comes from multiple tables say t1, t2, t3 and so on. Say column c1 comes from t1, c2 from t2 and so on. If the user chooses to see c1 and c5, we create a presentation table and add new columns similar to c1 and c5. Then copy data from t1 and t2 of the respective columns to the presentation table and display it to the user. All t1, t2 have universalID as primary key.This is the overall outline. This logic works p ...Show All
SQL Server It's possible
Hi! I have an application running in Windows Mobile. I'm choised SQL Server CE 2.0, for the data storage . In need to fill this data base with the information of Access 97 database (Jet 3.1) . For the comunication between PDA with WM and PC with A97 I'm using PC OpennetCF.Desktop.... in the PC . The question is, how can I save information directly to the SQL Server CE 2.0 from PC. The System.Data.SqlServerCE doesn't exist form .Net In this case I can not use Web Service. What I Can do Thanks and sorry for my english... There are two ways you can approach this. First is get a third party tool, there are some available I just can't remember the names. Second is to implement your own solution which can re ...Show All
SQL Server SQL Update with id
Hi I have a Excel sheet in this i have to take out a id and then search in the SQL DB if there is a Id like this and update some fields. I have it allready in Access but i need to have it in SSIS i have everthing exept the Update itself. I take the Id from the XLS and then i go to the DB and look if there are some of this ids in there. i "Merge Join" then then there are some left (5-10) now i wanna say take this IDs and update it on the DB but i search for so long now. I'm sure it have to be easy. Yes this i did but what i do after if i want the marged data to be Updated in the Database. How can i use a SQL Update with joining 2 Tables in a WorkFlow ...Show All
Visual Studio Team System Would like to set condition when sequence of events happen
I would like to make integration build required for developers when the state is set to resolved and the assigned to is "qa" How can I do this Thanks. If someone does not associate a work item with a check in, then the integration build will not be auto filled. So I would like to make sure that when they sign off bugs that QA knows which build to test against. Thanks, Jon ...Show All
Visual C++ How do you install CRT, ATL80.dll, MFC80u.dll applocal?
When we look at other installation options than side-by-side installations, we consider "applocal" installations. Unfortunately we cannot use side-by-side installation since it prevents “Per User” installations in Windows Installer. (See http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx feedbackid=552c704c-75ba-4cb1-8bf3-0c1d6d50d5a2 ) A drawback with applocal installations is that fixes issued by Microsoft to components such as MFC80u.dll will not automatically applied. On WinXP I suppose MS can do this by using policies. I found a KB article where this is discussed: http://support.microsoft.com/default.aspx scid=kb;en-us;835322 As one of the points at the end of the KB article, you can read: " If you install ...Show All
SQL Server Inser Problem in the alternative of cursor
Hi all I wanted to workout with while loop as an alternative of cursor. I am working in SQL Server 2005. I have a table TEST with following values tid tname 1 John 2 Sam 3 Peter I wanted to insert these records into same table or another table using following while loop. But I ended of inserting only last record in the loop, not each one above. --DELETE FROM test1 DECLARE @id int , @lc int , @rc int --SET ROWCOUNT 0 SELECT tid , tname INTO #Temp FROM Test SET @rc = @@ROWCOUNT --SET ROWCOUNT 1 --SELECT @id=tid FROM #TEMP SET @lc = 1 WHILE @lc <= @rc BEGIN SELECT @id = tid FROM #TEMP INSERT INTO TEST SELECT @id , 'ppp' FROM ( SELECT tid FROM #TEMP WHERE tid = @id ...Show All
