shajipd's Q&A profile
Visual C# Calling a windows API
How can i call windows API s inside a C# program Look up P/Invoke in MSDN. The following is also a good resource: http://www.pinvoke.net/ ...Show All
Visual C++ Circular dependency in visual c++
I'm trying to make a game in c++, and it would be nice to be able to use circular dependencies without always having to find some work around (mostly because I'm used to java, and this sort of thing isn't a problem for java). I tried forwarding the declarations of the classes involved, but it didn't work (if you want to see an example http://en.wikipedia.org/wiki/Circular_dependency ). The compiler is giving me some weird errors: 1>C:\Program Files\Microsoft Platform SDK\Include\winnt.h(893) : error C2143: syntax error : missing ',' before 'constant' 1>C:\Program Files\Microsoft Platform SDK\Include\winnt.h(894) : error C2988: unrecognizable template declaration/definition 1>C:\Program Files\Microsoft Platform SDK\Inc ...Show All
Visual Basic Add Flash9 Control to VS2005
I added Flash9.ocx(c:\program files\system32\macromed\flash\) to vb2005 toolbox, when I draw the "Shockwave Flash Control" to form, there comes errors: * Could not resolve dependent COM reference "stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". * Failed to create the wrapper assembly for type library "AxShockwaveFlashObjects". Exception of type 'Microsoft.Build.Tasks.ComReferenceResolutionException' was thrown. * The referenced component 'AxShockwaveFlashObjects' could not be found. Failed to create the wrapper assembly for type library "AxShockwaveFlashObjects". Exception of type 'Microsoft.Build.Tasks.ComReferenceResolutionException' was thro ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Rendering custom polygons
Hi all, I'm using D3D 9, C# 1.1. I need to render colored fill polygons. I'm recieving the polygon's coordinates from the user. The only method i know is drawing triangles. is there another one The problem is I can't figure out what to do with complicated polygons. I don't how to calculate the triangles which will form the polygon. Any ideas Thanks. Hi, From my knowledge and understanding, there's nothing at DirectX rendering level that allows what your expecting. Thus you'll have to triangulate polygons by yourself before beeing able to submit them to Dx. You can see Delaunay triangulation algorithm as a beginning. ...Show All
Visual Studio 2008 (Pre-release) StartupUri and custom control libraries
Hi, I'm trying to launch my WPF app with a page that is defined in a custom control library. How do I format the StartupUri to identify the assembly that the start page is in I've tried variations of StartupUri="pack://application:,,, assembly_name;path_to_page ", all without success. How is this done Thanks! - Imad Thanks for the reply. I didn't find the answer I was looking for in the article you mentioned. However, I went back to this article: http://windowssdk.msdn.microsoft.com/en-us/library/ms743619(VS.80).aspx I realized the correct syntax is: StartupUri="pack://application:,,, assembly_name; component/ path_to_page " So the key here is to include "component/" to ...Show All
SQL Server How to construct table with unique PK
Let say I have 6 tables. I want to autogenerate the PK for each table and that is unique for each table and cant be duplicated on other tables. Let say I have table with PK of 1, so table2 to table6 wouldnt have a PK of 1. If table2 have a PK of 2, table1, table3 to table6 wouldnt have a PK of 2. Same for others. Identity will not be appropriate. Will 'uniqueidentifier' data type suffice How bout guid Or what must be my datatype Or what will I do to implement this Any links Thanks have a composite primary key key1 and key2 have key1 to have a default value of "A" for the first table, "b" for the second and "c" for the third key2 would be an identity your pk would ...Show All
Windows Forms What is an "Application Reference"?
The file in the Start menu used to launch an application installed with ClickOnce is of type "Application Reference". Where can I find more information about that file type Is it specific to .NET Does anybody know if there is a way to choose the icon for that file Setup projects are a different type of project that create windows installer files. See http://msdn2.microsoft.com/en-us/library/996a3fxs(VS.80).aspx for an overview. I should probably note that setup projects are only available in VS Standard and above, they are not available in any of the Express additions. Regards, Elizabeth Maher VB Team. ...Show All
Windows Forms Clipboard troubles
Hi! I need to store/retrieve objects to/from the system clipboard. An abridged version of the code looks like this: private void copyButton_Click(object sender,EventArgs e) { Clipboard.SetData(SHAPE_CLIPBOARD_FORMAT_NAME,Selected); } private void pasteButton_Click(object sender,EventArgs e) { if(Clipboard.ContainsData(SHAPE_CLIPBOARD_FORMAT_NAME)) { BaseShape shape=(BaseShape)Clipboard.GetData(shapeFormat.Name); if(shape!=null) Shapes.Add(shape); } } I get no exceptions, and the object in question is definitely serializable. Still, Clipboard.GetData() always returns null, even though ContainsDatat() returns true. What's even more confusing: I used some freeware clipboard viewer to see what gets actually stored in t ...Show All
Microsoft ISV Community Center Forums Microsoft Ecosystem
Can someone explain the theory behind Microsofts ecosystem and how it benefits Microsoft and its Partners. Thanks I started to type an answer to this, but I realized that one of my colleagues addressed this issue quite exhaustively in his blog recently. (Sorry to plug a blog here, but it's really a long answer and this is easier): Part 1 Part 2 Some background: we're an ISV, and we've invested heavily in the Microsoft partner ecosystem. It helps us to gain VERY valuable contacts within Microsoft, and also helps us to meet other Microsoft-oriented ISVs, AppDevs, and SIs who may be potential partners. How does it benefit Microsoft Well, Microsoft has succeeded largely because people write soft ...Show All
Visual Studio Express Editions Number of lines in a text file
Hi I need to determine the number of lines in a file, and then assign the value to an integer. Here's my structure: Do while [the filereader is not at the end of the file] -> filereader should now read line -> for each line add 1 to variable (integer) "testinteger" Loop Does anyone understand my structure Thanks! Johannes You should NOT use peek or is nothing to determine if it is at the end of the file.....you should use the method supplied by the streamreader: EndOfStream Dim theFile As New StreamReader ( "file.txt" ) Dim NumberOfLines As Integer = 0 While Not theFile . EndOfStream theFile . ReadLine () NumberOfLines += 1 End While ...Show All
Visual Studio Express Editions I need help with buttons..please.....big problem
ok guys I am designing my own personal web browser..which is beginning to look cool, I have buttons assighed to various sites, files, ect.. my problem is this.... I need a way to let the user change the sites associated with the buttons....so that when the browser starts up... the buttons go to his favorite sites instead of mine.... I can do this with some buttons...ie one button plays a song stored in my docs and saved as song 1.....if the user saves another song as song 1 in my docs then the button click plays that song....... I need a way to do the same with the web site buttons.... can you please help thanks in advance cheyanne . Use "User Settings" to store the url for the ...Show All
Visual Studio 2008 (Pre-release) Creating Animated GIF files in WPF
Hi, I just posted a short article on my blog describing how to create an animated GIF file from snapshots of WPF FrameworkElement objects. I have to add that the code isn't complete, and that's partly why I post here. I'm using RenderTargetBitmap and GifBitmapEncoder objects to get this to work, but the final .gif file has a flaw. When displayed (at least in IE7), the prior frame isn't erased before the next frame is rendered. The concept I present is very useful (in my opinion ). For instance, this approach can be used for showcasing WPF animations to viewers who don't have .NET 3.0 runtime installed. It would be great if anyone has suggestions for how to improve on the code, and solve the animation flaw. Thanks, ...Show All
Visual Studio Team System Displaying Code coverage results with automated MSBuild
My assemblies.testrunconfig file includes code coverage setup. When I run my build direclty from VS, the code coverage results are displayed correctly. I am running an automated build and I run into couple of issues: a) The test results file does not contain the code coverage when I open the corresponding trx file on the buildserver b) The test results folder cannot be published on the drop location. I checked my security on both servers and I have full control. Anything I am missing Here is the excerpt from the build log: Target CoreTest: Creating directory "C:\Build Output\Alpha Releases\ConnectTest\BuildType\..\Sources\..\TestResults". __________________________________________________ Project "C:\Build Output\Al ...Show All
Visual Studio 2008 (Pre-release) Chunking Channel sample update?
We are currently using the Feb CTP Chunking Channel sample (with appropriate adjustments to compile and run with the Sept CTP). However, we've started getting new mystery exceptions with the Sept CTP from code that isn't called by us. The exceptions do not happen regularly, and appear to be caused by timeouts within code that we do not control. I suspect that custom channel implementation requirements have changed rather significantly since Feb and was wondering if there was any plan to update this sample Is anyone else using the chunking channel without issue Any assistance would be appreciated! It is here: http://msdn2.microsoft.com/en-us/library/aa717050.aspx ...Show All
SharePoint Products and Technologies Can i save my changes back to server
Based on Unsupported Features in Excel Services I know I cannot author an Excel workbook using Excel Services. However I want to know more about it: If i make a changes to an excel workbook using Excel Services.Can i Save the changes back to original workbook on server No, you can't. However, what you can do is from the toolbar 'open in excel', and then save back to the original workbook from within excel client. If you're using Excel Server API, then you can call the soap method GetWorkbook, and use webdav to store it back into sharepoint. ...Show All
