Software Development Network Logo
  • Windows Vista
  • Visual Basic
  • Visual C++
  • Visual FoxPro
  • Visual C#
  • Windows Forms
  • Game Technologies
  • Visual Studio
  • SQL Server
  • Microsoft ISV
  • SharePoint Products
  • VS Team System
  • Audio and Video
  • Smart Devicet
  • IE Development

Software Development Network >> ctzseng's Q&A profile

ctzseng

Member List

Ion101
jlf0002
Tobias Alte
Rik Dodsworth
Andriy G.
RMS
Joe_D
JSR2005
Brandon Tucker
seco
Software Engineer
Scott McKeown
jwagner20
FcoLomas
KingofGing
Lars Brange
EtherealSky
ajduck1
Yousef ED
Tony Sperling
Only Title

ctzseng's Q&A profile

  • SQL Server Boolean ? in SQL (2005) table

    I was wondering what should be used for a yes/no/ entry identifier . Should it be a simple int , tinyint , or uniqueidentifier Thank you No problem: 0 --> No, False 1 --> Yes, True ...Show All

  • .NET Development Escaping decimal points in regular expressions

    I'm trying to do something that ought to be very simple. I'm trying to test whether a string (which is an argument to a command) is a valid value of the type I need. That is, I want it to be convertable to a double and be in the range 0.1-1.0. I have this line in my code: Regex ValidPause = new Regex("^((1\.0)|(0\.[1-9]))$"); The problem is that VS marks the string as bad and gives me the message "Unrecognized escape sequence." If I take out the backslashes, the red squiggly line goes away, but then it matches "0x0", which is obviously not what I want. How should I escape the decimal points correctly Thanks! That worked. I didn't think it would because I thought the '@' just ...Show All

  • Windows Forms scroll-bar on a datagrid needs to show most recent item added

    My datagridview cotrol is large enough for 10 rows after which the vertical scroll bar appears. The problem is that my datagridview then does not show the last item added, instead the scroll bar maintains it's position showing all of the entries at the top and not the most recent at the bottom. Is there a way to always show the last Item added to the grid Many thanks this can be done many ways, I use: dataGridView1.CurrentCell = dataGridView1.Rows[row].Cells[col]; you can also use the datagridview.firstDisplayed... properties ...Show All

  • Visual C++ Abstract class object

    i hav read in all books dat we cant create object of abstract classes.. . and reasons like they are too abstract to create an object.. .. i want to know more of these reasons why we cant create objects...... . . . . manish in above case comiler is having each information to create an object then why cant we create an object of above class .. good question :) in this scenario, YES! it has enough information to create an instance, but can compiler always feel confidence to do so or you may suggest the compiler to validate the abstract class and make a decision afterwards, again YES!, you can implement an compiler that allowing you to do this, but this is an contravention to the concept of abst ...Show All

  • Visual C# DataGridView - KeyDown and KeyPress events

    I need prevent emergence signs from numeric keypad in cells of DataGridView and rerout their entry at textBox1. This code is solve the task in textbox controls, but at DataGridView no prevent entry at cell, nor from them does pass-off. Does anybody know how to solve this private void dataGridViewOrders_KeyDown (object sender, KeyEventArgs e) { if ((e.KeyCode >= Keys.NumPad0 && e.KeyCode <= Keys.NumPad9) || e.KeyCode == Keys.Add || e.KeyCode == Keys.Divide || e.KeyCode == Keys.Multiply || e.KeyCode == Keys.Subtract || e.KeyCode == Keys.Decimal) { // Determine whether the keystroke is a backspace. if (e.KeyCode != Keys.Back) { // Set the flag to true and evaluate in KeyPress event. flag = true; } } } private void dataGridView ...Show All

  • Visual Basic An unhandled exception of type 'System.InvalidCastException'

    Hello all. I’m trying to learn vb.net at home. I have a book with exercises and now I’m stuck because of this error:     An unhandled exception of type 'System.InvalidCastException' occurred in microsoft.visualbasic.dll   Additional information: Cast from string "233.3" to type 'Decimal' is not valid.   So there is code from a book:     Private Sub btnCalculate_Click( ByVal sender As System.Object, _             ByVal e As System.EventArgs) Handles btnCalculate.Click           Dim dOrderTotal As Decimal         Dim dD ...Show All

  • Visual C++ Windows Image Acquisition

    I would like to create a program that is capable to of controlling the position of my scanners scanning head in the X and Y axis. I am considering using the WIA to accomplish this - does anyone know if it provides low enough level control in order to achieve that kind of granular control If not, any recommendations on what to use WIA is meant as an interface to transfer image data; it's not intended to directly control a scanner. So, scanner specific functionality would not be available. The WIA interface would abstract the scanner into essentially a remote file store, able to transfer a particular item. What the scanner does to transfer/acquire that data is entirely up to it. ...Show All

  • SQL Server FIX TO: The attempt to connect to the report server failed. Check your connection information...

    If you get the error message: The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version. If you then scan the recent logfiles in C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\LogFiles and find the following exception: Microsoft.SqlServer.ReportingServices2005.RSConnection+MissingEndpointException: The attempt to connect to the report server failed.  Check your connection information and that the report server is a compatible version. ---> System.Net.WebException: The request failed with HTTP status 404: . it means that you have configured the /reportserver/ app to not be reachable via http://localhost/ ... - there are two options ...Show All

  • Game Technologies: DirectX, XNA, XACT, etc. XNA/Xbox 360 memory management heads-up...

    I was just browsing through some docs on the 360's heap manager, and it turns out it is a compacting mark and sweep collector rather than the generational model used on the desktop... So... what's the deal regarding: Large block allocation (will it have a large object heap like the desktop version ) GC pauses times (do all threads halt during GC) Rico Mariani recommends a heap size equivalent to the Gen 0 size on the desktop, i.e. ~cache size. That seems way too small unless we are dumping lots of game data into unmanaged memory! Andy. AndyL wrote: I doubt you'll even be allowed unsafe code blocks on the 360 due to the security implications. You're correct. 360 games using GSE will exist in ...Show All

  • .NET Development 64 bit rookie question

    I am deciding on a development box right now. My chief aim is to be able to develop and debug with Visual Studio 2005 Team System on an x64 Xeon 5130 proc. Specifically, I am wanting to do testing with 12gb ram - having a set of very large in-memory collections utilizing almost all of the ram capacity. Through what I have read in various forums/blogs is that I can do this bec my cpu is X64, I just would like to hear from you guys as you have a lot more experience in this area and I don't. Here is a link to the processor info if that helps. I don't see any issues myself. http://www.intel.com/design/intarch/dualcorexeon/5100/index.htm The only thing I have read is that IA64 processors will not allow you to build and/or complile VS.N ...Show All

  • Windows Forms error ConstraintException was unhandled

    Using VS2005 c# I have a databound combo - to which is assigned the primary key to Access Table. Whenever I change the selection I get the following error. ConstraintException was unhandled Column 'INVNumber' is constrained to be unique. Value '1/2-24"LM' is already present. How can I avoid this error. -using the previous/next button on a bound navigator does not cause the problem - the records are displayed. Hi, your INVNumber column in the dataset table is constrained to only accept unique values. When you try setting some row's value to the value '1/2-24"LM', you'll get this exception when another row, having a column with the same value, is already present in that tab ...Show All

  • Software Development for Windows Vista DeleteFile, then MoveFile Fails. is Delete Asynchronous?

    I am currently having problems DeleteFile (or what i believe to be DeleteFile). If I delete a file, check if the file is deleted with DoesFileExist (it is) then use MoveFile to a file with the same name/location as the that was just deleted, I receive a Error 183, can't move file because a file with that name already exists. I am doing this in Vista Beta 2, and the test was conducted in the C:\ProgramData folder. If the same test was conducted in a directory in Program Files, the files were virtualized and the same error was not seen. Also if a sleep for 1 millisecond was entered directly before the MoveFile no errors were seen. Is this a known issue or has the DeleteFile been changed if someone else has the file open with FILE_SHAR ...Show All

  • Visual C# Switch statement

    Hi, all: [I guess this could be considered a rant, but I'm still curious if anyone shares my opinion on this] I am still wondering why the switch statement is not more flexible. For example, I feel that a switch statement using objects makes sense. I'll give a more visual example for ease of understanding more than anything else, so picture this: I have three buttons on my form, button1, button2, button3. I set the click event to the same event handler, button_ButtonClick. Inside the button_ButtonClick method I want to check the sender to see which button was clicked, so I do this: switch (sender) // or even (sender as Button) { case button1: // do something here break ; case button2: // do somethi ...Show All

  • Visual Studio 2008 (Pre-release) Creating an instance of class with classname stored in array

    hi all, I have developed an application in which i am storing the interface name and class name in the string array.Depending upon whether it is a class or interface,i want to get the Type so that i could use the class and instantiate it.How could i achieve this.Any help would be appreciated. Regards, spshah Hi michael, Thanks a lot. It did worked but what if i want to load the dll which also reference other dll.For eg: Like i am dynamically loading a.dll which also reference b.dll. now how could i invoke the method or create a object of the class of b.dll.How could i dynamically load the b.dll or all dll which are referred by a.dll Thanks spshah ...Show All

  • Visual C# Base64 to tiff

    Hello, I am working on converting a base64 encoded string to a tiff. I tried to create a sample client that converts an existing tiff to base64 string and then converts it back to a tiff. The resulting file for some reason, is twice the size of my original tiff and it is not formed correctly. Please guide me. //converting from tiff to base64 string tiff = @"C:\Sample\XML\Sample.tiff"; FileStream fstream = new FileStream(tiff, FileMode.Open); byte[] original = new byte[fstream.Length]; fstream.Read(original, 0, (int)fstream.Length); int fstreamLength = (int)fstream.Length; string tiffBase64 = Convert.ToBase64String(original); StreamWriter writer = new StreamWriter(@"C:\Sample\XML\SampleBase64.txt"); writer.Writ ...Show All

©2008 Software Development Network