prk's Q&A profile
Smart Device Development ComboBox Control DataSource DataSet/DataTable
Hello, I am developing a Smart Device Application using Visual Studio 2005 for Windows Mobile 5.0. I have placed a combobox control on one of my Forms. I have written the code that sets the comboBox DataSource equal to a dataSet returned from a private method. Question: whenever I run the application the comboBox is not populated with any data and is blank. I checked my code and everything is correct. I walked through the application in Debug mode and the DisplayMember and ValueMember property of the comboBox are properly declared. After a couple hours of wondering what was wrong I changed the DataSource of the comboBox to a DataTable and the comboBox is now populated with the data. I was under the impression that a DataSet and DataTabl ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Future D3DX's not supporting SM1.x??
I saw this in the October SDK readme October 2006 DirectX readme! wrote: Preview Release of the new HLSL Shader Compiler for Direct3D 9 Targets This release has a beta version of d3dx9d_31_beta.dll that includes the Direct3D 10 HLSL compiler enabled for Direct3D 9 targets (shader models 2.0 and later). The new compiler has no support for 1_x targets. This debug-only DLL allows developers to utilize the new Direct3D 10 HLSL compiler for their Direct3D 9 shaders, and will become the default compiler for all Direct3D shaders. Please try the new compiler by building your application with d3dx9d_31_beta.dll instead of d3dx9d_31.dll. Does this mean in future SDKs SM 1.1 will not be supported any more, or is this limitation j ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Selling Games on Xbox Live Arcade
Hello, I am currently putting a team together to create new Xbox Live Arcade games. They will be using the XNA development tool and the projects will be financed by myself. How long will it be untill Indy developers can sell their games online in order to re-coup some of the money and produce additional games Any help is appreciated. Regards Ian epoxyRedux wrote: so i think it's safe to say that M rated games are ok, but i doubt msoft will allow strip poker games...haha I have heard that people use their Vision Cam to do naughty things in UNO... ;) ...Show All
Visual C# How to DllImport C++ Library
A smspdu.dll contains function: [code] BOOL _stdcall GetCenterNumber(char* strCenterNumber); // usage char* strCenterNumber=new char[16]; GetCenterNumber(strCenterNumber); CEdit* pEdit=(CEdit*)GetDlgItem(IDC_EDIT2); pEdit->SetWindowText(strCenterNumber); delete strCenterNumber; [/code] I get NullReferenceException when call the function in C#. How does declare DllImport for this function My c# code: [DllImport("smspdu.dll")] private static extern bool GetCenterNumber(out string strCenterNumber); Try StringBuilder instead of String For more info look at Using Win32 and Other Libraries look at Strings Section i hope this help ...Show All
.NET Development Synchronous Methods using Asynchronous Connection
From the following MSDN article ( http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnvs05/html/async2.asp ) it states: "then you can still use the synchronous methods in connections opened with async=true , and they'll behave as usual; you'll see a small performance degradation, though." How much is a small performance degradation 1-2%, 10%, 20%, more Is the overhead and complexity of maintaining 2 seperate connection types in my application truly offset by the "small performance degradation" Also, how does maintaining 2 types of connections work with connection pooling Are there 2 separate connection pools maintained in the background and how does the system know which pool to draw from ...Show All
SQL Server comparing DateTime in UK Format
Hello friends, I am trying to return all records between 2 dates. The Date columns are in DateTime format, and i am ignoring the timestamp. The user should be able to input UK Date Format (dd/mm/yyyy) and return the rows. This sql code works fine for American date format, but i get an error: converting from varchar to datetime when i put in a UK format. eg. 22/11/06. Please advise on this problem! many thanks! ALTER PROCEDURE SalaryBetweenDates ( @WeekStart datetime, @WeekEnd datetime ) AS BEGIN SET @WeekStart = (SELECT REPLACE(CONVERT(DATETIME,@WeekStart ,103),' ','-')) SET @WeekEnd = (SELECT REPLACE(CONVERT(DATETIME,@WeekEnd ,103),' ','-')) END BEGIN SELECT s.StaffNo,s.StaffName,s.StaffAddress, s.HourlyRate, sh.HoursWorked, CONVER ...Show All
Visual C++ How to get known of a function's arguments that is in a dll?
The problem is that I only have the .dll, nor the .lib or .h, thats why I dunno the arguments accurately. That fact is that I've got a program in Labview (so I've got the source code also) , and that program uses the mentioned .dll. So I know the name of the functions, but there are some problems around the arguments' types, although -as I see it- I gave the same types in visual c++ as they were used in labview.. :S I've got a labview source code. Here are the prototypes of the dll's functions: (That's how labview shows): long DevNew(Cstr arg1, CStr arg2, unsigned short int arg3); long DevWrite(unsigned char arg1, CStr arg2, long arg3); long DevRead(unsigned char arg1, CStr arg2, long arg3); long De ...Show All
Windows Forms MDI: getting form handle affects child focus
Hello: I have a MDI and multiple child forms. The only way to bring a child in focus and to the front of the other forms is by clicking on the titlebar. I have discoverd that this occurs only when I set a property on the form to the form's handle in the new() sub. It does not happen if I do this in the load event Why does this happen. here is the code for the child Public Sub New ( ByVal pParentID As Int64, ByVal pAppRule As Int32) ' InitializeComponent() ' Add any initialization after the InitializeComponent() call. FormID = Me .Handle ParentID = pParentID ApplicationRule = pAppRule End Sub Thanks for any help on this. smhaig Yes as I me ...Show All
Visual Studio 2008 (Pre-release) What's the replacement for GetTable() in DataContext?
A question regarding LINQ to SQL in the January Orcas CTP. DataContext.GetTable is now internal - what method should we use instead For now I'm calling GetTable via reflection which works fine but is a bit messy. I notice a number of LINQ to SQL bugs have been fixed which is great. Thanks Joe Keith Farmer wrote: There are actually several overloads to GetTable, and some must remain public (GetTable(type), GetTable<TEntity>()) for use in data contexts. What does your data context look like, which works under the Jan bits Not sure how your units tests work, but the following are the only "GetTable" methods show up in the Object Browser: Friend Function GetTable(Of T)() As System.Data.DLinq.Table(Of T) ...Show All
SQL Server I need help with a SQL Query
I know that there's a lot of you out there that are really good at Sql Queries. Hopefully, one of you will have pity on me and clue me in. I am working with a Visual Studio 2005.net VB application accessing SQLServer 2005 and SQLServer Express databases. I am using a sql query with ado.net data adapter to return data to a grid bound to the data adapter. My problem is that there is data in the SQL table stored as Bigint data types, that I need to divide by another integer and return as a double precision number. For example, part of the Sql Statement looks like: " InvStock.QuantitySold / NumPeriods AS 'AvgUnitsSold', " It works except for the fact that it returns an integer and truncates the decimal points. Is th ...Show All
Visual Studio Express Editions This is puzzling, well it is to me?
I open MSWord and create a document with formatted text Red, Blue, underline etc I then copy it to the clipboard, then paste it in to my program where it appears with exactly the same formatting as it had in word, so far, so good. I now switch back to MSWord and save the document, back to my program and open the document but now all the formatting has gone, so it must be the way that I am opening the document is wrong. Here is the code that I use, already been posted in another thread, but I feel it's better to keep all info in the same thread. Case "doc" objWord = CreateObject( "Word.Application" ) objDoc = objWord.Documents.Open(OFD1.FileName) objDoc.Select() rtbText.Text = objWord.Selection.Text objDo ...Show All
Software Development for Windows Vista Digital Signature.
How can we obtain digital signature for the existing application Is it neccessary for running it on Windows Vista You are correct, I forgot about drivers. If you application is a driver or uses a driver, that driver needs to be signed for 64-bit. To sign your driver you will need to purchase a Certificate from Verisign. Then during your build or post build sign you driver. To use your certificate and sign your exe or dll in the post build process: http://msdn2.microsoft.com/en-us/library/9sh96ycy(VS.80).aspx Also this article is good too: http://msdn.microsoft.com/workshop/security/authcode/signing.asp The second article mentions that you can use "makecert" to self generate a certificate. This self generated certificate ...Show All
.NET Development Operator '+' cannot be applied to operands of type 'System.DateTime' and 'System.DateTime'
Hi guys, I am trying to add two DateTime instances together. One is an actual DateTime Stamp and the second is a TimeSpan Stamp. However I keep getting the following error.. class.cs(63): Operator '+' cannot be applied to operands of type 'System.DateTime' and 'System.DateTime' Does anybody understand why Also what should I do to add two DateTimes together. The code I am using is: if (thePaidGivenData.TimeStamp < (CloseTime+Time2Calc) & CcyCcy != CcyPair) { continue ; } else { return alPaidGiven; } Regards, Harry What are the data-types of all these variables Also, you might want to make your code more readable by doing something like this: if ...Show All
Visual Studio Team System cant see object test bench IDE
Hi, I am using Visual studi team system RTM version(8.0.050727.42). I am working with a e-commerce project. I have written some classes in Business layer. I need to check it by creating objects of these classes before creating aspx forms. I heard that object test bench is useful. But I cant see any sign of this facility.That is, I cant see 'create Instance' option when I right-click on classes from class view or class designer. can anybody explain why it is like this Thanks in advance... akajal It is a bug that has been fixed in the SP1 ( http://msdn2.microsoft.com/en-us/vstudio/bb265237.aspx ) ...Show All
Community Chat Is MS trying to throw away menu bar?
In IE7, classic menu bar is disabled by default. In Office 2007, there is not menu bar at all. Also the traditional toolbar is gone. I can't find a way to create my own custom toolbar too. What's happening I know menu bar is very classic and not pretty, but it is one single place that I am 100% sure that I can get all the features from a program. I don't want to lose it. A lot of people probably use Word more extensively than you do, producing legal documents, presentations, multimedia-heavy proposals, complex technical documents. A live preview can be a major time saver, and error-prevention tool. ...Show All
