Pankaj.Patel's Q&A profile
Windows Forms Which event is fired if user clicks outside of modal dialog?
Can I attach to it Thanks Peter Were you able to figure this out One method is to catch the click event and to determine where the click occurred vs. the region of the form itself. There are other ways as well, interested to hear what you used. Josh ...Show All
Windows Forms Binding Index of Custom Object Collection to ValueMember of ComboBox
I have a custom collection called Profiles which contains a collection of custom objects of type Profile. When I am databinding to a combobox, I would like to bind the ValueMember to the Index of the object within the collection. That way I can determine the index of the selected object. this.cboProfiles.DataSource = profiles; this.cboProfiles.DisplayMember = "Name"; this.cboProfiles.ValueMember = "Index"; <-- Something like this... but "Index" does not work... So again, how do I bind to the Index of the Custom Object Collection Thanks! Bob The issue I have is that I do not want to store t ...Show All
Visual C++ Using timers in vc++ via SetTimer and OnTimer
hi . i am using SetTimer(...) combined with OnTimer(...) in my code to call 2 different methods on 2 different timers. Here's a simplified version of my code to make things clear: SetTimer(1, 100, NULL); SetTimer(2, 40, NULL); ... void CMTDlg::OnTimer(UINT nTimerID) { if (nTimerID == 1) { //capture an image from the webcam and save it in the 'img' folder } if (nTimerID == 2) { //some processing } } Now, my assumed working of the code was this: After 100 ms timer1 gets fired, OnTimer is called, and an image is saved in the img folder. This repeats every 100 ms. Mea ...Show All
Visual Studio 2008 (Pre-release) Plans for Windows Mobile Pocket/PC?
Does Microsoft yet know their plans for Windows Mobile/PocketPC (.NET Compact Framework) for WCF The current netcf distribution doesn't contain non-soap/non-ws support (e.g. binary/tcp remoting), I'm wondering what kind of functionality we might be able to look forward to on a netcf version of WCF. Thanks! Yes, it would be nice to have a stripped-down version of WCF (like WPF will have WPF/E). What you can do right now is to use MSMQ integration binding because MSMQ is supported in .NET CF 2.0. I have tested it and it works (see a previous thread in this forum "Integration with MSMQ on .NET Compact Framework 2.0"). ...Show All
Software Development for Windows Vista Is it possible to hook WWF with Monad shell, basically call cmdlets in monad from WWF?
Hi I am currently building/automating one of our internal process using Monad and it would be really really really cool if I can use WWF along with it so basically call cmdlets/cmd in monad via WWF, basically control the cmd to be executed in MSH via WWF. I haven't seen any e.g. of these and first of all if it is possible to do something like this. Please advice rahul Monad does allow its runtime to be hosted inside applications, and hence can run cmdlets inside different hosts. Calling a single cmd/cmdlets from within a WWF activity is doable, but the piplelining of data across cmdlets is totally owne ...Show All
Visual C# Auto Hide/show Toc table of contents like visual studio side menus
I want's auto hide functionalitylike on VS2005. with the help of my post http://forums.asp.net/thread/1281569.aspx and some of my tweaks i am able to get some functianality to show/hide my left menu. Now as in VS2005 when we moveover the toolbox main area contents get hidden behind the toolbox. Could In some way i can able to implement that functionality. My code for the master page of jobstarter kit where i apply this functionality is <%@ Master Language="C#" CodeFile="MasterPage.master.cs" Inherits="MasterPage_master" %> <%@ Register TagPrefix="uc3" TagName="LatestJobs" Src=" ...Show All
Visual Basic VS .net and SQL database question.
I am trying to develop a VS.net application using VS 2005 Pro that connects to a SQL database, so that the user can update the information in the tables. Sounds easy enough. The SQL database is on a SQL 2000 server. My problem is, I can get the update method on a form to work using the Northwind database. However, when I try to build a TableAdapter to one of my SQL databases, the TableAdapter wizard will not generate a UPDATE statement or a DELETE statement. And thus the update method on the form gives a error when called. I think it is a SQL security issue. Does anyone have any ideas Thanks Weston T ...Show All
Visual C# C# Equivalent of SqlDataReader.Item
I'm new to C#, moving over from VB... Is there an equivalent to VB's SqlDataReader.Item Here's what I'm trying to do: SqlCommand cmdSelectedRecord = new SqlCommand (SQLStmt,conn); SqlDataReader SelectedRecord = cmdSelectedRecord.ExecuteReader(); txtLastName.Text = SelectedRecord.Item("lname"); txtFirstName.Text = SelectedRecord.Item("fname"); SelectedRecord.Close(); Obviously I have defined my SQLStmt and conn as the connection. "lname" and "fname" are tables in the database that I am querying. The build error I get is: System.Data.SqlClient.SqlDataReader' does not contain a definition for 'Item'. Thanks, Jeff ...Show All
SQL Server Visual C# cannot connect to SQL 2005 Express
Hi, In Visual C# Express, I right click on my solution and select Add, new item, and then choose an SQL database. I get the error: Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/ LinkId=49251 I completely uninstalled all of the beta Express products I had and reinstalled SQL Server 2005 Express first, which seems to have installed ok. Then I reinstalled Visual C# Express, but still have the same problem. This is happening on my home pc running Windows XP Home sp2. I successfully ...Show All
Visual Studio Team System load test without agent
Hi, I am testing a web app without the load test agent functionality. I have 2 web servers load balanced. Is there anyway of using the ip switch functionality without having the load test agent installed At the moment all my traffic is going to the one webserver as the load balancer is doing its job correctly as its balancing on ip address. The ip switching funcionality is only available with using the Load Test Agents. Is is not available when running against the local vstesthost process. ...Show All
Visual Studio Express Editions A Tall Form Opens in the Middle
I have a vb.net form that's relatively tall (about 800). When I open that form, instead of opening at the top of the page, its opened towards the middle and the user would have to scroll up to get to the top. Does anyone know why that happens and what to do about it hi, you are wellcom anyway SJWhiteley said b4 there are very good programs didn't succeed for small things like the taborder best regards ...Show All
Visual Studio Team System Extending Microsoft.WebApplication component type
Hi, I'm trying to extend the built-in Microsoft.WebApplication component type, so I've code an .sdm like this: <Import Alias="WebApp" Name="Microsoft.WebApplication"/> <SystemDefinition Name="CustomWebAppType" Layer="Application" Abstract="true" Extends="WebApp:WebApplication"> <DesignData> <Report Type="Application" xmlns="http://schemas.microsoft.com/SystemDefinitionModel/2005/1/DesignData/DeploymentReport /> </DesignData> This works ok and I get a new item in the toolbox which I can a ...Show All
Smart Device Development [INSTALL] how make a cab recursively with makecab and not cabarc ?
Hello there. Apologizes if my post isn't in the right place. I made an Installer, and to produce a .cab with the data I use cabarc.exe with can explore a directory with -r option like that : cabarc -p -r n name.cab "path" But now I have to make a multi-cds version, with two or three separate files .cab cabarc.exe doesn't do that, bu makecab do, with a lot of parameters in a DDF file. But... my problem is to ask makecab to explore recursively all the subdirectories in one paths, and store all files. Actually, I just Iteratively put all the pathname\filename in the ddf, witch is not what I want. Thank you for your help ...Show All
Visual C# Detect mouse click on image within picture box
Hi My picture box is bigger than the image it holds. How can i identify mouse clicks which are on the image within the picture box Thanks Ashwin Try something like this for your MouseClick event hander: private void pictureBox1_MouseClick(object sender, MouseEventArgs e) { Rectangle imageArea = new Rectangle(0, 0, pictureBox1.Image.Width, pictureBox1.Image.Height); bool clickInImage = imageArea.Contains(e.Location); } In it, we define a rectangle that is the same size and location of the image that has been loaded into the PictureBox and use it’s Contains() meth ...Show All
Visual Studio Team System Does tfsSetup have to be licensed user
Hi, with Workgroup edition you only have 5 users max. So, is it necessary for one of these is TFSSETUP as its taking a valuable user. Thanks. The setup account (referred to as TFSSETUP) is the account that has full administrative rights on the server. The best way to handle this is to set up TFS as the user who will be the primary administrator. ...Show All
