vb2005's Q&A profile
Windows Forms Setting text programmatically of a databound textbox
I've a TextBox which is bound to a BindingSource object and use a customer object as the datasource. I found a strange behavior when I change the text of the TextBox programmatically, it does not update the object bound behind after text is changed. Customer customer = new Customer; customer.CustomerNo = "123"; bindingSource1.DataSource = customer; textBox1.DataBindings.Add("Text", bindingSource1, "CustomerNo"); MessageBox.Show(customer.CustomerNo); // display "123" textBox1.Text = "ABC"; MessageBox.Show(customer.CustomerNo); // display "123" too However, if I focus the TextBox and leave it, it will update new value "ABC" to the object. I want to know that if I sho ...Show All
SQL Server Cannot Reference and SUM fields from Table Group in Footer Expression!
I'm gonna try this again, Microsoft, Please help! There has to be a solution for this!!!! How can I get around the limitation in SSRS 2005 of being able to SUM on a Table's Group field from my group footer expression! Keep in mind, I'm talking about a table here, not the global Report Footer, a Table object's footer! It's driving me nuts My table footer GrossGoal_gt 's field expression (non of these work and throw the error below): =SUM(Fields!GrossGoal1.Value, "CustomerNumber_Grp" ) neither does this: =RunningValue(ReportItems!ProjFee_AZ.Value, Sum , "CustomerNumber_Grp" ) neither does this: =SUM(ReportItems!GrossGoal1.Value, "CustomerNumber_Grp" ...Show All
Visual Studio Team System Get file attributes - checked out or not (in code)
Hi, I am wondering if there is any command in the TFS API that lists all files in a folder, and shows whether they are checked out or not. I do know of the QueryPendingSets command, but I would have to combine that with a list of ALL files to get their state - checked in/out. I saw this helpful post about listing checked out files: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=153326&SiteID=1 Is there any API call that allows me to see this in one call P.S. For some reason, the 'Insert Hyperlink' button does not seem to work in FireFox. Hi Eugene, Thanks for the suggestions - I have already looked at the methods you suggested. The GetItems methods does not seem to have an overload that allows me to filter by the state o ...Show All
Windows Forms Designer form
Hi-- I'm just learning how to program but I'm already having problems! I saved my program to an hb port and now when I try to open it, I can't find the designer form. I can still change codes and stuff like that but I can't add any buttons to the form. I'm so frustrated but I bet this is probably something really simple. Any help would be greatly appreciated because this is a school project due tomorrow night. Thanks! Luc Pettett wrote: Sounds like you are missing a class file - check that each form has: 1) A resx file 2) a .cs file (or vb) 3) and possibly a Designer.cs (or vb) file Also ensure that your files are not read-only. Good luck with the assignment. Regards, Luc ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Getting started with DirectX and Visual C++ 2005
Hi, My setup environment is Windows 2000 SP4 and I'm using Visual Studio 2005. I'm looking to set environment for using DirectX with Visual C++ 2005. This morning, I tried but without success to install DirectX SDK using file downloaded from following link: http://www.microsoft.com/downloads/details.aspx FamilyId=C72D9F1E-53F3-4747-8490-6801D8E8B4EF&displaylang=en#Requirements Even if I verified that, under system requirements, Windows 2000 was listed, after downloading, I received the following error while trying to run resulting "dxsdk_aug2006" file: &nb ...Show All
Visual Studio Changing image displayed by image shape programmatically
Hi all, The dsl i am working on uses an image shape. I would like to change the image displaed by the image shape at runtime. Is it possible Freddo Hi Freddo, It is possible to add an image programmatically to an image shape. First, you need to mark the ImageShape property "HasDoubleDerived" as true and regenerate the code by Transforming the Shape.tt template. Then, add a new custom class (say MyShapeName.cs) to your project and make it derive from MyShapeNameBase.cs (in the generated Shape.cs). Then override the Image getter in the derived class and return any System.Drawing.Image object from this method that will be used as an Image for your shape. E.g. code snippet will l ...Show All
Software Development for Windows Vista sdk sample - boot image problems
Using the sdk sample app: "C:\Program Files\Microsoft SDKs\Windows\v1.0\samples\winbase\storage\optical\imapi2sample" I tried taking the image from a boot cd (known to work). Then extracting the boot image. Then burning the data from the disc (temporarily copied to the hard drive) along with the boot image to create a new boot cdr. It does burn the disc (in separate attempts, I used both bbie and ultraiso to create the boot images) - but the disc will not boot a computer :-| The computer complains with: "CDBOOT: Couldn't find NTloader" Shouldn't this work I already know the boot image is fine. (I can use it in other ways to make boot CDs and I have also used v ...Show All
SQL Server Questions about SQL Server 2000 performance, SP 4, reference keys etc.
Hi, My company has developed a client/server application in VB.NET. The server part of the application runs on a computer with Windows 2000 SP4 and SQL Server 2000 SP3. When running the application and SQL Server during production, the server load is too high, so that the application is not working properly. I consider myself to have a good knowledge about database design (E/R modelling, reference keys, normalization etc.) But I lack the experience from performance tuning and working with this on a daily basis. I understand there are a lot to do regarding SQL Server performace and I am trying to grasp the basics here. So any tips are useful to get me on my way. I have a few questions... Question 1: Are there any first step comm ...Show All
Visual Studio 2008 (Pre-release) Create new instance of Database all the time, or keep around?
With the access to the underlying data store being abstracted and relatively hidden from us, I find myself wondering how to manage connection pooling and scalability. I have a static utility class that provides all the methods that generate queries. At the moment, it creates a singleton instance of the Database class (e.g. MyDatabase() , the one created by Sqlmetal) (this is for LINQ to SQL, not EF). Should I be creating and disposing of the database instance within each data request method, or should I be trying to maintain the reference to the static instance of the db My gut instinct tells me to do something like this : public static List<MyData> GetSomething(params) { using (Database db = new Database()) { var x = from .... ...Show All
Visual C++ Repost-Same code compiled sucessfully on a desktop but failed on a laptop
Repost due to the display error.--- Below code can buit sucessfully on a DELL desktop but failed on a compaq laptop.The compiler said that snack 's size is unknow. #include<iostream> #include<string> using std::cout; using std::cin; using std::endl; using std::string; struct CindyBar{ string brand; float weight; int calory; }; int main(){ cout<<"Plesae enter the size to determine the array:\n"; int size; (cin>>size).get(); CindyBar *snack=new CindyBar[size]; cout<<"Please enter the items one by one:\n"; for(int i=0;i<size;i++){ cout<<"Please enter the No."<<i+1<<" 's brand:\n"; getline(cin,snack[ i ].brand); ...Show All
Windows Live Developer Forums Pushpin z-Index
I would like to be able to control which pushpins are ontop of each other. I have tried changing the z-Index on the stylesheet with no success. And after looking at the javascript, the map.AddPushpin function actually uses a global variable for the z-index when it adds the pushpin to the mapcontrol. this.vemapcontrol.AddPushpin(GA.ID,veLatLongDecoded.Latitude,veLatLongDecoded.Longitude,25,25,"VEAPI_Pushpin",GA.GetContent(),Msn.VE.API.Globals.vepushpinpanelzIndex-1); Has anyone else came across this problem and came up with a reasonable solution besides just overwriting the map.AddPushpin method Do you really want to change the order of the pushpins or would moving them so they don't ove ...Show All
Visual C# Datagrids: How to format boolean values?
Hi All, I'm working with a Datagrid in which one of the columns is populated using a boolean value (bit in SQLSrv). Is there a way I can format this value to show a more user-friendly message . I would like to display 'Activate' for False and 'Deactivate' for True. Thanks in advance, Hi I find this solution. This work OK if field is read only. I hope this help you. private void activatesTableDataGridView_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { if (activatesTableDataGridView.Columns[e.ColumnIndex].Name.Equals("ActiveColumn")) { try { bool b; if (Boolean.TryParse(e.Value.ToString() ...Show All
Visual Studio Cannot change the reports of ReportViewer control
I am using a tree to select various reports to be displayed into the ReportViewer control on a winform app. However, only the first report is displayed and the control does not reload any other reports. Using the following code does not change the report being displayed: this .reportViewer1.LocalReport.ReportPath = "selected report path" ; this .reportViewer1.RefreshReport(); Is this a limitation of the control Is the only solution to re-create a ReportViewer control for each report to be displayed Thanks. Fred, You need something like this: private void ExecuteReport(DataTable theDT, string theReportName,string theRptDataSetName, ReportParameter[] theParams) { ReportViewer ...Show All
Software Development for Windows Vista XOML Custom Activity
Hi There, Is it possible to have a Xoml custom activity And have the dependency property and execute method calls in xoml [without using the xmol.cs file] Any work arounds and pointers with samples will be helpfull. Thanks!! No, this is not possible in WF V1. We're working on improving this story for our future releases. Here's another post on the same issue: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=996072&SiteID=1 ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Windows Forms and DirectX
To use directx, you send it a winodw in the form of a control. Is there any other form type this will work with I want to have a windows form on one side, with a directx controlled draw space on the other. How would i go about doing this please Thanks, Mike Sorry for the delayed answer. Yes, you are right. If you call Invalidate in the OnPaint method doesnt work, because it tries to radraw this control too fast and this causes problems. Just call this.Invalidate every 60 fps, for example, with a Timer. ...Show All
