SweatCoder's Q&A profile
Visual Basic stop watch using vb.net 2005
how can i create a stop watch using vb.net 2005 i am performing a data extraction job using windows forms and want to display time elapsed on the form. how can i do it Thanks I tried your code and it worked fine. Of course I don't know how you declare stopWatch, tmrMain and what CreateReport does; so I just created standard components and commented out CreateReport. It is strange that you did not hit a break point in tmrMain_Tick. Did you try putting a breakpoint on If stopWatch.IsRunning Then Without more code I'm afraid I cannot investigate further. Regards, ...Show All
Windows Forms Walking (Movement)
I've been reading up on Astar path finding algorithms and have developed a working model for the terrarium (I'm a brand new terrarium developer). The problem that I have, is that in order for my model to work efficiently, I must be able to plot out more than one square in each direction. Preferrably up to four. ( I can do it  ...Show All
Visual Studio Tools for Office How to track multiple selected rows in a List Object used in Excel .
Hi, I am trying to use a List object in Excel Sheet and then track all the rows that are selected in that list. Is this possible I'am trying to use it in the following way: for (i = 1; i < Issue_records; i++) { if (List1.SelectedIndex == i) { arr_selIssues[sel] = List1.SelectedIndex; sel++; } } Here, the Issue_records are the number of rows that are populated in the List Object from the database.For every row,i am putting it in a for loop to know whether that particular row is selected or not. But then,List1. ...Show All
SQL Server execute sql task to set output parameter of type integer
I'm having a heckuva time with creating output parameters based on a query. Here's what I'm doing. Every day, we copy rows from our mysql table to our sql server table. We only want to copy those rows that are new, so as to not have to recopy the entire table. So I have a DataReader Source set to Ado.net/odbc provider that connects to the mysql db. The destination is an OLE connection to the local sql server. I create an Execute SQL Task. The connection is set to the OLE connection The type is direct input The SQL Statement is "select max(id) from copy_table" In Parameter Mapping, I create a user variable called maxId that ...Show All
SQL Server Difficult Query
Hello, I am new to Transact SQL and am not sure how to get the proper result set. If there is OE 1 and only EP 1 for the same sysprojn (see 3000021), I only want to select the row with the OE 1. If there are more EP rows for the same sysprojn (see 3000024) then the sum(bookd) of the EP rows equals the bookd of the OE. In that case, I need to select all the EP rows and the OE row. Any help would be greatly appreciated. Thank you. sysprojn type no bookd 3000020 OE 1 2016 ...Show All
Visual Studio Installing SQL and VS 2005 Release Candidates (RC)
I apologize if this is already out there, but my search did not turn it up. Is there a step-by-step installation procedure for installing the September release candidates of both SQL and Visual Studio 2005 I've installed SQL 2005 RC and am trying to install VS 2005 RC now. I get the message about removing previously installed components. At this point I've uninstalled the VS that came with SQL, and then the SQL Native Client, and I'm about to uninstall .NET 2.0 framework. I suppose if I flail enough, I'll eventually get these two installed together, but a step-by-step from Microsoft would be great. Please advise. Time is money and ...Show All
Visual C++ Handles on a 64 bit OS
From a MS white paper on 64 bit computing, it appears that a handle for a 64-bit application can be used by a 32 bit process. The document implies this by mentioning that a handle has 32 significant bits of data. Can someone confirm this The handles for some 64 bit test apps I have created all have only 32 significant bits so it appears to be safe to call HandleToLong so I can return a window handle to a 32 bit automation client to allow drawing by such a client into my 64 bit application windows. So is Windows making sure that all handles reside in the lower 4 gigs of virtual memory (or system memory or whatever memory windows uses for ...Show All
Visual Studio Tools for Office Bookmark Update Problem
I'm trying to update the text of a bookmark when a document template opens, and have been working to adapt the sample that was provided for VSTO 2003 to read an XML file and populate the bookmarks. I want to use VSTO 2005 instead so my bookmarks don't get removed from the document when I update the text. I have it more or less working, but I'm getting an extra '%' character appended onto the end of the bookmark text. Does anyone know how to get around this. Here's the basics of what I'm doing: Dim targetControl As Object For Each targetControl In Me.Controls If TypeOf (targetControl) Is Word.Bookmark Then Dim bookMark A ...Show All
Visual C# datagrid view real NOOB
Hi i never used the datagrid. As i see in this forum and others the datagrind has most questions but il put a simple one How to fill a column from a datagrid view Hope is easy, and i would apriciate a good tutorial (BTW forgive my english) Thanks!! Im not sure what your question is exactly. Are you wanting to know how to fill a datagrid or a datagridview More or less both are very similiar so i hope this helps. First you must fill a DataTable with the information of what you have. I will programmitically create a table, put some data in there and bind it to a datagrid, hoping that this will give your your answer. // Create Tab ...Show All
.NET Development Additional information: No connection could be made because the target machine actively refused it
Hello, I am currently getting this error when attempting to instantiate and remote object. Currently, everything is located locally. Here is a code snippet to further explain. The highlighted code is where the error occurs. Can anyone help Thanks =========================================== namespace ResumeClient { public class ResumeClient { public static void Main( string [] args) { ChannelServices.RegisterChannel( new TcpClientChannel()); ResumeLoader loader = (ResumeLoader)Activator.GetObject( typeof (ResumeLoader), "tcp://localhost:9932/ResumeLoader"); if (loader== null ) { Console.WriteLine("Unable to get remote ...Show All
Visual C# How to find registered event handlers?
Hi, I'm trying to determine if an object has any event handlers registered on it. The reason I need this, is to not let an object to register one single event twice. this .menu.BeforePopup += new CancelEventHandler(menu_BeforePopup); // OK this .menu.BeforePopup += new CancelEventHandler(menu_BeforePopup); // Don't let it happen twice Any help would be great You can only do that from within the class that provides the event, not from the outside. You have to write explicit event add and remove accessor methods where you can do any additional checks you want. Something like private CancelEventHandler _before ...Show All
SQL Server Co-exist of SQL 2000 and 2005
Dear all, I have SQL 2000 Enterprise mgr and Query Analyzer in my desktop, and I install SQL2005 Express Edition + Mgm Studio today, however, my SQL 2000 Enterprise mgr disappear and all my registered servers disappear too when I open up the SQL 2005 Mgm Studio. Is it mean that I no longer able to use SQL 2000 How can I rollback the installation of SQL 2005 because I still have to use Enterprise mgr to manage my existing database and clients. (Yes, I give up SQL 2005 now) Thanks, The 2 should work side by side just fine, there is no need to uninstall. What do you mean Enterprise Manager disapears Did you do ...Show All
Visual Basic .NET 1.1 WinForm DataGrid and ComboBox.
Sorry to ask .NET 1.1 Question. but i am desperately searching for sample code to bring comboBox in a column of WinForm DataGrid . long back i had seen sample code on MSDN which demonstrated the same, but now i don;t find it. - Regards The following two detail how its done. http://www.syncfusion.com/faq/windowsforms/search/480.aspx http://www.vbdotnetheaven.com/UploadFile/tameta/AddingControls04232005023951AM/AddingControls.aspx ArticleID=4b9c71e9-55fc-434e-aede-a9d519dc0045 ...Show All
.NET Development Strong Naming and Obfuscation Problem - Need Help!
I am trying to sign my application, after using the obfuscator. First I must delayed the signing: < Assembly : AssemblyKeyFileAttribute("myKey.snk")> <Assembly: AssemblyDelaySignAttribute(True)> The problem is we must tell outside the IDE in the command console to stop checking the assembly. the syntax is: sn -Vr myAssembly.dll <-- very nice I do not see any DLL when i build my application. Is there any one who can help to sign my application after obfuscating in the vb.net 2003 IDE. Thanks for help. Thank's Shawn for your help. In fact I finally f ...Show All
.NET Development Problem using SSL with httpWebRequest
I am getting the following error while trying to call a SSL enabled site using httpWebRequest. Exception Details: System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure. Source Error: Line 83: Line 84: Response.Write("<font color=blue>Remote response goes here :D </font><br><hr width=100% color=red>"); Line 85: WebResponse wrs = wr.GetResponse(); Line 86: Stream strm = wrs.GetResponseStream(); Line 87: StreamReader sr = new StreamReader(strm); The code is as follows HttpWebRequest wr = (HttpWebRequest)WebRequest.Create( http ...Show All
