MMV2007's Q&A profile
Visual Basic Printing forms using VB2005 Express Edition
How do I printout text and graphics on forms using VB2005 Express Edition You print in .NET using the PrintDocument class. The 2003 101 Samples contain a printing example. I'm not sure about the 2005 101 Samples but the process hasn't changed so you can still use the 2003 version. Search MSDN for '101'. ...Show All
Visual Basic Formatting the msgbox
I am creating a simple payroll calculator. It crunches some numbers and spitts out an report-like messagebox. For now I've thrown together msgbox ("Ouput here") but the box that results is small. Is there a way to format the size of the message box Is there a better type of output (ie a report similar to one you'd find in access ) Thanks The more text you put into a messagebox, the bigger it gets. However, if you want to output some sort of report, a messagebox is the wrong tool, you should create a new form to show the report. A datagrid is the best control that's built in for showi ...Show All
Visual Studio VSS & ASP.Net xcopy deployment question (really, really basic!)
A really basic question - but one which I can't find answered anywhere. I'm using VS.Net 2003 to develop a web app and VSS 6.0 to source control the files (isolated development mode). When do I copy the files to the "webserver" that I will be deploying the application to Do I make my changes, compile (release mode), copy out to server, THEN check the files back in If not, the files are marked read-only...or is this not an issue Sorry for the novice-ness of this question, I'm sure it's basic but I can't find anything that talks about this particular "step" of the "easy x-copy deployment process". Many thanks! quin ...Show All
Visual Basic Sockets... HEEEELLPPP! :)
Hi, everybody. I'm busy porting over a Telnet server application from VB6 to VB.net. But I've hit two MAJOR hurdles. The first thing I noticed with VB.net is that there is no Winsock control. Damn. So now I've got to use the System.Net.Sockets. OK. But I also need to use Threading apparently. I've found this one hell of a learning curve and was just wondering if somebody could post an example of a simple TCP/IP server that listens on a port, accepts multiple connections and sends a message to each user that connects. Once I've gotten past this stage, my .net blues are over and I can start using the new features! Cheers, everybody Will ...Show All
Visual C# Focus() problem
I want to open a windows form and set focus to the first field. There are many panels, group boxes, controls and event handlers in this form and they are apparently interfering with setting focus, which leads to three questions. 1) Is there a sure fire way to set focus to a particular control on load. This particular control is a form being loaded as a showdialog from another control. I've tried calling [control].focus() as the last item in the form_Load event and it does not work. 2) The tab order appears to want to cycle through all controls in a container, like a panel before going to the next panel. I do not want this order. Is ...Show All
.NET Development How To Easily Change Connection To Access Database Created Using "Add New Data Source" And Draging Table To Form
Hello, I created a small application that works, but I want to be able to change the location of the database in a more simplier way. By this, I mean to accomplish this task, I could just delete my dataset, binding source, table adapter, and binding navigator. Next, I would add a new data source and connection to point to the new location of the database. But, this would mean that every time I do this I have to also change properties such as color etc etc etc. So, I'm looking for an easier way to change the location of the database in my application. In addition, I have to hard-code the full path to my dat ...Show All
SQL Server VS2005/SQL Server 2005 Mobile subscribing to SQL Server 2000 publication
Hi. I have an upcoming PDA project, and I would like, if possible, to use VS2005 and SQL 2005 Mobile, rather than VS2003 and SQL CE 2.0. However, the back end will be a SQL 2000 publication. If SQL 2005 Mobile subscribes to such a publication, can anyone tell me which (if any) of the new features in SQL 2005 Mobile will be available (In particular, column-level tracking and sync progress status) Thanks. A SQL 2005 subscriber cannot subscribe to a SQL 2000 merge publication. Please see topic "Using Multiple Versions of SQL Server in a Replication Topology" in Books Online for more information. ...Show All
SQL Server Caching inside SQLCLR
Hi, My .NET SQL UDF needs do very complex computation on every call regardless on user input. I would be very happy if I could cache this computed data somewhere in SQL Server memory. And then I should not need to recompute this complex information on every UDF call. Is it possible to cache something inside SQL Server from CLR Thanks. The simple answer is that yes, you can cache. You can set up a private static readonly collection (e.g. a Dictionary) inside of the class that holds your UDF, and it will be available from within your UDF. This brings up several questions, however:&nb ...Show All
.NET Development [2.0] InvalidOperationException: The Undo operation encountered a context that is different from what was applied in the...
Hi, I have a Windows.Form application that call a method in a remote object when the user press a button. That application works fine in .Net 1.1 but in 2.0 returns the following error: "System.InvalidOperationException: The Undo operation encountered a context that is different from what was applied in the corresponding Set operation. The possible cause is that a context was Set on the thread and not reverted(undone)." And there's no stack trace (VS2005 shows only "External Code"). The latest thing I'v tried was calling a method in the remote object using Invoke and Delegate: delegate string Delegat ...Show All
Windows Forms Cycling through each cell? Embarassing question...
I'm sure what I'm trying to do is easy but I'm new to C#/.NET and have been struggling to find the answer. I've got a DataGridView which is filled from an online database(bound in code, not in the designer) and whenever a cell has been edited I change the Style for the current cell from the default to an alternative which changes the tex ...Show All
Visual Studio VSS 2005 step by step set up and tutorial
Helo all....i am looking for a simple step by step tutorial which i can download and reference offline, if you know of any please point me to the right direction. Thanks The pre-release documentation is also available at: http://msdn2.microsoft.com/en-us/library/3h0544kx Regards, ...Show All
Windows Forms datagrid problem when accepting changes after deleting row
I have a datagrid on a form in which the user can insert, edit and delete records. It seems that it is working fine but when I'm deleting a row and accept the changes in the linked datatable (dg.datasource), the grid shows an additional row with dbnull values if I insert a new row/value. For example: The grid shows 111111 222222 empty row I delete 222222 the grid shows 111111 empty row I add 333333 in the empty row and click somewhere in the grid the grid shows 111111 null null empty row What I'm doing in my code is handling the dg_CurrentCellChanged event: save the changes to the database, and accept the cha ...Show All
SQL Server How do I save a Stored Procedure in SSMSE?
Hi, I right-click on Programmability/Stored Procedures and click on New Stored Procedure. After I've created and tested the stored procedure, I try to save it, but SSMES tries to get me to save it as a file in the Projects Folder rather than in the appropriate MDF file, where I assume the existing stored procedures are stored. I've also tried executing the procedure - it executes fine - but it still doesn't appear in the Stored Procedures folder. How do save a stored procedure so that it appears under Programmability/Stored Procedures Thanks very much. Regards Gary I've found the s ...Show All
Visual C# How do you make a specific column in a datagrid readonly?
How do you make a specific column in a datagrid readonly I have a datagrid with 12 columns and I want to be able to make certain columns readonly. I binded my datagrid to a datatable and already created the columns and the rest of the fields are populated. col1, col2, col2, ....... please help, thanks ahead Chan Here is one way I do it in my programs: This is the whole block of code, but you can see the line in red is how you would make that individual column read only. DataGridTableStyle DcStyle= new DataGridTableStyle(); DcStyle.HeaderForeColor=Color.White; DcStyle.HeaderBackColor=System.Drawing.Colo ...Show All
Visual Studio Team System I do not have permission to view the sharepoint webpage
Hello! I've just installed Windows Sharepoint Services and when trying to got to http://localhost/ I get this: ------ You are not authorized to view this page You do not have permission to view this directory or page using the credentials that you supplied because your Web browser is sending a WWW-Authenticate header field that the Web server is not configured to accept. ----------- I am logged in to the Administrator of the domain, what is it that I have to do and how do I do it =) Thanks in advance! See this post: http://forums.microsoft.com/msdn/ShowPost.aspx PostID=2127 ...Show All
