AVVIT's Q&A profile
Software Development for Windows Vista AdjustWindowRectEx wrong in beta 2
There seems to be a problem with AdjustWindowRectEx in Vista beta 2. When a menu is present the returned rect is 2 pixels higher than it should be. Without a menu the function returns the correct values. I don't have the test code handy, but it was easy to reproduce: Create a window with a menu Call AdjustWindowRectEx passing TRUE for the menu parameter Use SetWindowPos to apply the size to the window GetClientRect to retrieve the client window size - the height doesn't match the requested value Is this a known issue Si ...Show All
SQL Server how do i use select top.. in a different way???
how do i: select a second item of the top 3 most recent added item from the Product table Product ======= item ItemName AddDate ------ --------------- ------- 1 Apple 3/1/2006 2 Tree 6/5/2006 3 Grass 3/7/2006 4 Orange 2/1/2005 5 Cat 9/1/2006 Thanks, Alan, Sorry, forgot to post the SQL 2000 version (which will work in 2005 as well, of course): SELECT TOP 1 * FROM ( SELECT TOP 2 Item, ItemName, AddDate FR ...Show All
Audio and Video Development Playing sounds from markup
How would one go about playing sounds in markup Specifically, I want to trigger audio from a focused state without passing an event to script. I understand that I can create a wav object, but how is the object sent to Player.audio.effect in markup Thanks! You can find answer in the thread: "Correct Time Code" at the end by Jeff Williams. It looks like a bug in HDi simulator as it can play an effect sound without this setting. ...Show All
SQL Server Strange Insert & Update Behavior
I am using SSIS to run an ETL from my source OLTP databse to my SQL Server 2000 target. After several threads here it was recommended that I contact this group for further assistance. In a nutshell, I am seeing very strange behavior when the equivelent of INSERT and UPDATE statements (SSIS, from what I understand actually does BULK operations, but I can't make heads or tails from profiling session which is provided at the end of the post). What happens is that only the first record gets inserted or updated. For example, say I have a result set of 50 records that I want to insert into a dimension table- only 1 record makes it in! The same is true when doing an update on, say a table with 100 for which 20 meet the WHERE criteria- on ...Show All
SQL Server Calling a DTS (SSIS 2005) from a Vbscript
Hello, I would like to run a DTS using a Vbscript, i managed to get the DTS running, but i would like to pass the value of a global variable, but im having lots of dificulties. Since it is a VBS i only have access to the things registered on the registry of the machine, so i don't have access to the microsoft.sqlserver.dts.runtime, at is maximum. So i do the following Set objApplication = CreateObject( "MSDTS.Application" ) Set objDTSPackage = objApplication.LoadPackage( "T.dtsx" , True , Nothing ) 'This should pass the variable but insted i have an error set pkgVars = objDTSPackage.Variables set myVar = objDTSPackage.Variables.Add( "User::Name" , false , " ...Show All
.NET Development Must declare Scalar variable
Hi, I am using Vb.net with Sql and have the following error. Must declare Scalar variable "@ScoreDate" am going to try the data reader now to see if that fixes it but would like to know why the Datatable does not work I have looked at other Forums for the same error but have not found anything similar. Please Help This is my current code: Dim dt As New DataTable( "Scores" ) Private Sub ScoresForm_Load( ByVal sender As Object , ByVal e As System.EventArgs) Handles Me .Load GetValues() End Sub Private Sub GetValues() Dim cn As New SqlClient.SqlConnection() Try Dim da As SqlDataAdapter Dim cmd As New SqlCommand() cn.Connecti ...Show All
Visual Basic Howto with textbox and variable
I am loading a large textfile into a variable and into a invisible textbox. I have values loaded from this text box into other textboxes. I wait it so if someone edits something in one of the boxes to change it in the invisible textbox and/or the variable. I want to know I can search line by line for certain text in either the textbox or variable. Ok I have tried everything I can think of to replace the line found with the text entered into the text box. Here is a snippet of the code I am using: Dim i As Integer = 0 For Each s As String In FileStream.Lines If s.Contains("Config Settings = " & ConfigSettings.Text) Then For Each d As String ...Show All
Visual Studio Express Editions MSDN webcast. C# game programming
I'm new to all this so I need someone to go ahead and tell me what's what. I am wondering about the Webcast section on game programming at: http://www.microsoft.com/events/series/msdnvideodev.mspx Is this stuff free, or do I have to have a subscription to something I can't figure it out. Whenever I go to download one of the webcasts in the 3d programming section, I can't download any video but the part 1 of 11. Hi patio87, If you have a .Net Passport (which comes with hotmail or you can join by using MSN Messager) you can sign in and download all 11 of these videos and more. But if you are new to C# I would advise that you take this very slow, C# is a complex language to learn and starting with g ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Collision question, I have it working but "normal" bounce question
OK, after hours or working I got pixel perfect to work. I can have any shape, any site sprites and they will collide if two pixels match up. Now, my next part is response. If I have say two blocks collide moving on the same x-axis then they actully collide on multiple spots(the whole y-axis) to to bound properly I need to bounce off the normal(average) of all the of y positions. Hard to pictures, let me draw something... http://dxxd.net/keith/coll1.jpg Two boxes, they collide all along the box so I need to find the moddle point and bounce off that. http://dxxd.net/keith/coll2.jpg More complicated, they bounc off a bunch of different x's and y's, yet again I need to find the middle point to bounc correctly. Any ideas ...Show All
SQL Server Non-sync initialization
Dear friends I read about 'NoSync' initialization.I tried out in my system.That time after executing Sp_Scriptpublicationcustomprocs,Stored procedures are propagated to subscriber.Replication was working fine.But afterwards I got some problem.So I reinstall my SQL Server I agin tried 'NoSync' initialization.This time Stored procedure is getting created on Publisher database not in subscriber.Can you tell me what may be the reason I have two other doubts also 1)Sometimes I am getting error in subscriber.'The process couldn't connect to Distributor'.How to configure distributor in this case in configure publishing,distributor wizard I won't able to do anything like that change distributor login or something 2)How to delete Distribu ...Show All
Visual Studio Tools for Office How To Use the WebBrowser Control to Open an Protected Office Document in Visual Basic .NET?
How To Use the WebBrowser Control to Open an Protected Office Document in Visual Basic .NET I think this is somewhere in AxWebBrowser.Navigate flags as object or something. Please help! ...Show All
SQL Server Need sql script or statement to extract all relations from one tree
Suppose I have a table with relations (REL). In this table there are relations between parent en child, so the columns are: Rel_Id, parent_Id, child_Id. Example: 1, A, B 2, A, C 3, A, D 4, B, E 5, C, F 6, G, H 7, G, I 8, H, J I need a query which returns all relations from REL that are in the same tree as the input unit. In the example, giving D as input unit, it should return relations 1, 2, 3, 4 and 5, because A, B, C, E and F are (in)directly related to D and belong therefore to the same tree. Giving H as input, it should return relations 6, 7 and 8. (with a tree, I mean that a parent can have 0, 1 or more children and a child belongs at most one parent.) Thanks for your help in advance! He ...Show All
Windows Forms Clicking an invisble button
Hi, Is it possible to click an invisible button For the application I am writing (a game) I need a button which when clicked becomes invisible and performs a function (displays an option). However the user may select not to proceed with the option and want to restore the position by clicking the original button position. I can set the button.visible = false but cannot deselect the action by clicking again where the button was. Can it be done after the button hide we can get button location and width and height to fire form click event as follow, hope it help you private void Form1_MouseClick( object sender, MouseEventArgs e) { int x= this .button1.Location.X; int y = this .button1.L ...Show All
Visual Studio Express Editions Question on Form1.Load event
Hi, This has to be a simple problem; tonight I'm unusually dense. I have a simple application that has a Start button. The Start button calls a subroutine DoIt(). I'd also like the DoIt() subroutine to be called when Form1 loads. The Form1.Load eventhandler has a single statement; DoIt(). The Start button works fine; DoIt() is called, but the Load event handler does not DoIt()! I have tried to DoIt() from different Form1 eventhandlers i.e., Activated and Shown, but they don't DoIt() either. DoIt() reads default data from two Form1 textbox controls, does some calculations, and writes the answer to a textbox. How can I DoIt() when the Form1 loads Thanks. If the graphics is in say picturebox1. Put the draw code in picturebox1 ...Show All
Visual Studio Express Editions Manual Update
anyone got any example code on manually uodating your application without using the clickonce upload installer, this would help me out alot. yeah I did read that thread lol. Renee how do you do, could you help I did try sharewarestarterkit but It wouldn't configure for me. ...Show All
