jackli_0112's Q&A profile
Visual Basic Opening an existing Word Document in Read/Write mode Using VB.NET
I am using VB.NET to open up an exisitng Word document which works fine, the problem that I have is that it is defaulting to opening the document up in read only mode. How can I change that so that the word document opens in read-write mode so that Word can subsequently be used to update and save the document Thanks Bill Partridge A varible string is built up based upon the user selecting a row in a datagrid. I am using Visual Studio.NET 2003. pRegistrationNumber = pRegistrationNumber.Substring(0, 4) + pRegistrationNumber.Substring(5, 3).TrimEnd + ".DOC" pServiceLoad = pServiceHistoryFolder + pRegistrationNumber '+ ".DOC" appWord.Documents.Ope ...Show All
Visual C# Constructor Logic???
In dealing with Forms in .Net and they have a form load function that does some things when the form is loaded, I was trying to figure out would i be able to do the same thing if i added the logic in the forms constructor... Like say if i wanted to show some data values when the form loaded, would i be able to add this logic to the forms constructor instead of adding it to the form.load() Ahmedilyas is very right on this one. java.net recently published an article about the five habits of highly profitable software developers which very much applies to everyone. They talk about this issue specifically: " Habit 1: Constructor Performs Minimal Work - The first habit is for an object's constructor to do as little work as pos ...Show All
Visual C++ formatting output to a file
The problem i am having is trying to format a double type output to show the thousand comma. Meaning ##,###,###.## . The number is of double type with 2 decimal points. 1111111.11 How would i be able to change the output to show the thousand comma just before printing to an output file i am using sprintf to output to file. thank you, mike This article might help : http://www.codeproject.com/string/xformatnumber.asp ...Show All
SQL Server ETL, simple database mode and a large log file
All, I have a ETL host database (40 gig) that is running in simple mode, but is generating rather large log files (10 gig). Are these large log files due to the bulk load nature of the ETL process, and if so, how can I mitigate the issue (reduce log size) without specifically shrinking the database Any help is appreciated... Jim You will need to break up the load into smaller chunks. If the entire load is a single transaction, the log will have to grow to accommodate changes, just in case the transaction fails and it has to rollback. If you're using bcp/bulk insert, take a look at batchsize option. ...Show All
Visual C# Underline text
I was wondering if there was any way to underline the text of a string... Application: For right now I am outputing a bunch of strings into a message string to display in a message box. Later I will be outputting to a text file. I have searched the MSDN Lib to no avail; if someone could point me in the right direction, that would be great. Can you use HTML code in VC# Thanks Thom You can't have underlined text in a .txt file, but you can in a .rtf or .htm file. I don't think you can have formatted text in a message box, but you could consider making your own message dialog with something like a RichTextLabel on it. ...Show All
Visual C# How to convert C++ struct to C#?
I’m currently convert VideoDriver class in TightVNC (VideoDriver.h, VideoDriver.cpp) to C#. I met a problem when convert some structs type to C#. C++ -------------------------------------------------------------------- typedef struct _CHANGES_RECORD { ULONG type; //screen_to_screen, blit, newcache,oldcache RECT rect; RECT origrect; POINT point; ULONG color; //number used in cache array ULONG refcolor; //slot used to pase btimap data }CHANGES_RECORD; typedef CHANGES_RECORD *PCHANGES_RECORD; typedef struct _CHANGES_BUF { ULONG counter; CHANGES_RECORD pointrect[MAXCHANGES_BUF]; }CHANGES_BUF; typedef CHANGES_BUF *PCHANGES_BUF; typedef struct _GETCHANGESBUF { PCHANGES_BUF buffer; PVOID Userbuffer; }GETCHANGESBUF; ty ...Show All
SQL Server How to use a dialog retry timer for doing a web service call
Hi Remus, I just started looking into SB about a week ago, so my question is likely to be pretty lame. However, that's not going to stop me from asking it :-) We're trying to do something similar to what you're describing here. How do you "reset" a dialog timer Why would you need to deal with resetting timers (or with timers at all for that matter) in the event of a success Couldn't you rewrite the logic to be as follows begin transaction receive message if message is web request save state of request (http address, caller etc) else if message is retry timer message load state of request endif commit do the web request (no transaction open) if success begin transaction send back response end conversation commit else set a r ...Show All
Visual Studio Team System Install for Visual Team Suite
I have laptop with XP service pack 2, which I want to use to develop and to test with VS 2005. That I need to install Visual Team Suite 2005 Beta 2 SQL Server 2005 Beta 2 Team Foundation Beta 2 or the 3 thanks Jose Hi Jose, None of the products you referenced are in beta any longer. You can either purchase the full version of these products or download a trial from: http://msdn2.microsoft.com/en-us/teamsystem/aa718667.aspx I recommend starting with Visual Studio 2005 Team Suite http://msdn2.microsoft.com/en-us/teamsystem/aa718822.aspx . -Ajay ...Show All
Visual Basic How to sort a list from A to Z
Is there a way i can sort a list from a to z. Its this kind of list. System.Collections.Generic.List(Of T) One would think that Tim as a Developer on the VB compiler team actually knew what was going on underneath and gave a answer to the question. I dont think anyone actually disputed underneath that the compilers produced different IL code, This was something you placed in your original response with your C# code. So you show an solution in C# and sing the praises of a language that the user is not using. Does this help the user solve the problem . Probably not. Did you comments about disliking VB and telling us you like C# benefit the user - Probably not. And your comments about C# code being far more optimal in anyth ...Show All
Visual C# help List Box
Hi All, I m using Visual Studio 2005 and my language is VB.NET. I need to fill a combo box with the name of countries. I want to display the name of the country within the combo. and i also want to keep the code of the country with each name item. Now i am aware that with visual basic 6.0. There is an option available for combo box named ITEMDATA. So that i can put an integer value with each item. But i can see this attributes has been terminated in VS.NET 2003. but i am not aware that if any altervative has been provided in Visual studio.NET or if i want to do the same thing in VS.NET 2005. how i can do it. any help will be highly appreciated. Please see the ListViewItem.Tag property. By the way, this is a C# ...Show All
Software Development for Windows Vista unexpectedly flipped frames using null renderer
I wonder if anyone else has experienced this curious frame flipping behaviour and might have a solution to offer... I'm rendering frames from a capture source (the integrated camera in a WM5 device), through a custom transform filter (derived from CTransformFilter), and finally out to the null renderer (i.e. the renderer you get by specifying NULL as the last parameter on RenderStream). The transform filter doesn't do anything to the video data at the moment - just copies everything through verbatim. I call IMediaControl->Run() to start the graph, and everything runs normally - frames are being displayed ok on the mobile screen (appearing the right way up, like a camera viewfinder). But then, if my app has cause to call up an AfxMessage ...Show All
Visual Basic Serialport Help
I am writing a class that talks to a controller I use in my lab. I send the controller a command and it gives a response. I wrote a routine that sends the command and receives the response. HOWEVER.... If I step though the code everything works great. If I run the code it runs too fast and misses the response from the controller. I don't want to poll the serial port to see if the response arrived as this consumes CPU time unnecessarily. What I want to do is to write the command to the controller then suspend the method until the DataReceived event or a timeout occurs, then continue my method. Any suggestions Thanks in advance! Kenny HappyHappy, According your de ...Show All
.NET Development Xpath Expression with XpathNavigator.Select vs XmlDocument.SelectSingleNode
Hi. I have an xml file with proper namespace and schema. I have an xpath expression that I have tested on the document in xmlspy (xpath 1.0 or 2.0) which returns a single node element. If I load the file into an XmlDocument and apply the expression with SelectSingleNode, I get the proper element value back. If I use XpathNavigator.Select on this file, which I understand, returns a node set, (even though the expression can only match a single node), I get the inner xml of all the nodes in the file (3 values). I am properly using the XmlNamespaceManager in each case. With the Xpath navigator, I have moved to root initially, before doing the select. Does anyone have any ideas why the XpathNavigator is returning strange resu ...Show All
Visual Studio Team System Problem with DateTime control
Hi to all, I'm working with VSTS and I have a problem with the DateTime control that I use in my Custom Work Item for set Start and Finish Date. When I click the DateTime Control it dispays the Date Picker and once I click any of the date it correctly populates the control with the exact date. But if I click another date, without close and open again the Date Picker, it doesn't update the date in the control. It's a bug of the control or it's a problem on my computer Has anyone any suggestion Thanks in advance for your help. ...Show All
SQL Server Upgrade from MSDE 2000 to MSSQL 2005 Workgroup Edition?
I have clients that have the MSDE version installed and we need to upgrade there program to the MSSQL 2005. Is there an easy way to convert the data Should or Could I uninstall MSDE and than install MSSQL2005 WorkGrp Will there data be affected Any tips would be appreciated.Thanks! Hello I have done this a couple of times. You can use SQL 2005 WorkGroups installer and can upgrade your MSDE 2000 installer to SQL 2005 Workgroups edition. There should be no issues. Thanks ...Show All
