Linlin425872's Q&A profile
Windows Forms datagrid column headers fire the click event
VS 2003 I have a datagrid, and on the click event I process the selected row. You click the selector on the left side of the row. If you click any of the column headings, the click event fires for the row that currently has the focus. So if you are just trying to drag and re-size columns, it fires and process that row. I just want my code to execute if you click on the record selector to the left. How can this be done Thanks yes that is correct. for the handheld devices, you need .NET CF 2.0 (Compact Framework) to run .NET CF 2.0 applications. There are some limitations on which devices you can install the 2.0 CF however 99% of Windows Mobile 2005 devices do work with it, the limitation ...Show All
.NET Development HttpListener, ASMX and HTTPS ... times out?
Hi All, I have recently started working with HTTPListener & ASMX, so I apologise if this question is a little "newbie". I have the following scenario: - created an asmx web service - created a HttpListener and HttpWorkerRequest to handle the message it works fine with a Prefix of "http://"... however ... if I: - change the Prefix to "https://"... - do: makecert -sr LocalMachine -ss MY -a sha1 -n CN="10.0.9.102" -sky exchange -pe - do: httpcfg set ssl -i 10.0.9.102:8081 -h "xxxxxxxxxxxxxxxxxxx" I can see: - https://10.0.9.102:8081/Service.asmx - https://10.0.9.102:8081/Service.asmx WSDL ... but if I try and invoke a method in the service ... the browser just sits there and eventually ti ...Show All
.NET Development How to marshal correctly the following COM method?
Hey, I have the following exotic method in a COM interface (copied from IDL): HRESULT _stdcall GetDeviceFriendlyName( [in] LPWSTR pszPnPDeviceID, [in, out] unsigned short* pDeviceFriendlyName, [in, out] unsigned long* pcchDeviceFriendlyName); As you can see, the first parameter is straightforward, but the second and third use a typical C++/COM pattern. The method is first called with pDeviceFriendlyName == NULL to get the number of characters that need to be allocated in pcchDeviceFriendlyName. The caller can then allocate the required WCHAR* and pass it in (unsigned short* is really a WCHAR* in this case). tlbimp.exe crawls on this of course, so I decided to define this interface myself. My ques ...Show All
SQL Server Bulk Insert fails
I am using SQL Server 2005 Management Studio Express.I am trying to insert records in bulk into "students" table. Students: uniqueid varchar(9) (primary Key) lname varchar(35) fname varchar(35) My problem is when one record from the bulk record already exists in Students table all the bulk insert fails. I dont want that. I want rest of the records to be inserted smoothly with no error. How can I do it....Is there any disadvantage if i do this You could bulk insert into a staging table and then do the logic to insert only non-duplicated keys. I rarely (if ever) insert directly into a "master table". Once data is in the staging table you can do a simple insert. Insert into ...Show All
Visual Basic JScript to VB
im converting a website from no asp.net abiltys to asp.net 2.0. origanaly the site used jscript to do interactivity now i want to use VB. some of the code i dont understand so i cant convert it. any help would be great. the code is (its very long): var document_gregorian_year = "1998" , //Curent english year document_gregorian_month = new Array( "January" , "Febuary" , "March" , "April" , "May" , "June" , "July" , "August" , "September" , "October" , "November" , "December" ), //English months document_gregorian_month_index = 0 //Curent english month document_gregorian_wday ...Show All
.NET Development Creating tables SMO
Is there an easy way to create an SMO.Table from a Data.DataTable, other than the brute force method Brute Force method might be like below: Public Function CreateTable( ByVal DBName As String , ByVal table As DataTable) Try Dim created As Boolean = False Dim tbl As Table Dim col As Column Me .DBConnection.Open() Me .Svr.ConnectionContext.Connect() tbl = New Table( Me .Svr.Databases(DBName), table.TableName) If Not tbl Is Nothing Then For Each adoCol As DataColumn In table.Rows col = Me .GetSmoCol(adoCol, tbl) tbl.Columns.Add(col) Next tbl.Create() End If Catch ex As Exception Throw Finally Me .Svr.ConnectionContext.D ...Show All
Windows Forms Using ClickOnce without knowing Install Location
Hello I am currently evaluating ClickOnce and I like it, its more or less what we want. There is one thing that I do not properly understand: We deliver our software to our customers and they will place it on their update server. So that means that we don't know the server-location (the name of the server) that our cuostomers will use to provide the Installation files (we have different customers). How could we do this I think the location is stored in all the .application files/manifests. Can our customers change this Do they have to re-sign the manifest If yes, we would of course not give away our key - so is it a problem if the assemblies, application manifests and deploment manifests are signed with different keys What would happen if ...Show All
Smart Device Development Textbox border not displaying in Smartphone - WM 5.0?
Hi all, I am developing an application to work across different devices including Smartphone WM 5.0, Pocket PC 2003 Second Edition + Square Screen. The problem is that if I put a simple Textbox on the screen it only shows the border on the Smartphone when I select it (Pocket PC displays it always which is what I want). Does anybody know how I can display the border all the time I've tried to draw a rectangle around the Textbox and it does show a border on the right and bottom, but that's about it, and when I select the Textbox it displays the border which is double think on the right and bottom. Thanks in advance. Grant. I'm unsure as to why the border doesn't show up. Did you try handlin ...Show All
Visual Basic bit addition with control: checked list box
this has been bugging me for awhile. ok. i have a checked list box with numerous (about 15) flags that need to be set in order for those things will work (or not work) in the game. the flags are arranged in bit order (1,2,4,8,16,etc). what is supposed to happen: if index0 is checked, it adds 1 to the bit sum [dmflags], if unchecked, it subtracts 1 from sum. if index1 is checked, it adds 2 to the bit sum [dmflags], if unchecked, it subtracts 2 from sum. etc.. what IS happening: if index0 is checked, it subtracts 1 to the bit sum [dmflags], if unchecked, it subtracts 2 from sum. if index1 is checked, it subtracts 2 to the bit sum [dmflags], if unchecked, it subtracts 3 from sum. if any other index is the same (in pairs) code: ...Show All
Windows Forms Bitmap Images
Hi there! I am making images out of data arrays, and then displaying them in a form inside a picture box. The thing is, the display seems to be interpolating between pixel values in order to smooth out the image, to make it look better I guess. But I actually want a purely pixelated image, so that each pixel looks like a square block of a single colour (gray scale actually). I havent been able to find any setting or methods in the bitmap class to change the interpolation method, so if anyone can help me out that'd be great! Thanks a lot Joe I do have it set to stretch image, so that the entire picture box gets filled, but I dont think thats all there is to it. Setting it to normal of course displays it as ...Show All
SQL Server Isolation Level Oracle vs SQL Server
Hi, Please can somebody help me in understaning, I feel both Sql server and Oracle has default isolation level as Read Committed, In Oracle you update a table in One session but another session can not see the changes until first session commits it. In Sql server Query Analyzer I issued statement set transaction isolation level read committed, Update one table, I saw another session is able to see changes, Despite I have not issued Commit in First session. Even before starting update I also used Begin Tran statement. Is it possible if query analyzer can behave like SQL Plus session from isolation level point of view. ReadCommitted works as advertised here. Try this. 1. open a new query window i ...Show All
Visual Studio Express Editions Mouse issue
Hi all. I am extremely new here and I am already having an issue. I ran and installed the .NET Framework SDK Version 1.1 and for some reason my logitech laser mouse has lost its scroll ability. I know its not drivers or broker mouse etc. I've tested it out in another machine. But nothing I do seems to fix the problem. Has anyone encountered this for that matter am I even in the right place to post such a query Any help would be appriciated. Thanks! .NET Framework does nothing to your computer, drivers or hardware except install its own runtime/.NET files which has nothing to do with drivers or anything like this. The best place to ask would be over at the appropriate communities: www.mi ...Show All
Smart Device Development CListCtrl and italic fonts
I have a simple dialog that contains a CListCtrl of type "small icon" and I want to display the strings with an italic font. I use small icon because I don't want the window to be scrolled horizontally, and "small icon" takes care of that (the window is scrolled vertically). The problem is that when I set te font as italic, when the items are displayed in the list, a small part of the string is clipped out from the right side. The font is displayed correctly as italic, but that small part is missing when the list is displayed. For example, if I want to display something like "Test (1)", the only half of ')' is displayed. Is there any fix for this When you are adding a ...Show All
Game Technologies: DirectX, XNA, XACT, etc. FixedTimeStep faster than Variable Time Step
A question for those who know the inner workings of the XNA framework. Whe using FixedTimeStep, if a frame takes longer than 0.016666 ms (th frame time for 60 FPS), what happens is it left to finish it's task I ask this, because, in some condition (lots of details on the scree, and split screen, and post processing) my framerate, when not using FixedTimeStep goes to 15-14 FPS. But if I enable FixedTimeStep, in the same condition, the game runs smoother, no hiccups, everything runs as if it were 60 FPS. I understand that this is what FixedTimeStep is supposed to do: run the game at 60 FPS.... but HOW can it do it, if otherwise the game runs at 15 If you are using a fixed time step and us ...Show All
Visual FoxPro move question
Hi again, I want to know if there is a function or command to move a file in visual fox pro 7. For example, if i want to move 'c:\users\pru.dbf' to c:\myapplicaction\pru.dbf. Thanks, Actually there is, as I mentioned above: RENAME FileName1 TO FileName2 but it is a little tricky and you have to check (mainly with try..catch) if you are moving between servers or if the destination file already exists. See: http://msdn.microsoft.com/library/default.asp url=/library/en-us/dv_foxhelp9/html/6a346173-f9d9-4d4c-8396-e82bbfc3e08b.asp frame=true ...Show All
