John Lockhart's Q&A profile
Visual Basic selected Items in Listbox are disseleceted by Messagebox; vb.net
Hi folks I have migrated from VB 6.0 to VB2002.net. I upgraded my project with the upgrade-manager. Now I find out, that the functionality of the listbox isn't the same since VB 6.0. The same code works in VB 6.0 fantastic; in VB.net not. Here is the code: Dim i As Integer i = MsgBox("Really delete the marked items ", 4) If i = 6 Then 'Yes For i = 0 To List1.ListCount - 1 If List1.Selected(i) Then 'delete dataset in the background table ..... End If Next i 'show new background table.... End If (I filled the Listbox manually with List1.AddItem "item from background table".) Anyone who can say, how to get the same functionality in vb.net , whithout having much more code Or is there anyon ...Show All
Windows Forms Black label and persistent wait cursor
Hi everyone! I have a problem with a GUI, which has a label and a panel. When executing, the label is always black and the cursor is wait cursor (until the program ends). Moreover, in the Windows XP toolbar doesn't appear the label of the running program until it ends. Could this problem be due to the fact that the gui class even has the responsibility to update the graphics of the panel Maybe it is better to delegate this task to another class Thanks Do you have code in the form load event Are you executing some type of design loop Sounds like the system is churning code that displays the label or formats the label or gets data for the label! ...Show All
Software Development for Windows Vista Should I use WWF?
Hi!, I want to know how easy to use and how efecctive is to use WWF for process management Hi, If you want some resources to get started, read this post. Good Luck, Guy Burstein http://blogs.microsoft.co.il/blogs/bursteg/ ...Show All
SQL Server MM/DD instead of MM/DD/YYYY?
Is it possible to display a date field as just MM/DD instead of the full MM/DD/YYYY ...Show All
Windows Live Developer Forums Directions display underneath the map
I've put into practice most of previous thread and come up with this code that asks for a start postcode and then gives directions to a fixed destination. It works but throws an error icon at the bottom Line: 2 Character: 250914 Error: Exception thrown and not caught Code: 0 What's wrong Here's the code <html> <head> <title>Directions to King's Lynn</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script src="http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js"></script> <script> var map = null; function GetMap() { map = new VEMap('myMap'); map.LoadMap(new VELatLong(52.77, 0.40), 1 ...Show All
Internet Explorer Development Tuns of bugs in IE7, how to report?
While attempting, and I do mean only attempting, to develop my application I keep getting "this old feature is now broken in IE7" Well here is a small list of what I can remember off the top of my head.. ----------------- $(id).onclick = 'alert(1);' <-- wont work until you forcefully update the DOM $(id).setAttribute('onclick', 'alert(1)'); <-- wont work until you forcefully update the DOM To update the DOM forcefully... $(id).parentNode.innerHTML += ''; After that innerHTML call, the onclick event assigned via properties will work. ----------------- Another problem, which I, ironically got while trying to post this message is a very big problem that is present when using google maps (or says so by g ...Show All
SQL Server Inserting millions of rows into a table
Hi, I have a DataTable in memory and I want to write a C# code to dump the data into a SQL database. Is there a faster way of dumping millions of rows into a SQL table besides running INSERT INTO row by row Thank you, Jina If you are using .NET 2.0 then you can use the new SqlBulkCopy Class. I am not sure though if it supports inserting into older versions of SQL Server but it will work against SQL Server 2005. Else it is best to dump the rows to a file and then use BCP/BULK INSERT/OPENROWSET(BULK)/DTS/SSIS. ...Show All
Windows Forms Current Window Name
Hi, How do I get current windows name / application type which has focus Like if current focus is on notepad, it should return the file opened in notepad or string "notepad". Thanks! AndrewVos wrote: Whoa, forgot about that API! Use that rather and just use the getWindowText code of mine. Sorry, I should have though a bit more ;) Err, just read properly through nobugs code. Rather don't use any of my code, it's redundant. ...Show All
SQL Server Why print zoom out in Reporting Service?
I make a Report,The PageWidth is 21.5cm,PageHeight is 13.9cm. before print ,On the Print Dialog,I select print is EPSON LQ 1600K, portrait , select Page size is 21.5*13.9(is define on myself).I click the Printview button,the view is wrong,is not 21.5*13.9 and portrait ,is like A4 portrait .Click Print Button,The Print Result is Wrong ,The table and font is zoom out. I try in the Reporting Service 2000 and 2005,the result is the same. Use ReportView in the Winform is right,use ReportView in the WebForm is wrong, Is the RsClientPrint ActiveX Control has Bug Add: On the Dialog,First I select print is "Microsoft Office Document Image Write ",set this print's property is like ...Show All
Visual Basic Extract ZIP File using code
All, I'm wanting to copy a zip file from a network to the local PC (not a problem) however I also need to unzip the files within the zip file to a specified location on the users machine. Can this be done through VB code Hope you can help Cheers .NET doesnt provide Zip Functionality out of the box. You'll need to find a third party component to handle this. A simple web search will reveal many components. A common one used is http://www.sharpziplib.com/ Another option maybe to use something 7-Zip from http://www.7-zip.org/ which has a command-line interface, using ProcessStart .NET does have some compression routines - but they are not winzip file compatible. This is the System.IO.Compressi ...Show All
Visual C++ SetDPI
How do I fixed SetDPI to 96 in my MFC Application Regards Manoj Jangid Please use the MSDN newsgroups for Win32 programming questions. In particular, for your question, this is the best location: http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.win32.programmer.gdi&lang=en&cr=US Thanks. ...Show All
Visual C# a dll question.
It may not be directly related to the forum, then please advise. It is a very common problem for me. Trying to incorporate a third party demo app into my project I download a dll and try to register it. I get the same error message in many a case: The procedure entry point Wow64EnableWow64FsRedirection could not be located in the dynamic link library KERNEL32.DLL It is natural. Mine is 32 bit machine. I do not need any 64-bit functions. Apparently those functions are included for generality. I need the darn dll. What can I do to make it register. Thanks in advance. Thank you very much, Mike. This forum is full of very helpful experts yourselves including unlike some other forums, C++ for instance. I will try your advic ...Show All
Visual Studio 2008 (Pre-release) How to use constructors or methods of data object with WCF service
I have some questions regading how to use of data object using WFC Service. For example I have an object called Student (see codes below), and property IsOver25 this is readOnly property. However, if I do not put set { ;}, it's won't compile . What I need to do here in order to get rid of set { ;} statement. Another problem is using contructors and methods of data object. Since we don't put [ServiceContract] on the data object, I could not use the override ToString() version of Student object on client side. So the question are: 1. What should I do in order to use the constructor of data object 2. What should I do in order to use the methods on data object ( will not many but somes) Regards, John dang using System; using Syste ...Show All
Community Chat Windows Vista Gaming Performance
I just read over on Neowin that gaming performance in Vista will be 10-15% slower in Vista. Can someone tell me whether or not this is true Thanks! - James My gaming performance is 80% slower in Vista with 7800GT. So what's wrong ( CS:S 100fps in XP and 15 in Vista ) ...Show All
Visual Basic Listbox Question
Hello. A question please. I'd want to set the displaymember property of a listbox with the data of 2 fields of a table. Can I do that Thanks... You will need to concatinate the fields to do this. You can do it in your code when you're adding the items to the list or, if you're binding to data, you can do it in your query. However, concatinating strings in a SQL query can be costly in terms of performance so use caution about doing it this way. ...Show All
