Yorker's Q&A profile
Smart Device Development Struct and bytes array
Hello! There are some problems with put struct on bytes array in CompactFramework. I try to use Marshal.PtrToStructure, but it does not work in PocketPC, because attribute FieldOffset() can't work with non intersect fields in my structure(field alignment requirements ). Please, prompt me what other way exists. Thanks! No, P/Invoke is not affected by that because alignment rules on managed and native sides are the same. Your structure does not have alignment issues. Also you don't need Struct field and you probably don't need any FieldOffset() attributes at all since your offsets are matching natural element size. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Where does Console.WriteLine() go to on 360?
Probably a setup problem, but I can't seem to get any text sent to Console.WriteLine() to appear in the output window in GSE, when running the app on my 360. Anyone else managed to get this working Andy. Use Trace instead of Debug. System.Diagnostics. Trace .WriteLine("This works the same on both Xbox 360 and Windows."); Output goes to the Output Window when you're debugging, and it is not configuration-dependent. You may want to remove these after debugging, as they may have some perf impact on the Xbox 360 (especially if you're generating a bunch of output per frame). --Stephen [edit: This is what happens when you are distracted in the middle of writing -- leaf already a ...Show All
Visual Studio 2008 (Pre-release) How to access attached properties programatically?
I am creating a rectangle programatically in a control and I want to be able to position the rectangle at a location relative to the Canvas Top and Left. The control is a Canvas and the rectangle is one of the Canvas' children. In xaml I do this with, e.g. Canvas.Top="5" but how can I do this programatically The rectangle does not have a property Canvas. I'm guessing that I have to use an attached property to the rectangle or is it part of the control's properties which in this case is the parent Canvas Thanks for any help. Or you can call SetValue(Canvas.Top, someInt) and SetValue(Canvas.Left, someOtherInt) That's how you normally set an attached property, the same way you set a normal ...Show All
SQL Server Setup replication job in cluster2005 failed with unknown user name or bad password
Hi all, I am setting up the replication with the scripts which used to setup in MSSQL2005 (non-cluster server). After I run the script and start the snapshot agent, log agent or distributed agent, it prompts, Unable to start execution of step 2 (reason: Error authenticating proxy abc.com\admin9, system error: Logon failure: unknown user name or bad password.). The step failed. abc.com\admin9 is the administrator for all cluster, mssql service and I am sure that the username and password is correct. Any advise Thanks in advance. Is abc.com\sqmin9 in sysadmin/dbowner role for SQL server On SQL 2005, I believe you need to add this account into the global domain group you specified during SQL installation. Otherw ...Show All
SQL Server Incremental Update
Good afternoon, I was wondering if someone could help. I'm busy researching into SSAS's capabilities, specifically Incremental Updates, however this would be the first time I'm working on SSAS, so I don't know where to begin. I've read through the BOL July 2006, and it explains that you have to enable this option; however to me it's not very clear. I followed the steps outlined in the Book; however when I go and update the source table, the partition does not update automatically. Could anyone please let me know if there is a website detailing how Incremental Updates work, and also how to set it up correctly Thanks Colin. Hello Colin, I would like to stress Tomas's warning about converting d ...Show All
Visual Basic datetime manipulation
Hi there! I’m a newcomer, so I’m not sure this is the correct thread...sorry if it’s not... I have the following problem: I need to show in a windows Form the conversion from a normal dd/mm/yyyy shown in a date time picker to two textboxes (and viceversa). The first containing the day of the year (from 1 to 366) and the second the year itself (this oe is easy!). For example: txtdayofyear.text = "360", txtyear.text="2006" ->> Datetimecontrol.value="26/12/2006" My problem grows as i need to convert from one format to another in both senses, depending of what button the user presses. I have found a Date "dayofyear" funvtion, which gives me the partial solution, but I still don’t ...Show All
Microsoft ISV Community Center Forums MS Access User Defined Permissions
Hi there - im building a contact management system and require some help with coding. I have a table (tblusers) for users that contains their information e.g. user name , password and tick boxes that will hopefully allow them to edit certain levels within the hierarchy of the system e.g 'allowcompanyedit' tick box will allow users with that box ticked to create and edit company information, 'allowcontactedit' tickbox will allow users with that bx ticked to create and edit contact information etc etc. I have created a user login screen and added code to a command button that checks their credentials against what is held in the users table to see if they should be allowed to log in or not. I would like to add additional code that will also ...Show All
Visual Studio Tools for Office Installing vsto 2005 se
hello! i need some help! I've downloaded vsto se, and the spanish lang pack, but it doesn't run on my Vstudio 2005 pro even if it appears in the list of instaled products (help menu-about VS2005...) No office templates at all, no office projects... what should i do thanks... thamks a lot for your information... If I install vstoSE on top of the US English version, should I install also office english version will solutions only run with office english versions (I'm afraid you will answer "yes", isn't it ... thanks again Jorge ...Show All
Visual C# exposing a C# DLL's members to non .NET apps
Hi, I posted this in another forum (slightly different question though) and the answers I recieved weren't very helpful. Basically, I need to create a C# DLL who's members can be accessed by a non .NET application (it's a Windows program called Extend). Now I was able to write one in C++ and have it's members be exposed using extern "C" int __declspec(dllexport), but so far have been unsuccessful in doing so in C#. Is it even possible Hi pappascd: Although very restrictive, I have succeeded in years past in exposing a subset of native methods from a VC++ class with __declspec(dllexport) without exporting all the members of a class. This is the poor man's way of exposing an interfac ...Show All
Windows Forms Listbox multiple selection
Hi everybody I have two listboxes. I have set the selectmode to multiple but when i select multiple items from listbox1, and then clcik ADD button, only one item is getting added How can i add all the selected items at a time I am using Protected Sub btnAdd_ServerClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.ServerClick Dim licCollection As ListItemCollection licCollection = New ListItemCollection() Dim intCount As Integer For intCount = 0 To lstAllAccounts.Items.Count - 1 Step intCount + 1 If (lstAllAccounts.Items(intCount).Selected = True) Then licCollection.Add(lstAllAccounts.Items(intCount)) End If Next Dim intCount1 As Integer For intCount1 = 0 To licCollection.Count - 1 Step intCount + 1 lstAllAccounts.Ite ...Show All
.NET Development "Absolute path information is required" error with KB922770 update/Netware
Hi all, One of our users is currently experiencing a very weird problem with our .NET 1.1 app. When they attempt to run our player client when logged in through a Novell client they experience a generic "Application has generated an exception that could not be handled" error. However logging in as "workstation only" the program runs fine. Furthermore if they do login through Novell (4.92 SP2), but do not install the KB922770(.NET 2.0) update then the program works, however installing the update will cause the program to fail again and uninstalling the update does nothing. I managed to get a proper error message through debugging tools and the error is reported as "Absolute path information is required" in m ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA multiple bounding spheres
i have been making a pool game and now i need to add more balls, i need to put more balls onto the table first then what would be the collision code for all the balls if they were in an array This is can be handled in a simple manner, in fact I have recently done something very similar. I assume you have a Ball class that has a BoundingSphere. int iMaxBalls = 10; Ball[] balls = new Ball[iMaxBalls]; for (int i = 0; i < iMaxBalls; i++) { for (int j = i + 1; j < iMaxBalls; j++) { if (balls .BoundingSphere.Intersects(balls[j].BoundingSphere) { // Enter your collision code here. } } } Notice that the j loop starts at i + 1. This ensures that each bal ...Show All
Visual Basic DataGridView Error: Row provided does not belong to this DataGridView control.
I kept on encountering this error whenever I press ESC multiple times while in a new row: Row provided does not belong to this DataGridView control. Parameter name: e.Row Thanks in advance for the help. ...Show All
Software Development for Windows Vista Question about the Tom Lake's sample
Hi, Tom Lake, Thanks for very much for you help!!! In your sample there is a workfolw1.xoml , what's the use of that and how to add it into the websites1 Thanks!!! ^_^…… Without knowing what this is, it sound like this is the Workflow Definition, so adding it to "websites" will be simply creating an instance of the workflow runtime within your web site, then having it instantiate an instance of this workflow. ...Show All
Visual C# Config file properites
Hey All! I need to create in app.config sth like this: <Accounts> <Account UserName="John" /> <Account UserName="Fred" /> </Accounts> So it will be a custom section. I tried to get help on it in MSDN Library but after creating custom section I got: <MyCustomSection> <Accounts> <add UserName="John" /> <add UserName="Fred" /> </Accounts> </MyCustomSection> It's pretty good :) But I don't want this <add UserName.. . instead I'd like to have nice <Account> tag what I should change My code is based on ConfigElement example from MSDN instead of URLS I put accounts and I simplified it a lot so I ...Show All
