Coryc's Q&A profile
Visual Studio Express Editions Array of text boxes
I need to organize some text boxes into an array. Assume I have six text boxes names A0 through A5. I have some data to display in each. The code to do this looks a bit like this: A0.Text = Convert.ToString( data[0] ); A1.Text = Convert.ToString( data[1] ); etc By the time we code up all six, and when more processing is needed, it gets rather ugly. I would like it to look more like this: for ( x = 0; x < 6; x ++ ) text_box[ x ].Text = Convert.ToString( data[x] ); Is there any way to do this with a fairly small amount of code Hi, bk13 As the way nobugz described, you can meet the need. In the first example, he creates an array of textbox contains two members that refer to two textboxes tha ...Show All
SQL Server Procedure expects parameter which was not supplied...?
I have this SP definition and below that the code to execute it from .Net. But I'm getting this error: Procedure 'GetNewId' expects parameter '@Key', which was not supplied. Saw an solution on some site which said to set the value of the output param to NULL before calling it, but that didn't do anything. Anyone have any ideas why this may be happening Thanks in advance. CREATE PROC GetNewId(@TableName varchar(32), @Key bigint OUTPUT) AS Declare @NextKey bigint BEGIN TRAN SELECT @NextKey = NewID from ID where TableName = @TableName IF (SELECT @NextKey)IS NULL BEGIN INSERT INTO ID(NewID, TableName) VALUES(0, @TableName) END UPDATE ID SET NewID = NewID + 1 Where TableName = @TableName SELECT @NextKey = NewID from ID where TableName ...Show All
Visual C++ Accelerator letter in menu
Hello, I am developing an app using VC++ 2005 and MFC. The app menu contains some accelerator keys that are visible only when we press ALT (its default characteristic). Is there any way I can make them visible all the time This behavior depends on system settings: Display Properties - Appearance - Effects - Hide underline letters for keyboard navigation until I press the Alt key. In the program you cannot change this. User who wants to see underline immediately, unchecks this it his computer settings. ...Show All
Visual J# multiline textbox loses \n during resize
I have a multiline textbox that receives text my functions. At the end of each function, it appends "\n" to the textbox. If I resize the window, the textbox resizes properly, but the text inside it loses all the new lines. Example: text before resizing: results1 results2 results3 text after resizing results1results2results3 why is this happening, and what can I do to avoid it.. Please try: this .textBox1.set_Text( "Line 1\r\nLine 2\r\nLine 3\r\n" ); Add \r\n not only \n Best Regards Lars-Inge Tonnessen VJ# MVP ...Show All
Visual Studio Express Editions Visual C++ Express: Examples
Hi, I've written a fair amount of code in C++ Express, but its always been standard ANSI C++. Now that I'm onto Windows stuff I'm stuck and nowhere seems to have decent code I can look crib. Can people please reply with links to good Visual C++ Express specific code examples. I want to write a small single-instance listbox driven application launcher, preferably populating the list box from a directory of shortcuts, so if there are any examples relevant to this I would be grateful. Cheers, Dave Steadman. Hi, Try with this link. There is book Visual.C.plus.plus.2005.Express.Edition.Programming.for.the.Absolute.Beginner. It's good for start. http://www.programmerworld.net/books/visual_c ...Show All
Software Development for Windows Vista Writing a Splitter filter that works with DirectShow editing services
Hi! I'm trying to write a new type of splitter filter (that will handle a new type of fileformat). The filter works fine in a simple graph like this: File Source -> My Splitter -> Decoder -> Renderer but somethings goes wrong when it is instanciated by DES: File Source-> My Splitter -> Decoder -> Frame Rate Converter -> DES -> Renderer My splitter inherits from CBaseFilter and implements IMediaSeeking. It has one parser thread and one delivery thread per output pin. The behaviour experienced is somewhat different in the different cases. In case one i just get a Pause from the Filter Graph Manager, after which I start the parser thread and start delivery on the output pins, and a frame shows up ...Show All
.NET Development TransactionScope committing without being told to!
I ran into a huge problem using TransactionScope. I've been using it inside some classes that manage persistence to a database. I intended to use System.Transactions so that calling classes can wrap my persistence manager classes in a transaction scope and thereby control whenther or not a transaction commits or not. The persistence manager is blissfully unaware that the transaction it uses internally is being controlled by an external transaction scope. Here's an example of my problem: public void Test() { string conString = "Data Source=localhost;" ; SqlConnection con = new SqlConnection (conString); con.Open(); this .DoDatabaseStuff(con); con.Close(); } public void DoDatabaseStuff( SqlC ...Show All
Visual Studio Express Editions Where does the .NET framework put programs?
I wrote a small application in VB Express and installed it on my laptop which runs Windows ME. After installing the .NET framework the application loaded and ran ok. I'm reconciled to the fact that the .NET framework will have to be installed on all my client's computers (even though it took 20 minutes). But the code isn't located in the "Programs" folder. Is this normal Is there any way to have the installer put them there I want to distribute my application from one CD to run under Windows 98, ME, 2000 and XP. Will this be a problem Renee - i hope - is referring to setup Projects (are a blessing), not OneClick publication (a curse - YYMV). With the method of one-click publication, ...Show All
Visual Basic Scroll event for the ListBox control
I have a ListBox control on a form in a Windows Forms app. The list contains more items than it can display, so the vertical scroll bar appears automatically. My question is, does any event fire when a user scrolls the list I know the TopIndex property reflects the index of the top-most displayed item, but it doesn't appear to have a change event associated with it either. If there are no events that fire when the displayed list has changed (Layout and Paint don't work), does anyone have any ideas on how to detect that in code TIA- This may not be what your after, but if you change the list box to owner drawn fixed and implement the method below (adpated from the online help) it will certainly be ca ...Show All
SQL Server Very Urgent, Done a mistake. please help
I am using Sql Server 2005, i have two tables master and details. accidently i excuted an update query to change column name called transaction refererence(t_ref). in master and details table t_ref is the reference column. instead of update one record in detail. my updated query change change all the reference into one. i feel like escape from my company. i scared pls help. any way to roll back. following is the query i have excuted, which going to cause damage in my life, pls help --update t_details set t_ref='TR2007/02/27-4:16:52 PM' --where serialnumber='771110012657' and t_ref='TR2007/03/02-4:16:52 PM' I would recommend that you read more on SQL Server Backup and Recovery. This will help you understand what our friend is ...Show All
Visual Basic how to bind 2 comboboxto the same data table but make them select separately?
Hello, I am trying to bind two comboboxesto the same data table created using the getSchema method.(I wanted to put the list of columns in the combobox) so I used this Dim colSchema As New DataTable Dim colView As String() = New String() {Nothing, Nothing, colClass, Nothing} colSchema = fileConnection.GetSchema("COLUMNS", colView) cmbScore1.DataSource = colSchema cmbScore1.DisplayMember = "COLUMN_NAME" cmbScore1.ValueMember = "COLUMN_NAME" cmbScore2.DataSource = colSchema cmbScore2.DisplayMember = "COLUMN_NAME" cmbScore2.ValueMember = "COLUMN_NAME" now, after testing, I find that whenever I scroll things in cmbScore1, the same thing will ha ...Show All
Visual Studio Custom Build Step Failure to Execute
Hi, I'm using VS2005 Professional Edition. As part of my Solution, I have a mixture of FORTRAN (Good old Engineering Code...) and C Code. I have Intel FORTRAN Compiler 9.0, but I'm using Custom Build Step in a C++ Project, instead of the less enjoyable FORTRAN Projects to build the FORTRAN Files. Anyway, all of these Custom Builds work fine on the FORTRAN Code, just as they did under VS2003. As part of this Solution, I also have Custom Build Steps that do not produce any sort of .obj files, or linkable files that are actually part of the final executable. They are included, for convenience, in the Solution to automatically generate some binary files that are needed for the runtime executable to work properly. The binary files are gen ...Show All
SQL Server Design/load question
Hi. I am redesigning a database to be more normalized. There are 4 columns that appear in many of the tables that I plan to add to a new table. Here is what the database looks like now: table1 uniquecolumn1 uniquecolumn2 uniquecolumn3 samecolumn1 samecolumn2 samecolumn3 samecolumn4 uniquecolumn4 etc. table2 uniquecolumn1 uniquecolumn2 uniquecolumn3 samecolumn1 samecolumn2 samecolumn3 samecolumn4 uniquecolumn4 etc. table3 uniquecolumn1 uniquecolumn2 uniquecolumn3 samecolumn1 samecolumn2 samecolumn3 samecolumn4 uniquecolumn4 etc. If I add a 4th table with the columns that are the same in each of the tables, I'd have this: table1 uniquecolumn1 uniquecolumn2 uniquecolumn3 uniq ...Show All
SharePoint Products and Technologies hosts file problem in multehomed environment
We have read the issues about /etc/hosts in the beta, but we think there are still problems around... We are testing sharepoint in a multihomed environment. The computer has two ips, 192.168.0.3 and 192.168.0.4. All Sharepoint application roots are bound to 192.168.0.3 on port 443 SSL using a wildcard certificate and host header. We have a running another application on 192.168.0.4 bound to port 443 SSL. It is working all fine, but if we let the search service to update the hosts file, all application roots set to 192.168.0.4. 192.168.0.4 ssp.domain.tld # Added by Office SharePoint Server Search (2/13/2007 11:33 PM). 192.168.0.4 users.domain.tld # Added by Office SharePoint Server Search (2/13/2007 11:33 PM). 192.168.0.4 portal.do ...Show All
Visual C# unsafe code compilation in Visual Studio.NET
hi there ! I am extreamy new in vs.net and I can not compile the unsafe code through VS enviornment , there must be some thing for that but I dont know how thanks If your relatively new , I would be very cautious using unsafe. This can result in unexpected runtime errors that won't be caught by exceptions. Craig Maslowski, MCT ...Show All
