LLeuthard's Q&A profile
Windows Forms Saving user preferences
Hello all, I have an application which needs to store the user preferences and configuration settings somewhere on the disk so that it could load them when the application starts up. I am supposed to use SQL server authentication which means more than one person can launch the application from the same windows login account. This means that I cant use IsolatedStorage, isnt it I thought of creating xml files for each user but I dont know where to store them on the disk !! Any pointers on this would be appreciated. Thanks a lot! Just a little more info in case you are not familiar with the Registry. You should put your app settings that are specific to a user under the key HKEY_CURRENT_USER but it shoul ...Show All
SQL Server Custom Errors
Hi, I am showing my report in the web application using Report Viewer control.In the report i have start date and End date parameters.While running the report if i give startdate as '45/66/20007' it is displaying a message which is not user friendly.Is there is any way we can handle this type of errors and display our own custom error messages. Thanks in advance Hello Mahima, I was facing the same problem but I solved it through strored procedures. I passed my custom message in the RaiseError exception after the validation. Example : This is not a solution for your problem, but I think you change the validation accordingly IF ( DATEDIFF ( MM , @StartReceivedDate , @EndReceivedDate ...Show All
Visual Studio Express Editions how do i display a text file
I am trying to make a program with different forms for our store. I have all the buttons in place but I do not know how to display the form in a new window to print it. I have all the forms in word files but would like to make it so you only need this program to use the forms. Not a link to the word files as my computers at work do not have work. Help Yes. ' Add a button, ( button1), a PrintDocument, (PrintDocument1) ' and a PrintPreviewDialog, (PrintPreviewDialog1) to Form1 Public Class Form1 ' Resource JPG in this example is named 'a'. It was added ' using VB's GUI interface for adding resources, and ' renamed to 'a' once it appeared in the resource window. ' The origi ...Show All
Visual Studio Team System Branching - how to prevent merging into older branches?
Here's the situation that we ran into.... We have two release versions: 5.0 and 6.0 5.0 is in production and 6.0 is in dev currently. In the meantime there is a call for a maintenance release off 5.0, which we call 5.1. Obviously, we want these changes merged into 6.0. But, we don't want these changes merged into 5.0, because then 5.0 would not be representative of its original form. So....how do we go about merging the changes from 5.1 to 6.0 The only option I see so far is baseless merging from 5.1 to 6.0. Since this scenario is pretty common we will be doing a lot of baseless merges. I would like to stay away from this option if possible since it seems more complex and something that could result in more errors. Any thoughts on how to ...Show All
Windows Forms Custom Menu's
Hi Folks, I'm using MS Visual Studio with Managed C++ and I'm curious to know how I might go about trying to get Menu's that look similair to the fancy ones in MS Outlook 2003 Any ideas -Zero There's no "out-of-box" control in VS2003 to do this as far as I know. You can play with DrawItem/MeasureItem events in order to customize the painting, but in VS2003 this functionality is not provided by default. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Learning XNA for a newbie
Hi guys, I'm completely new to the XNA framework as well as the XNA game studio; any ideas on where to start learning XNA framework Or any book titles Also are there any official tutorials provided And actually will the final release of the xna game studio express be available within this year (it just said "release later in the holiday") PS. I've some experience in using C# on window applications development, also very little experience in using the managed Directx 9 API earlier. From Jason (Kusanagihk) Have you had a look at: http://www.xnadevelopment.com/ and the link section on the page. ...Show All
Visual C# Loading MFC DLL in C# Windows Application
I am trying to learn how to call an MFC dll from C# (both are developed under the .NET 2003 platform) and I'm having problems with getting the C# app to recognize the compiled .dll. After creating the proper classes in both code bases I complied them and tried to include the .dll in the C# app, but I continuously get an error. I have gone so far as to use the wizard to create an unaltered C# windows app and an unaltered MFC .dll, complied the .dll (in both debug and release), and then tried to include the mfc .dll as a reference in the C# app (both the debug and the release versions). Everytime I try to include the MFC .dll I get the following error: "A reference to ..\test.dll could not be added. This is not a valid as ...Show All
SQL Server Stored Procedure Transfer - Best way
Question What is the best way to transfer Stored Procedures to another db without having to script it Or is scripting the best way WHY We need to transfer stored procedures from one development database to another on different machines not on the same network. Platform Studio 2005 SQL Server Management Studio Express advTHANKSance I think that scripting the objects is the more pratical way to do this. HTH, Jens Suessmeyer. --- http://www.sqlserver2005.de --- ...Show All
Windows Forms Form_Load event + BackgroundWorker Thread (VB.2005). Behaviour not as expected.
G'day, I've got a vb.net 2005 windows form opening via the following code. Dim frm As New frmOptions Me .Opacity = 0.8 With frm .ShowDialog() ' Do something here if the databases have changed. Me .Opacity = 1 Call Me .SetupLogin( True , e) End With In the Options form that I'm opening I'm doing some searching for actual SQL Server databases available to the user and this takes a while to perform, so I've used the background worker thread to help speed up the loading of the form. Example. Private Sub frmOptions_Load( ByVal sender As Object , ByVal e As System.EventArgs) Handles MyBase .Load BackgroundWorker1.RunWorkerAsync( GetActualSQLServe r) ' Do a heap of stuff th ...Show All
.NET Development two projects in one solution needing a common resources file
Hello: I have two projects (for simplicity, let's call them proj1 and proj2) in one solution. Both of them need to have access to a resource (.resx) file, which I added to proj2. Is there a way for proj1 to access these resources more gracefully than to have to load the second assembly in proj1 Sorry, I'm new to distributed applications programming; any useful info would be helpful. Hi Vlanik, As long as you already add a reference from proj1 to proj2, you can directly call your resource file by it's name (without .resx extension). Cheers, Lok ...Show All
Windows Forms what do I do if I want some code to execute after the installation
Where do I put it pls Thanks While Setup Projects offer far more customizability over a ClickOnce installer, they still leave much of the power of MSI outside of your reach... you may want to look into some custom code within the overall process ... even if it does not occur at the absolute end. ...Show All
Community Chat Opensource C# BitTorrent library
Hi there everyone, I've written an open source bittorrent client library which runs on Windows/MacOS and nearly all flavours of Linux which is pretty much at Beta 2 status, i.e. most of the really big bugs are gone. The source is available at the public SVN for mono under the Bitsharp folder (details can be found at www.mono-project.com). There is also a TorrentCreator and BitTorrent Tracker library available at the same place, both written in C# aswell. Those are also needing developers should anyone be interested in pitching in. Example code and a more detailed blurb is at www.mono-project.com/Bitsharp. Basically, i'm doing a call to developers to: 1) Try and find a few people who wish to help with further developing the library. 2) Try ...Show All
SQL Server VARBINARY and DATALENGTH()
I have two databases that have the same exact tables. Each table has a varbinary(max) field that will hold a pdf file. In one database, I can use datalength() on the pdf varbinary(max) field and it will return the same number of bytes as the actual size of the file. In the other database, I use datalength() on the pdf varbinary(max) field it it returns exactly half the number of bytes as the actual size of the file. Do you know what is causing this I know that nvarchar will return double the bytes. But this is returning half. Any suggestions would be appreciated! Trish Here is what I found out. I had a problem with my PDF files. I had pages but no data on them. Once I fixed that we foun ...Show All
Visual C# DbCommand Property
Hi, I want to create a property that will handle SqlCommand and OleDbCommand values. for that I defined this propery: public DbCommand DbCmdProperty { set { DbCmd = value ; } get { return DbCmd; } } how can I get a "Name" value in the Properties Window on the Designer, that will tell me if I'm working with a SqlCommand or OleDbCommand (Hoped I succeeded to describe my problom correctly...) This is problematic for a number of reasons. You are trying to add a property to an existing class (This can be done, but it's probably more work than you want to do (and definitely more work than I want to explain)) You want a design-time property to view ...Show All
SQL Server Database Issue
HI, I can't seem to wrap my head around this problem. Hopefully it's a simple solution. I have 2 tables, one called SETNAME, and one called PLAYERS. SETNAME has 2 fields (NAME and SETNAME ID) PLAYERS has 4 fields (LAST NAME, FIRST NAME, PLAYERSID, and SETNAMEID) The two tables are tied together via the SETNAMEID field. My issue is this, how do I associate more than one set to a player, without duplicating the names of the players in the PLAYERS table Thanks Peter That is good. One thing to note is that this is the Transact-SQL forum. If you have questions about how to work with a front end tool using the data/queries, then you will need to go to the forum that supports the ...Show All
