Joe Buys's Q&A profile
Windows Forms Try..finally
hi.,i try the following code in C#.net . try { TextBox1.Text = "hi.."; return ; } finally { TextBox1.Text = "Nice one.."; } whenever i run this code it gives me o/p like Nice one.. but whever i trace it, it goes through try block but go in finally block and show the finally blocks result, so i can not understand that why it can not show the try block's result protected void ExampleTry() { // Consider Try Catch Finally as a wrapper for the code in the Try block // the Finally block is executed after the code in the try block regardless of that code. string str = string .Empty; try { str = "Try block" ; ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Xbox360 Threads, just interested ...
I know that the xbox has multi cores and can run several threads concurrently, how do you write for a particular core on the xbox 360, or will the CLR choose when to use another core. Or maybe our code will only run on 1, can someone please enlighten me. Hopefully, it will be as easy as this - Thread myThread = new Thread ( new ThreadStart (myProc)); myThread.SetApartmentState( ApartmentState .MTA) myThread.Start(); and the clr does all the hard work. I am j ust interested thats all ... Dave Thread.CurrentThread.SetProcessorAffinity will this be available in the release version because I cant find it in beta 2 Unless I am being thick ! ...Show All
Visual Studio Team System Cannot connect from clients
I cannot connect from VS2005 clients to the TFS. The server runs Windows 2003, firewall disabled. The client runs XP Pro SP2, firewall also disabled. When I open Visual Studio from the server (TFS does install Visual Studio standard, right ), I can connect to the server with Team Explorer. However when I try to do the same from the client machine I get an error TF31002: Unable to connect to this Team Foundation Server. Both machines are in a domain, the Active Directory user that is logged in the client is part of the Team Foundation group Project Administrators. From the client I can access for ex. http://<server_name>:8080/VersionControl/v1.0/Repository.asmx so it should not be a connection problem. Any suggestion Thanks, Francesco ...Show All
Visual Studio Team System Team Project Creation failed
I have installed TFS together with Windows Sharepoint Services SP2. I can connect to the Team Foundation Server from Visual Studio but when I try to create a new project it fails. I have checked that the Sharepoint Admin site is on port 17012 and that all sites are using .net 2.0. I tried giving the TFS User local administration privileges but that did not resolve the error. The relevant log snipet is: (alas I am using the German version so parts of the log are in German): 2006-07-12 13:27:14Z | Modul: Engine | Thread: 11 | Task "SharePointPortal" aus Gruppe "Portal" wird ausgefuhrt. 2006-07-12 13:27:14Z | Modul: WSS | Thread: 11 | Sprach-ID: 1031 2006-07-12 13:27:14Z | Modul: WSS | Thread: 11 | Es wird uberpruft, ob auf dem Server, der ...Show All
Windows Forms Resizing and rescalling Forms
Hello, I have in my project a form with several buttons and ~20 PictureBoxes loaded with some images. How I can resize and rescale the whole form (by pulling right bottom corner of the form), so I can get all components, images, fonts... everything inside resized and scalled proportionally. For example if I make the form twice smaller I want to make all images to schrink twice, fonts to become twice smaller, buttons.. everything to be scalled down proportionally. I'll be very thankfull if you can bring me some sample code. Thank you Best regards I don't know what winform is, but I know that using a TableLayoutPanel can do what you are describing, but I don't know if it's usable for winform. There is also a 'Wal ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Pong using XNA
I've noticed a few XNA Pong varients already populating the Internet since XNA's release on Wednesday. This version, called MDS Pong, will attempt to simulate the original game as much as possible (by original, I'm referring to the small black box that pre-dates Atari. Yes, there was something before Atari). You can check it out here: MDS Pong Beta Some of the game logic includes changing the ball angle depending on where it collides with the paddle, and changing the ball's speed based on how fast your paddle is moving upon impact with the ball (like the original game). The plan is to complete the project and release the documented source code so everyone here can see some features of Game Studio Express in action. The computer is ...Show All
Visual Studio Team System Shared Workspace error message
Hello! I have a development team, which for various reasons created their workspaces to map to the same network drive location. Example: user1 has workspace for $/TP1/folder1 mapped to I:\folder1 where I:\ is the network location accessible to all his team members. He usually works on items in folder1 and doesn't touch other folders in the Team Project. user2 also has his workspace mapped to I:\folder2. He works with items in folder2 only. Now, user1 is OOO and user2 is trying to modify folder1 contents. User1 doesn't have anything checked out from TFS. User2 maps his folder1 workspace to I:\folder1 as well. He checks out a file, makes modifications and checkes it back in. The out put window shows that Changeset <#> is ...Show All
Visual Studio 2008 (Pre-release) Can we add an operation to a service description once the serviceHost has opened?
Initially my service has say two methods. I want to add a third method by calling one of the two methods. If any new client subscribes to the service it should be able to call all the three methods. The method which should be invoked when the dynamically added operation is called is implemented in the service class. Is this feasible That is correct, but for a new client who is using the same service should be able to view all the methods. or the existing client can re subscribe. i believe that createdescription method in the service host gets called only once during the instantiation of the host. Is there any way by which we can call it whenever required Also would like to know whether IWSDLExpo ...Show All
SQL Server getting the database collection doesnt always wrok
why doesn't this code always work <code> Dim conn as serverconnection=New serverconnection(".\SQLEXPRESS") Dim srv as new server(conn) Dim db as database for each db in srv.databases cmbDBfilenames.items.add(db.Name.tostring) Next </code) If the databases are located in the applicatio path , it doesn't pick them up Hi, The method you are using only checks for the server attached databases not the user instances. So if the database is in the application path, but SQL Server does not hold an actual reference to them (being attached to the databases) you won’t find them (SMO makes a call to the server to evaluate the available databases) HTH, Jens K ...Show All
Visual C# Please help me confirm on windows service
Dear All, I have a windows service which I need to run on particular time of a day. So I have build my windows service and add the code of my action of checking the database in the onStart function Is this correct or must I have a main function Another thing I have added is the debug.write I dont know whether it prints or not I done with installer and manage to successfully install my window service. So I dont know how to confirm if my windows service is running or not How can I set the time to be like specify for certain hours in a day eg. to run at 10 am, 12 pm, 2pm and 4pm daily Thanks. Yes the smalles part of execution is a thread, an applicaiton may have many threads for parallel processin ...Show All
Game Technologies: DirectX, XNA, XACT, etc. No Designer in Beta 2
In XNA Game Studio Beta 1, I was able to create a new Windows Game and view the designer. In Beta 2, however, I don't see any way to get to Designer mode. I've tried all of the obvious ways and it just isn't happening for me. I uninstalled Beta 2 and reinstalled Beta 1, and I can easily get to Designer mode again. I know it isn't my Visual Studio installation - I can start a new project and designer mode is functional whether I have Beta 2 installed or not. What do you think the problem is Are there some Beta 1 files that just aren't uninstalling properly Thanks guys. Oh I see... I was especially confused when following a supposed Beta 2 tutorial which asked me to go to designer mode to set the properties ...Show All
Visual Studio How to pass a dataset to a report with code?
Ok. Im slowly learning the ropes here. Ive got open up an mdb database and manipulating the data without wizards down pretty good now. I am wondering where to start looking for how to pass a dataset to a report Has anyone done this without a wizard I haven't done it without a wizard but you can cut out the dataset that the wizard creates. See http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=993567&SiteID=1 . ...Show All
Software Development for Windows Vista Create process as another user with full token
My application (an installer) needs to do some steps as another user. LogonUser /CreateProcessAsUser as described here http://msdn2.microsoft.com/en-us/library/aa379608.aspx and it basically works , except that token returned from LogonUser is filtered, and I like to have full token. Also , I found that passing LOGON32_BATCH_LOGON to LogonUser (instead of LOGON32_INTERACTIVE_LOGON) would give me the full token. The question is - what to do if user does only has the right to logon interactively I did some experiments with GetTokenInformation to get the linked token as passed linked token to CreateProcessAsUser(), without much success - got ERROR_BAD_TOKEN_TYPE. I can get around by temporarily allowing batch logon for my user , bu ...Show All
Visual Basic Beginner: VB & SQL
Hello, I just started to learn Visual Basic 2005.NET. I have experience with VBA in Access and SQL Server. I now want to build applications (client/server) with VB & SQL Server. Does anyone have a simple example with which I can start learning Thank you in advance! yes you can. just simply input the query you want, with the values and do an ExecuteNonQuery() The best way to do this, in terms of performance and security, is to use Stored Procedures on the SQL Server end, calling it from your client application and giving it parameters, with values, then executing the non query. Insert/Delete/Update never returns results back, the only thing it does return back is the number of rows effected by ...Show All
SharePoint Products and Technologies Acessing the underlying listitem for a PortalWebSiteMapNode in the PortalSiteMapProvider
I am using the Web Content Management Feature og MOSS2007 to build a Internet presence web-site for a client. I have made my own implementation of the PortalSiteMapProvider, that returns an hierachical view of my site/pages structure, i bind this to a MOSSMEnu control and everything works like a charm.. However my my client requires that some of the menu items should be color coded, depending on one of the properties set in the underlying listitem (Page) of the PortalWebSiteMapNode. How is this done I have looked at the PortalWebSiteMapNode, and PortalSiteMapProvicer objects, but i have not found any obvious way to do this. The only thing i can think of is binding to the listitem using the URL, but that does not appear to be a ...Show All
