Eric Delaune's Q&A profile
Windows Forms FixedToolWindow Locked
It's my understand that the locked property should prevent the user from moving a child window. With this property the user is still able to adjust the location of the FixedToolWindow. Is there any property or event I should be setting to prevent this Some developers have suggested setting the window border style to none and then adding a label as the window title, but thought I would see if a better solution exists. Thanks in advance. The child form is also set dockable by the parent form. If i set the position I belive I would lose the dockstyle attribute. The below move function does'nt work like I expect either. Any other thoughts Private Sub Form1_Move( ByVal sender As Object , B ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Could C# be the future of gaming?
Since XNA is using C#, and is is a more intuitive language than C++, is it possible that in the future that C# will dominate, espessially in AAA titles. Could XNA be ushering a new way of programming in the main stream Although I’m a huge C++ fan but.. XNA will be using C#, DirectX is now shipped with many samples tutorials for managed frame work, and the bench mark between C++VS C# graphic applications isn’t noticeable even sometimes its better on C# with all that I guess its time to migrate from C++ to C#... ...Show All
SQL Server Strict Transaction Nesting Bug with CLR
Dear all, I am constantly running into this error when calling CLR functions from triggers (even when the triggers are CLR functions themselves): The context transaction which was active before entering user defined routine, trigger or aggregate "[name of CLR sp]" has been ended inside of it, which is not allowed. Change application logic to enforce strict transaction nesting. However, there is no cyclic nesting going on here. In fact, the error only appears when the CLR function is writing to the database. Only executing SELECT statements inside the statements doesn't freak out the SQL server (2005 SP1 in my case). I am not ending any transaction at all. This error shows up in many places: as exceptions from ASP.NET web pages, ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Texture creation fails on XBox 360
Can someone tell me why the following piece of code won't work on the XBox 360 I don't have an XBox 360 myself (and it will be at least 6 more months before I plan to afford one), so I can't test this at home. If anyone could tell me what's needed to make this snippet working, I'd be very happy :) // Look up the maximum texture size supported by the device Point textureResolution = new Point ( graphicsDevice.GraphicsDeviceCapabilities.MaxTextureWidth, graphicsDevice.GraphicsDeviceCapabilities.MaxTextureHeight ); // No larger than 1024 to avoid becoming a memory hog on systems // supporting insanely large textures :) textureResolution.X = Math .Min(textureResolution.X, 1024); textureResolution.Y = Math .Min(textureResolution.Y, 102 ...Show All
Visual Basic Webbrowser http://???
Hi, I have a webbrowser i made but when you dont put in the http:// by yourself it doesnt go to the webpage...Is there a way to make it place (http://) or (www.) in front IF IT DOESNT have it already. Try this: WebBrowser1.Navigate( URL ) System . Windows . Forms . WebBrowser. Navigate (ByVal urlString As String ) not uri ...Show All
Visual C# DateTime problem (julian date system)
For example : payments have been paid every 12 days since 10/01/1981. I need to know the date of a certain fifth payment from that date In foxpro, I can use sys(11,date()) to produce a number of days in a form of integer (meaning how many days from year 0) How about in C#, can anybody help me out. I can use the "addday" but it wont be practical. I can only get a date from a text box to determine whether it is the fifth payment. Thanks, william By using the example below you still use the AddDays method, but with the values defined with variables. You can then easily use for example: amountOfPayments = TextBox1.Text Make sure you validate the user's input from the textbox, though. // Define the start date ...Show All
Visual Basic Using SQL 2005 instead of Access for Database
I want to change a major inventory program from access to Sql 2005, probably Express edition. My problem is that There is one master database that resides on a server. We also have the database residing on our Laptops for useage when we are in the field programming radios. In the field at this time we do not have access to the server database so must use the local database. Before we would go into the field, we would copy the current database to our computers. While in the field we would make inventory changes, but do not do adds or deletes. When we return from the field, I had a routine which would update the master from the local based on when the record was changed. How would I be able to impliment a similar way with SQL Server ...Show All
Windows Forms run time error (book1.xls) invalid attachament type but works when continuied
I have a vb app that creates a xls book1.xls and then sends an email and attaches book1.xls then goes and then goes to the next customer and drops book1 and creates a new book1. my problem is that during the run (200) customers i get an error at this point Dim oAttch As MailAttachment = New MailAttachment(sfile, MailEncoding.Base64) but i click continue and it still attaches book1.xls and will loop through 10-20-30 customers then pop the error again I press continue it my go to the end of the list or it may go 1 - and pop again then i click continue it attaches book1 and rusumes is there a way I can check for a specific error code error code -2147467259 and just tell it to contiinue so to ...Show All
Visual Studio Express Editions Painting into an image box
Hi I know you can draw lines and things into a picture box with picturebox.CreateGraphics.DrawLine(Pens.Green, 5, 5, 6, 6) etc But why will it not work with variables in place of the 5, 5, 6, 6 Is there a way of painting a custom colour instead of a pen colour Is there a better thing to use that allows me to just change pixel coordinate colours as it is easier to imagine and write code for, this is confusing to me. Ah yes! That works! But... it only paints into roughly half the picture box... And it has slightly different shades of blue and green - how can this be I only chose blue and green! The drawing disappears if I switch to a diff ...Show All
Smart Device Development dll not found
Hi, Ive made an application using VS2005 C# which uses dlls to connect to tomtom. This works fine when i deploy it directly to the device but when i create a cab file and use this to install the application i get the error "pinvoke dll pppttcfhelper.dll not found" Does this have to go in a different folder when being used by a cab file - i have tried several different places - or being added differently If anyone has any ideas i would appreciate some help Thanks in advance ...Show All
Architecture Scheduling Job in a Web Farm
Hello, I have a farm of .NET servers. The application also needs scheduled jobs - like sending reports / notifications periodically. The question is - what is the best way to schedule this job I want the same set of software to run on all machines - so that if in case one machine goes down, the other is able to run the scheduled job. The options I am considering: 1) making them SQL Server jobs ( which are failed over in a cluster), but these jobs need resources available on the .NET servers, and I donot think that opening a backward connectivity from DB to App would be the best way. 2) To have some kind of a lock in the database, and schedule the job on all the machines in windows scheduler. The one which wakes up first, gets the l ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 3D game sample/tutorial
Has anyone released any samples/tutorials/simple games that are 3D for XNA I am really not interested at all in doing anything 2D. I have made some progress making a game with MDX, though I haven't completed it yet. However, I am still having a mental hurdle with how to structure things in XNA. Not having the fixed pipeline isn't helping much either. I think a lot of people are holding off on digging too deep into the 3D stuff since the pipeline isn't here yet. I would like to get into some 3D stuff, but it doesn't seem worthwhile to do it all now and then learn how to redo it when the content pipeline is out. ...Show All
Visual Studio 2008 (Pre-release) Accessing a JPG resources in June CTP
Hi, In the previous CTP, I wad able access an image resource as such: img.Source = new BitmapImage(new Uri("pack://application:,,,/AppName;component/Resources/Images/Tiles/img.jpg)); But in the June CTP, it results in the following exception: System.Reflection.TargetInvocationException was unhandled Message="Exception has been thrown by the target of an invocation." Source="mscorlib" Any ideas Thanks! lester - MSFT wrote: since its an image issue it might be because of WIC http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=517920&SiteID=1 hth That was exactly it, I installed the WIC and everything works just as before now. Th ...Show All
Software Development for Windows Vista ICatAdm.IsCatalogRunning - throws CI_E_NOT_FOUND on Vista
There is a failure in our current (.NET/C#) application when it is run on the Microsoft Vista OS (this is after the Indexing Service feature is installed, which it is not by default). The error occurs on the IsCatalog* methods on the ICatAdm interface. It throws a ComException with ErrorCode 0x80041815 (CI_E_NOT_FOUND). The sample application I wrote to test this works fine on Windows XP. Has anyone else encountered this error Any ideas on the source of the problem ICatAdm.StartCatalog() and ICatAdm.StopCatalog() are misbehaving too. Here is a snippet of the code I am using: using CIODMLib; ... AdminIndexServerClass aisc = new AdminIndexServerClass(); aisc.Stop(); // stop to create catalog ICatAdm catalog = aisc.AddCatalog(catalogNam ...Show All
Visual Studio 2008 (Pre-release) Service Host Endpoint Addressing
I have my wcf service created and hosted in my Windows service. When I created my service host instance I had to provide a Uri to the constructor. I would rather that the service host use the address specified in the app.config file that I generated. It seems, though that the service host address is not being set by what is provided in the app.config file. The behaviors and bindings appear to be taking from the app.config file. How do you force the wcf service to use the address in app.config even though you have to provide a uri to its constructor I'm passing a singleton object (rather than a type) as well for event handling. Does this have ramifications to how the address is established Would you normally not create the service ho ...Show All
