cpurick's Q&A profile
Windows Forms Change field-Values in Edit-Mode
Hi, I try to implement "What-if"-scenarios in a gridview in its edit-mode - which means, one should edit a value in a column and instead of updating that one in the database I would like to adapt the other ones. E.g. column1 shows '1', column2 '2' and column3 the sum of these -> '3'. If the user changes the value in column1 to '3' and clicks 'Update', column3 should be adapted to the sum again -> '4'. My approach just to change a fields' value (to set the value to e.g. "100"): Protected Sub GridView_OutOfStock_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView_OutOfStock.RowUpdating Dim value As Int16 Dim row As GridViewRow = GridView_OutOfStock.Rows(e. ...Show All
Visual Basic AndAlso Partial Code Coverage Results
I have the following block of code Private _AssemblyId As Int32 Private _Assembly As DotNetAssembly Public ReadOnly Property [Assembly]() As DotNetAssembly Get If _Assembly Is Nothing AndAlso _AssemblyId <> 0 Then _Assembly = New DotNetAssembly(_AssemblyId) Return _Assembly End Get End Property And I have the following unit test <TestMethod()> _ Public Sub AssemblyTest() Dim target As DotNetMethod = New DotNetMethod target.AssemblyID = 1 Assert.IsNotNull(target.Assembly, "Assembly Failed with an AssemblyID of 1" ) End Sub I also created a second unit test identical to the first one except the line target.Assembl ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Glass-Reflection effect
Hi, Im making a TicTacToe game with some friends of mine, just to get started on XNA. We are now beginning to be done with the gameplay, and now it could be great to do some effects, and boost the GFX a bit. So I whould really like the board to have surface that reflects the pieces, in a reflection, glass like way. Can anyone point be to a solution, sample code, or article or other way to do this Thanks in advance. Wouldnt it be more efficent to just render the scene from a different angle and use render targets to map this onto the reflective plane I don't know the specific syntax. But I believe it involved setting up a seperate camera which mirrors the players orientation through the refl ...Show All
Visual C# 2005 Standard Edition compatible with C# Express Projects??
I had C# Express Edition installed and thus have a bunch of projects that I did for school and work. I now have C# 2005 Standard Edition installed. When I try to run a project done in C# Express I get an error. Is this a known issue Thanks! David C# 2005 Standard Edition There is no such thing... do you mean Visual C# Standard Edition Or maybe Visual Studio 2005 Standard Edition The project files created by one version of Visual Studio 2005 (from Express on up to Team Suite) is exactly the same and can be ready equally by all. My guess is that you are trying to load a project from a later version of Visual Studio in an older IDE, something that doesn't work due to the project file format change. ...Show All
Silverlight (formerly WPF/E) Where are the user interface controls? ie: Menu, TreeView, ListView, TextBox, ...
I cannot see any user interface controls in the WPF/E reference. When I try to instantiate something as simple as a button, it throws an exception when loading the XAML. What is the status of the support of TabPanel, TreeView, Menu, Button, ListView, TextBox, RadioButton, ... Without these, I cannot see how it would be possible to build an application user interface with WPF/E. So how can we build a WPF-compatible TreeView control or a Menu control with these primitives How can we build a simple TextBox control I don't think it is feasible with the basic 'primatives'. To be even remotely useful, WPF/E has to have all the user interface controls that come with standard WPF. That also includes StackPanels, ...Show All
Windows Forms Updating app.config
I am trying to create a server installation (MSI) which during install populates the app.config with the user entered values and then updates and signs the manifests such that ClickOnce will be functional. I am not sure exactly of the method to update the manifests, or moreso if the way I am attempting is correct. here is some information about my setup here: I have the .deploy extension enabled; the msi configures the app.config with appropriate settings and sets the deploymentProvider codebase appropriately; once the config and application files are modified I have a batch file which executes the following mage.exe commands (actual filenames and paths obscured): mage.exe -Update <filename>.exe.manifest -FromDirectory <installed ...Show All
Visual C# virtual modifier !!!
hi all .... plz can anybody explain the states of virtual modifier and plz with examples i have been searching for that ... and i have now only one states and here it is // cs_virtual_keyword.cs using System; class TestClass { public class Dimensions { public const double PI = Math.PI; protected double x, y; public Dimensions() { } public Dimensions(double x, double y) { this.x = x; this.y = y; } public virtual double Area() { return x * y; } } public class Circle : Dimensions { public Circle(double r) : base(r, 0) { } public override double Area() { return PI * x * x; } } class Sphere : Dimensions { public Sphere( ...Show All
Visual Studio Express Editions NEED HELP with this piece of code !
HEY GUYS i am developing a program while learning Visual C# so here what i am trying to do .... getting htm links from the database ( access ) and view it in the WebBrowser Control and, i have a button to the next link in that database to get it and view it in the WebBrowser so here is the code for that button but it doesn't work :( when i click on it this is the function i am using when button is clicked private void Next(string lesson) { string StrConnection1 = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\anything\database.mdb" ; &nbs ...Show All
Visual Studio Team System Delete team project and remove from SCE?
I deleted two team projects one got removed from SCE and one didn't How do I get rid of the one that didn't and why did one get removed and not the other I understand there is some sort of bug related to this but why one and not the other and there must be a way to get rid of that one that is left right If not do we now know if this is fixed in SP1 I used TfsDeleteProject. I reset IIS. I don't think there were ever any projects in it and I'm not sure how I could tell if any solution is still using it.. shouldn't be though. I did the query and I did see the project with the is deleted equal to 1. Any other ideas Really need to get rid of these. Thanks ...Show All
Visual Studio Express Editions Project to big
Hi, I made a project called 'Tetris' as the title already it says: it should be very small. And after removing all audio, pictures necessary dll's and framework/.... it is still 27MB what is really too big!!! Can somebody tell me how to get it smaller and why it is so big Help is really appreciated I already excluded framework, but still same size. When looking in the bin folder I saw that the Tetris.exe file has a size of 28MB... So what should I do now I think al sounds/bitmaps/... are max 1MB! [PROBLEM SOLVED] ...Show All
.NET Development Executing Native Code From A Managed Thread
Hi -- I'm about to reread the Geoff Schilling/Dave Stutz book -- which, now that I know what I need to learn from it, will be much more meaningful and useful to me than when I read it the first time, But before I do I thought I would ask one basic question that you guys might be able to inform me about. I'm wondering if it is possible and easy and done fairly routinely to call unmanaged code (that makes, for example, extensive use of Thread Local Variables) from within a managed thread without having to do a thread context switch in some way to an unmanaged thread Don't I remember that there is some kind of managed environment stack frame that allows you to do this And if so, does the managed environment place any significant limitat ...Show All
Windows Forms progressbar while dataset is loading
I use a dataset to load around 1000 records into a DGV. How can I show a progressbar while a dataset is being loaded I've done a lot of googling but have not been able to find a proper code sample except http://blah.winsmarts.com//2006-7-How_to_show_a_Progress_Bar_in_ADO.NET.aspx#feedback which I need help to convert from SQL to access db & to get this to work async. Any help would be appreciated ...Show All
Visual Studio 2008 (Pre-release) How to reference resource when binding.
I have a LinearGradientBrush defined in my resources part of my XAML. I would like to bind the two GradientStops to user settings. How can I reference the stops in my codebehind this.FindName doesn't seem to work. < LinearGradientBrush x:Key = " HighPriorityTaskBrush " StartPoint = " 0.5,0 " EndPoint = " 0.5,1 " > < GradientStop x:Name = " HighPriorityTaskColorStop1 " Color = " sc#1, 1, 0, 0 " Offset = " 0 " /> < GradientStop x:Name = " HighPriorityTaskColorStop2 " Color = " #FFFF7878 " Offset = " 1 " /> </ LinearGradientBrush > bd = new Binding ( "HighPriorityTaskColorStop1&quo ...Show All
Visual C# exception on eventhandler SelectedIndexChanged
private void ComboBox1_SelectedIndexChanged( object sender, EventArgs e) { // ComboBox take data from a BindingSource this .TextBox1.Text = this .ComboBox1.SelectedValue.ToString(); } Why this code generate an exception NullReferenceException when closing the MainForm if I make this.. this .ComboBox1.SelectedIndexChanged -= new System. EventHandler( this .ComboBox1_SelectedIndexChanged); the exception is not generated but I haven't the event that I need !!! Can anyone help me Thank all. Hi.. Normally, the ComboBox1_SelectedIndexChanged event won't occur after Form closing event. Did you do anything in the Form closing event or closed event. (e. ...Show All
SQL Server Replicating partial database
Replicating partial database Hi there, actually I have a set of tables from my database model on SQL SERVER 2005 that I want to replicate (using merge replication) to a different server with SQL SERVER 2005 EXPRESS, Everything seems to be ok until I try so replicate just a portion of my model. I’ve got some parent tables to replicate but I’m not going to replicate some of their children, when I try to move them (just the parents and SOME children) to the other server using subscription, I have to erase some foreign keys (the children’s foreign keys I wasn’t supposed to migrate) in the target server to get my database migrated. What Can I do to solve this problem ...Show All
