Meggy's Q&A profile
.NET Development Inserting into two sql tables at the same time
Hi, I have two tables in my database, Orders and OrdersId and are laid out as following: Orders OrdersId ------- ---------- OrderId (comp key) OrderId (PK) LineId (comp key) RepId ProductCode CustId ProductPrice ProductQuantity The OrderId field in table OrdersId is the primary key, whereas the Orders table has a composite key (OrderId and LineId). I need to add a row of purchased item data data into both tables but am not sure how. I want the OrdersId table should be filled first as the OrderId field is also required in the other table, but how do I take the OrderId value and fill the the Orders table including this value ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Sprite is not transparent
Ok I finally got the game to work but I have a new problem...my texture which I made transparent in DirectX, doesn't have the transparent background when I run it. Is this due to my graphics card & me adding that line of code to make the program work Sorry I can't remember the exact line but it's been floating around the forums, I think we all know what it is. Did you add in the AlphaBlend when you begin drawing your sprite That parameter was missing from the original tutorial. //Clear the graphic devices (set background color) graphics.GraphicsDevice.Clear(Color.CornflowerBlue); graphics.GraphicsDevice.BeginScene(); //Begin drawing the scene. Using AlphaBlend as the blend mode ...Show All
Windows Forms SDK - CertMgr.exe
Hello, I found this MSDN article which talks about calling certmgr.exe to automate adding certificates on the client work stations. http://msdn.microsoft.com/library/en-us/dnwinforms/html/clickoncetrustpub.asp frame=true But I find that CertMgr.exe is a part of the SDK and not just the framework redistributable. So how does one automate the task of installing the trusted publisher and Certifying Authority certificate TIA Avinash ...Show All
.NET Development Is this a bug , any one can tell me?
I found a bug when I am programing: when I use like this: " ".IndexOf(" ") is returns -1,when it should return 9; but " ".IndexOf(' ') is OK. and belows all worked well: " ".IndexOf(" "); " ".IndexOf(" "); " ".IndexOf(" "); My environment is : Windows XP SP2(English Edition + Mutil-Language Pack) + .NET Framework v2.0.50727+Visual Studio 2005 PS: It works well in javascript. Actually, it is entirely by design. The trailing character at the end of the string is U+ff9e, a.k.a. HALFWIDTH KATAKANA VOICED SOUND MARK. It is treated as a diacritic attached to the preceeding character, and as such it modifies it's identity, the sama way that a latin letter plus a diacritic is not equal ...Show All
Visual Studio Express Editions Numeric Only Values
If in a Key_down event I want to ensure that the data that goes into the listbox is only numeric do I use a If then statement I would like it so that if the user input alphanumerica data my program will show a message box say it must be numeric and then reset the textbox to empty and put my focus back on the text box I tried the following code but I get the error message "must be numeric" even when the key pressed is numeric Private Sub TextBox1_KeyDown( ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown a = TextBox1.Text If Not IsNumeric(TextBox1.Text) Then MessageBox.Show( "Must be numeric value Text Box 1" ) TextBox1.Text = "" Te ...Show All
Windows Forms Custom Control Transparent Background Image
I would like to create a custom control. Following the advice on: http://msdn2.microsoft.com/en-us/library/yah0tcw1.aspx I inherited from class Control http://msdn2.microsoft.com/en-us/library/system.windows.forms.control.aspx My control will require two distinct and cooperative transparent items. The first is a background image which needs to display portions of a picturebox that is behind it on my windows form. In otherwords, my background image is not rectangular and needs to show through what is behind it sitting on the form. The second is the control portion needs to to be transparent by showing the background image where the OnPaint is not drawing. In otherwords, I have 3 layers. First is what is on the windows form (in m ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Clipping Layered Sprites (UI Related)
You know how in a panel if a child button runs off the side of the panel, it gets clipped. Does anyone know how one might go about doing that with XNA Or how they do it in OpenGL/DirectX Are they doing something with the stencil buffer Would this work Rectangle GetClippedRectangle(Rectangle rect, Rectangle clip) { int clipX = Math.Min(clip.Right, Math.Max(clip.Left, rect.Left)); int clipY = Math.Min(clip.Bottom, Math.Max(clip.Top, rect.Top)); int clipWidth = Math.Min((clip.Right - clipX), (rect.Right - clipX)); int clipHeight = Math.Min((clip.Bottom - clipY), (rect.Bottom - clipY)); return new Rectangle( ...Show All
SQL Server Comparing millions of records from file A and B
I'm trying to compare about 28 million records (270 length) from table A and B using the Lookup task as described in this forum. The process works fine with about two million records or so on my desktop ( p.4 3.39GHz, 1.5 GB Ram), but hangs with the amount of data I'm trying to process. I tried using full and partial caching, but to no avail. I'm thinking this is a hardware resource problem. So, does anyone has any recommendation on the hardware needed for this kind of operation and/or suggestion Thanks in advance... I'm posting all my replys about this stuff in this other extremely simular thread. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=719997&SiteID=1&mode=1 Please go to that thr ...Show All
Architecture How to prevent Service Control Manager from writing to the Event log
I am using the SCM calls like CreateService(), StartService() to dynamically load a driver. What I found was everytime I load the driver I get a eventlog message saying "The XXXX service was successfully sent a start control" I presumed one of the paramenters passed on to CreateService() or StartService() would prevent that message, apparently not. Question is how do we prevent this SCM message from getting logged in the event log Any help will be much appreciated thanks ananda ...Show All
Visual Studio Subreport could not be shown" when trying to view the report using ReportViewer.
Hi, This is an urgent query. Appriciate early response. I am new to ASP.NET. I am getting the error "Error: Subreport could not be shown" when trying to view the report using ReportViewer. I have been trying to figure out this for the past 2 days but in vain. I ahve tried all the possible solutions from the net but no success. The code sample :- ReportViewer.aspx <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ReportViewer.aspx.cs" Inherits="ReportViewer" Title="Client Service Database - Futures" %> <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Screen layout for 360 games
Dave made a blog entry yesterday pointing to another blog entry that should be a must-read for all of us considering doing 360 development. I know I had no idea about what he talks about. Terry A. King wrote: Interesting article, safe areas are one thing but how do we treat different resolutions on the 360 Spacewar was written for a 1280x720 screen which is probably the default size for HDTV if using the AV cable. If you're using a VGA connector though you've got all these resolutions available to you : 640×480, 848×480, 1024×768, 1280×720, 1280×768, 1280×1024, 1360×768, and 1920×1080. Does the 360 automatically adjust the picture size and scale to fit or does the developer have to worry about what resolution has been selec ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Setting texture wrap mode for SpriteBatch
I can't find any means of settings texture wrap mode except by using an shader which has no effect on SpriteBatch. Also I couldn't find a means of declaring a custom vertex def with transormed coordinates but I admit to not looking real hard for that one yet. If I could that then I could just write my own sprite engine with full effect support. I read a post suggesting effects for SpriteBatches in the release version and I would like to second that. That would solve this little wrap problem real quick like. Other than that XNA has been a good experience so far. Still just a few days into it. I'm porting a long running and ever evolving 3D puzzle/action game from vc++ and with the exception of a few structural changes in the code its bee ...Show All
Visual Basic Text not showing up in Listbox
I have the same problem as is described on some forums: When I create a listbox, and add a number of items, the items are added, but their text is not displayed in the listbox like this VB.Net listbox add items but their text is not displayed in the listbox ListBox is displayed there, however, it has no items in it yet Text not showing up in Listbox - MSDN Forums When I build and debug the program, I get the listbox with no text displayed. However, I can click where the text should be, and I can tell there are 4 elements in the listbox. Yet, I can't seem to get them to display. I have checked the foreground and background colors, and they are set to default. The problem is your antivirus (mcafee). Download this patch http://s ...Show All
Visual Studio 2008 (Pre-release) DataBinding - Converter - how to refresh the view?
Hi All, I am trying to create a WPF app without using code behind (all the UI element will bind to the data by databinding). And this is the scenario, I have a list of Orders, each Order has a OrderStatus, so my Order object will have an order status id, to show the data on the view (tree view), I have to show the status name. I created a converter to convert id to name. But how can my tree view automatically refresh when a status name changed Thanks, VS When we generate groups, it's a one-time thing. For V1, we don't monitor the property on which you group to handle the change. You can always call Refresh on the associated CollectionView to get the groups to change. ...Show All
Visual C++ Need a work around for a static constant in a class
I am trying to create a group of classes that have variable sorting sequences. I have the following code snippet: class Person { //---------------------------- static Members ---------------------------// const short sMaxFields = 15;// Maximum number of fields static short sSortOrder [sMaxFields];// address of sort order array: // from n=0 to n=sMaxFields-1, for f = sSortOrder : f == 0 there are // no more fields to sort, if f >0 then the field f is in ascending order, // and if f <0 the field f is in descending order. //----------------------------- data Members ----------------------------// // field name field# description CString Last; // 1 Family or SurName CString Title; // 2 Mr. Ms. Mrs. Dr. Rev. etc. CString First; ...Show All
