bslim's Q&A profile
Visual Studio 2008 (Pre-release) Binding To a User Defined Dependancy Property
I'm still new to WPF so I'm sorry if this doesn't make sense. I have created a control that inherits from UserControl called MyUserControl. I want to use this in another project and have that working. I then created a dependency property called TestText that is a string. This will get displayed in the text box via data binding in MyUserControl. If I explicitly set this it works just fine. I want to be able to bind to that property from the window that is hosting the control. However when I try to bind in XAML it doesn't seem to update the field. When I bind using code it works. I'm fairly sure my XAML is okay because I can bind the to a label's content alright. Here is the code I am using: MyUserControl.xaml.cs: namespace CustomControlLi ...Show All
Visual Basic shell.run only once in a set timescale.
Sorry for the vague header. I have the following code: Sub OnCall (State, Name, Number) Shell.Run "C:\YACTextSend @CALL" & Name & "~" & Number End Sub Which enables a prog called Float's Mobile Agent to send incoming mobile phone caller id info to a prog called YAC eventually to be displayed as a caller ID pop-up in Media Center by MCE-YAC. It works but for one problem. OnCall is invoked at each ring so my added snippet above launches YACTextSend and pops up a caller ID window at each ring of an incoming call. I am not skilled enough to rewrite Float's prog (written in Delphi) so I have to work with the above code. Is it possible to modify my code to run YACTextSend only once in say a 20 seco ...Show All
Visual Studio Express Editions Event Handlers
I need to create an event handler that handles 36 different buttons, but I just don't have the time to type all that, and I don't know an alternative. PLEASE HELP!!!!! I am not an expert programmer, but perhaps this code will get you started. Private Sub Button1_2_3_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click, Button2.Click, Button3.Click ' Note this sub has 3 handles at the end For x As Integer = 1 To 2 If sender Is Controls( "button" & x.ToString) Then ' code for button 1 & 2 Else ' code for button 3 End If Next End Sub ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How does Vector3.Transform work?
I have the following matrix 1 0 0 0 0 -1 0 0 0 0 -1 0 0 1 0 1 and transform a zero vector by that. There is a transformation in the matrix, but I can't figure out how the math is done. Shouldn't this just be a 4x4 matrix multiplied by a 4x1 matrix For the fourth component of the vector, I tried just using 1. But when I multiplied them together by hand, I get a 0 vector. What am I missing Thanks. -Nick Note: - XNA and DirectX use ROW VECTORS ON THE LEFT. - This means that translation lives on the bottom. - Point transformations assume a "1" as the fourth vector element. - Normal transformations assume a "0" as the fourth vector element. In your example, a vector V (0, 0, 0, 1) times your matrix M will mul ...Show All
Software Development for Windows Vista Force workflow to complete
I've 3 activities in a sequential workflow, and I've added some coding in completed event. In the 2nd acticity, I want to force the workflow to complete based on some conditions, so it can skip 3rd activity and jump to the end of the workflow, and run the coding in completed event. Is it possible to do this ! Your original post sounded like you want the workflow to complete, not terminate. If you use a TerminateActivity or throw an exception, your workflow will terminate. You'll get the WorkflowTerminated event instead of WorkflowCompleted. Using dynamic updates (WorkflowChanges) is extremely inefficient. Dynamic updates are not recommended for implementing normal business logic. It's only meant for ha ...Show All
Smart Device Development directshow sample "Cameracapture" in the wm5.0 sdk failed to take still picture in my ppc
I want to write a program which can capture video and take still picture using directshow in wm5.0 ppc, so I try to use the sample "Cameracapture" in the wm5.0 sdk. it captured the video successfully but failed to take still picture. why did it happen Is there other method to take still picture It seems SampleGrabber not available in the wm5.0. I use Lenovo ET980 . No error message, but the program stopped there. It seems the operation is still going. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA Academic Edition?
Hi all, I was just wondering about a rumor mentioned in a couple of game news websites, where they hinted at the fact that any Uni partnering with MS would get an elusive "Academic Edition" What would that mean exactly Would the Academic Edition be like XNA GSE, but with some features of XNA Pro Does such an edition exist anyway in the first place I'm quite interested in this as I'm a lecturer in Game Dev, in one of the most active Unis in Australia (RMIT, in Melbourne), and I've been recently quite pleased with my XNA experimentation Cheers Thanks a lot, Dave! Either way it's fine with me...I just wanted to be sure there was no extra "feature" we were missing Th ...Show All
Visual Studio Tools for Office Deploying VSTO Word Project: could not find or load customization assembly
Hello! I developed a custom task pane with VSTO for a Word2003 report and now I would like to enable access for my clients to this document. I copied the document to a server folder in my intranet and tried opening it, but I got the following error:: "The customization assembly could not be found or could not be loaded" "The customization does not have the required permissions to execute." Therefore, I need to grant access to a server folder where the document and the assembly will be located. I checked http://msdn2.microsoft.com/library/k64zb6we(en-us,vs.80).aspx and followed the "How to: Grant Permissions to Folders and Assemblies" procedure step by step. However I still keep getting the same error! I noticed this note "You must be ...Show All
Visual C# Saving output for later reference
Hi! Im new to C#. I am doing a project in C# in which i have to perform functions like create users, delete users, etc. in a mail system. When i create a user, my mail system Zimbra returns back a small code for the created user. How do i save this code that has come on the console I would like to save all this info to a file btw. Here is an example : zmprov Provisioning 1. Account 2. Domain Enter choice : 1 1. Create User 2. Delete User 3. Get User 4. Get All Users Enter Choice : 1 Enter Username : forum1 Enter Domain : project.com Enter Password : ****** f65a1382-26de-4621-8582-cc8035e5c0a6 Do you want to continue : That line 'f65a1382-26de-4621-8582-cc8035e5c0a6' is the response of Zimbra (the mail system). This is what i want to sav ...Show All
SQL Server How to get Top 3 records in the group level?
Hi all, I have a query which is grouped by a field called R_ID, which gives me a list of records for each R_ID. So here is the thing, I want to get only top 3 records for each R_ID. I tried using 'select top 3....', but the result is not what I wanted. It doesn't consider the grouping. Is there any way to achieve this task Please let me know if some body has any idea. Thx. Lucky P wrote: I have an additional solution for SQL 2000 which uses a Partition calculation. But I'm not sure if its faster than the other 2000 compatible approach. -- Create a Temporary Table using an additional column -- Row-Number Partitioned by R_ID SELECT R_ID , text_data , ( SELEC ...Show All
Visual Studio 2008 (Pre-release) Components in CIDER
Is there a way to add components in CIDER CIDER does not seem to have a component tray. Thanks. No there will not be a way to add components using the designer in V1 of Cider. You will either need to declare the component in the in .Resources section in the XAML or declare it in code mark ...Show All
Visual Basic TextBox Input Validation
Greetings: I'm trying to get a textbox to only accept the input of numbers, ".", and the back key. I modeled this on the example in the MSDN help files, which is close to what I want and works just fine, but this tweak doesn't work. No input is accepted. The debugger will display that e.KeyCode is "NumPad5{101}", for example, but the debugger slides right over the first Case where I'd expect it to be accepted. Any other key gets the same result. What's missing here Private Sub txtExp_KeyDown( ByVal sender As Object , ByVal e As System.Windows.Forms.KeyEventArgs) _ Handles txtExp.KeyDown Select Case e.KeyCode Case e.KeyCode >= Keys.NumPad0 And e.KeyCode <= Keys.NumPad9 ...Show All
Windows Forms How to use key Enter instead of Tab in DatagridView
By default, datagridview in Winform use Enter to move focus to next row(move to cell below the current cell) and Tab to move focus to next cell in the same row(but cannot move to row). How can I make all operations use the Enter key and the current cell will move in path like shape "Z" I have tried events of datagridview like KeyDown, CellValidating, CellValidated ..etc, but fail. Anyone can help Thanks. Thanks all the proposed answer. But I have find the ultimate answer here http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=157055&SiteID=1 ...Show All
Visual C# pInvoke & IAccessible problem
Hi everyone, I am having trouble calling the function AccessibleObjectFromPoint. Here is the code I'm using, most of it taken from http://www.pinvoke.net/default.aspx/oleacc.AccessibleObjectFromPoint [StructLayout(LayoutKind.Sequential)] public class POINT { public int x; public int y; } [DllImport("oleacc.dll")] public static extern IntPtr AccessibleObjectFromPoint(POINT pt, [Out, MarshalAs(UnmanagedType.Interface)] out IAccessible accObj, [Out] out object ChildID); private static String getTextUnderCursor(POINT cursorLocation) { object varChildID; IAccessible accObject; IntPtr success = AccessibleObjectFromPoint(cursorLocation, out accObject, out varChildID); MessageBox.Show(accObject.get_acc ...Show All
Game Technologies: DirectX, XNA, XACT, etc. The shading of PS2 game okami
There is a PS2 game called 大神(okami). How to reach the effect of "traditional Chinese painting" by shader or other techniques Someone could explain the algorithm of the effect Game official sebsite http://www.o-kami.jp/ The o-kami video in "you tube" http://www.youtube.com/watch v=3fMRVnxrIKo http://www.youtube.com/watch v=JZdBpc8M-6Q http://www.youtube.com/watch v=2O3g4O3O5-w&NR The silhouette edge of the dog is draw by the pen of "traditional Chinese painting". (Please see the third video, the dog will stand statically) If the silhouette edge is used by texturing, which algorithm does the game use Is the algorithm called "texture animation" Or how to implement the edge by vertex shader and pixel shader ...Show All
