Chad Campbell's Q&A profile
Windows Forms backgroundworker & passing objects
Any help with this would be greatly appreciated... I have a form that runs a lengthy a process; so I want to display a "loading" form for the users. In order to display an "infinite" loading form (i.e. I don't care too much about measuring progress accurately, a simple animated gif on a new form has sufficed.), I'm threading out the lengthy process (called LoadAndAnalyse .) For this I determined that using BackGroundWorker was best; it enabled me to update the "loading" form with milestones messaged ( i.e. display text that reads "Loading Complete, Organizing Results..." etc.) This runs well, however, I still get the following error message: Cross-thread operation not valid: Control 'Resu ...Show All
Visual Studio 2008 (Pre-release) Animating the Web content of Frame?
Hi, I am trying to animate the content of frame,so that when ever source of frame is changed some kind of animation is fired to give visual indication for this. I am able to animate the frame but the web content of frame is not animation,i am trying the following thing: <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > <Canvas Name="myCanvas" > <Frame BorderBrush="Gray" Source="http://gmail.com" Background="LightBlue" BorderThickness="2" Width="400" Height="400" Name="myWebBrowser" Canvas.Left="100" Canvas.Top="20" > ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Screen layout for 360 games
Dave made a blog entry yesterday pointing to another blog entry that should be a must-read for all of us considering doing 360 development. I know I had no idea about what he talks about. This article (free signup required) goes into far more detail than you probably ever wanted to know about the problems involved with displaying computer images on televisions. The situation today is nowhere near as bad as he describes, as the Xbox has a high quality video encoder that will use smart filtering to minimize the effects of fine horizontal detail on an interlaced display. Plus not so many people today are still using composite cables, and a lot have HDTV where most of these problems go away. Still good stuff to be aware of ...Show All
.NET Development 2.0 DataSet using whitespace instead of empty String
Hello, I'm doing a very basic operation in a webservice just converted from 1.1. It uses a dataAdapter.Fill(DataSet) to build a dataset from a table. Unfortunately it now populates all the empty cells in the DB as " " in the dataSet. That single whitespace is screwing up all of my business rules. I've confirmed this is not a problem in the 1.1 code. I'm having a lot of trouble finding any information about this online, any ideas on how to fix this Code below: DataSet dataSet = new DataSet(); _dataAdapter.SelectCommand = new SqlCommand(strSQL, _conn); _dataAdapter.Fill(dataSet); Thanks in Advance, Ian That's perfect! Is there a good way to use ltrim on a select all statement Ex - Select ltrim(*) f ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Accessing internet resources?
I understand from the FAQ that the XNA Framework on the Xbox 360 will not have any support for Xbox Live, which means no network gaming, at least at this time. However I would like to know whether there is any support for accessing resource assets on the internet For example is it possible to access image resources on an internet site using a C# HttpWebRequest Paul Bleisch wrote: We're still working out how the Xbox network stack will be expressed in our API. Can we please get System.Net, or at least System.Net.Sockets That would open up some pretty interesting doors :). I'm currently building a network protocol (prototype in both C++ and managed code), an ...Show All
Windows Forms DGV Binding
How can I bind only a few columns of a datasource to my DataGridView. 1、you can bind the column in IDE: add a column in desgning time,and populate the DataPropertyName 2、here is a FAQ How do I add an unbound column to a DataGrid that is bound to a data source I hope it will help. ...Show All
Software Development for Windows Vista vista isguest doesn't appear to work
hi. i'm struggling with discovering if a user is a guest in vista using c# and .NET 1.1. i've tried calling WindowsIdentity.GetCurrent().IsGuest but it always return false whether i'm using the vista guest account or not. i've also tried the IsAnonymous property which also always returns false. i also tried getting a WindowsIdentity object from Thread.CurrentPrinicpal like follows: AppDomain.CurrentDomain.SetPrincipalPolicy( System.Security.Principal.PrincipalPolicy.WindowsPrincipal ); WindowsPrincipal principal = (WindowsPrincipal)Thread.CurrentPrincipal; WindowsIdentity identity = (WindowsIdentity)principal.Identity; but again i get the same results. currently i'm reduced to comparing Environment.UserName with "Guest" which i ...Show All
SQL Server Updates too ineffiecient to call from C#
I'm trying to analyze a 2-Table Select Statement and compare to variables. if x > y then do math and run an update command if y > x then do other math and run update command It's very slow.. about 1 record a second. I haven't used store procs yet, but from what I understand, should increase performance. However, I'm having a difficult time tracking down any examples of this simple procedure as a SPROC. I could try using Managed Code in SQL 2005 and writing the sproc in C#.. but that has a learning curve all it's own. Can someone either point me to a SPROC Tutorial online, or outline the basics for the above function above.. it's too late to go to Borders and the Library didn't have any SQL books not chec ...Show All
Architecture web client software factory
hi everyone, can any one tell me what is the purpose of web client software factory... thanks for your valuable information Why don't you take a look at the article that describes the factory at http://msdn2.microsoft.com/en-us/library/bb264518.aspx I think you will find it is pretty clear on the benefits and functionality. ...Show All
Visual C# while (true)... need help!!
I thought I knew quite a lot about programming but when I came accross a bit of code like: while (true) { ...do something... } I had no idea how this works... I know that it's a conditional loop and while it is true it loops through performing whatever tasks there are to do... BUT what is the (true) part how does that work if it loops while(true) what would make it false since it's not a local variable or anything and you cant say IsRunning = false; it just always is true... Does it mean that while app is still running or something... That's the only solution I can come up with is that it means while( app is running){...}... Am I right Can someone please take the time to explain this to me and maybe give me the proper name for referring ...Show All
Microsoft ISV Community Center Forums Left, Mid and Right functions not working on Office 2003
Hi, VB in office 2003 does not seem to recognise the Left, Mid and Right functions. I've been using the code below to convert dates in excel like "20060123" to an actual date (i.e. 23/01/2006) in previous versions with no problem. Sub DCDecToKhanya() Dim mycell For Each mycell In Selection 'For each cell in the range selected mycell = DateValue(Left(mycell, 4) & "/" & Mid(mycell, 5, 2) & "/" & Right(mycell, 2)) 'Convert the contents to a date Next mycell End Sub I get a Compile Error " Can't find project or library" Thanks Hi I ran your code in my version of 2003, and it worked OK I changed mycell = DateValue(Left(mycell, 4) & &qu ...Show All
Windows Forms Code released for .NET Terrarium?
Does anyone know if the code for the Terrarium was ever released Is there going to be a new one for .NET 2.0 Can you guys at least open source since it was pretty cool and I think there would be an audience for it if it were to be maintained and improved. Jacques 316 wrote: I read something about a guy that did a port to .NET 2.0 with VB, but I can't find his project anywhere... Is is still alive Found it. This post: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=373738&SiteID=1 But he didn't put his project link on it. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Graphics "filters"
Is there any easy way to achieve "distortions" in your rendering... ie, water ripple/distortion effects, blurring, etc... http://www.talula.demon.co.uk/postprocessing/postprocessing.html ...Show All
Visual Basic Listview1 Overload resolution
In VB6 I was able to use single and double variable types to control the ListItems(). Now it seems to handle only integers and my program will no longer work. Is there a way to make the contol accept single and double variable types Dim sglN As Single Listview1.Listitems(sglN).Txt The above no longer works because the Overload Resolution is failing. Thanks MattMo VB6 tried to be 'smart' by making up for sloppy programming (How many items are there in this list box I'm sure you wouldn't say 3.254 items. It would be pretty tough to select item number 2.2) by performing the conversion function for you behind the scenes. There can only be an integral number of items. If all the number is doing is selecting iem ...Show All
Visual C# change statusbar icon on database activity
hello, I searched for a while on the forums, but could not find anything usefull on my question. My application uses business objects, which are showed inside a panel when added to the mainform. Each business object is responsible for loading its own data. And I don't want to put any other code in these business objects. On my mainform I want to put an icon or other small picture in the statusbar that shows when a database update command is called from any child form. I am using SQL Server 2005 Express Edition. Can anyone tell me how I get my statusbar icon changed on database activity. I don't know where to start. thanx, Ton. Create user control inherited from Form type. In this form ...Show All
