Mei Liang - MSFT's Q&A profile
Visual Studio Tools for Office Deleting a line break
Hi All, I'm writing a Word Add-in which finds for a string in the document and deletes if there is a line break just before it. Can anyone help me on this TIA Pavan hey Kanthleen, Thanks a lot. Actually I've found what exactly the issue is. When I'm creating the document a .doc template is being used in the Add method call and not .dot. And, rightly enough, the method get_AttachedTemplate() to fetch the template name is not returning the document that I've used. I've found that there is no way to find the source template if it is a .doc document, unless you know a better way :-) Anyways, t ...Show All
Visual C++ how can i use the type struct in VISUAL C++??... i'm new in visual c++
hi! i have a program in c++ and i want to do it in visual c++, but i found a problem, in the code program made in c++ i use a type struct : struct ind { char *c; int f; } but i think that in visual c++ doesn’t exist the type struct , i'm not sure..... can i use the type struct in VISUAL C++ or what other kind of struct may i use i think that is the main question.... WHAT other type can i use instead of the struct in visual c++ , i want to declare two variables of the type ind: ind pob; ind pob2; so i can use the structure pob[0].c, pob[1].c , pob[1].f ...Show All
Visual C++ C++ CLI and Assembly signing
Hi, we are using a pfx file for signing our c# assemblies. Now we have also some C++/CLI (managed c++) assemblies. When I try to sign the assembly with our pfx file with the /keyfile linker switch - I get the following error: Error 1 fatal error LNK1256: ALINK operation failed (80090007) : Ungultige Anbieterversion TestDll when I use a snk file instead - everthing is ok. With our C# projects we have no problem signing with a pfx file. Any ideas Cheers, Franz Has nobody the same error when using a c++/cli assembly and a pfx file for signing Any h ...Show All
Visual C++ Problem to delete unmanaged object
Hello, I would like to know why I'm unable to delete an unmanaged object : Here is the code : public ref class SpeGui : public System::Windows::Forms::Form { private : String^ m_sCompassPort; int m_nCompassBaudRate; int m_nCompassDataBits; int m_nCompassStopBits; int m_nCompassParity; int m_nCompassRefreshPeriod; int m_nCompassAccuracy; PI_DigitalCompass * m_pThCompass; MyCompassObserver * m_pMyCompassObserver; ... } SpeGui::SpeGui() { ... InitializeComponent(); ... //Cast de String^ vers const char* IntPtr strptr = (Marshal::StringTo ...Show All
Visual Studio Team System TFS project deletion and Team Explorer
Following the MS Walkthrough on "Creating a New Team Project" I created the AdventureWorks team project. After messing around with it for a while I deleted the project from TFS using the Team Explorer (or so I thought). Today starting their tutorial over I tried to create the Adventureworks team project and got the Error " TF30321: The name you typed is already in use for another team project on the Team Foundation Server..." So I didn't delete it after all! How do I delete this project from TFS TIA, Barkingdog There is a command line utility, TFSDelet ...Show All
Visual Studio Custom coloring using MPF
The documentation mentions the following for creating custom colorable items: - Set RequestStockColors to 0 or leave it untouched (Left it untouched) - Define your own ColorableItems in the constructor of LanguageService - Override GetItemCount and GetColorableItem methods of LanguageService I followed the above steps and still the custom colorable items do not show up in Fonts and Colors property page on Options dialog box. I made sure that the names of the colorable items are different from the existing ones. I am using October RTM version of SDK. What else needs to be done Thanks in advance. ...Show All
Windows Forms Inet Control alternative in vb.net?
Hi, I haven't been able to find a solution anywhere yet. I have a Vb6 application that has to be rewritten as a vb.net app and in the old application the inet control was set as: inet.Protocol = icHTTP inet.OpenUrl(http://user:password@www.somesite.com/Login) format was used. I have to take this exact same concept and accomplish it in vb.net. Has anyone been able& ...Show All
Visual Studio Express Editions VB: System.Random not random in For... Loop.
I'm having a problem where each number generated using System.Random is the same when created in a loop. The code works fine when stepping through, or using one occurance of the GenerateRandom Function, but at full run time in the loop, results in the same value. I am trying to generate 132 numbers between 1 and 5, and pass those results to an array. Here is what I've got so far... The random class is not all that random. I use RNGCyptoServiceProvider to create them. There is an example on the vb-tips website . ...Show All
.NET Development Online artwork design
I am developing a system which enable user to customise artwork. The tool i use is ASP.NET. I would like to know if I need a component to do that in dot net. The system accepts texts, uploaded image by user and display the result on a graphic (JPEG). Firstly user can select one of the templates and then input texts and upload image. User can change the fonts, colors, position of the text. After updating the system would show the output on graphic form. In the end, the system would generate EPS file based on the design by the user. Q1: Is there any component tat can support that Q2: Is it possible to do in ASP.NET Your advises are tr ...Show All
Windows Forms Memory Used Climbs During Loops
I have a small application that is intentionally occupying the CPU with an infinite loop (do while cancel = false). When cancel becomes true, the loop finishes and the CPU is freed up. My problem is that the memory used by the application climbs quickly during the infinite loop. The loop is empty, and no variables are being augmented or stored. Not only that, but I've stripped everything else out of the application and tested it with the loop being the only code, and the memory usage climbs about a meg a second. Can someone tell me what I could do to keep the memory usage down I would like the usage to be the same after 30 ...Show All
Windows Forms How can I alter the property of the main form control from a secondary form?
Hello, I want to change the BackColor property, for instance, of a control belonging to the main form from a seconday form. How can I do that Please help. Thanks. I'm not an experienced C#'er, but I would try this. If the secondary form was created by the main form, saying secondform.Parent should get you the main form (Possibly you'll need more .Parent, but keep working your way up). Then TypeCast to the main form's type. Then put a period, the controls name, and the property (in your case BackColor); EX: MainForm amf; SecondForm asf; Do ((MainForm)asf.Parent).controlname.Backcolor ...Show All
SQL Server SELECT WHERE
Hi I was wondering if anybody could help me as I am struggling to work out how to do this. I have a table where I will store all details of a consultation. In that table I have the fields IDNumber, PostCode and DOB What I would like to do is to be able to say SELECT * FROM CONSULTATION WHERE IDNumber = request.form(IDNUMBER) or Postcode = request.form(Postcode) or DOB = request.form(DOB) Basically, I would like to filter the records in the following way. If IDnumber = IDnumber but DOB and Postcode do not match, display the record where IDNumber matches. If Postcode AND DOB both match but it does not matter if IDNumber is a match, display ...Show All
Visual Studio Express Editions how to encrypt/decrypt?
Hello, I was wondering how I can encrypt/decrypt text, as I am building a program that stores very personal information. Is this possible in .NET EE Any help would be appreciated. Grtz, Tom. With .NET, anything is possible What you want to look at is the System.Security.Cryptography namespace. You can look through pages and pages (and pages) of documentation on how to encrypt/decrypt using the .NET Framework, or you can use this handy little Encryption Library from the Code Project: http://www.codeproject.com/dotnet/SimpleEncryption.asp I used this library in one of my projects recently and it is great. The documentation will ex ...Show All
Visual Studio Express Editions how to add new line in messagebox
in vb.net, " &vbnewline& " is used to add a new line in the messagebox.show(); e.g. messagebox.show("this is first line" & vbnewline & "this is second line"); how to do it in c#.net plz help In C# (like most C derived languages), escape characters are used to denote special characters such as return and tab, and + is used in place of & for string concatenation. To make your code work under C# you’ve got two options... the first is to simply replace the vbNewLine with the return escape character \n ala: MessageBox.Show("this is first line" + "\n" + "this is second line" ...Show All
Visual Studio Express Editions Visual Basic News Channel
When loading VB2005 Express a message says ' Please wait while the news channel updates it's contents'When loaded the news updates do not go beyond Mon. 07 Nov. If the updates are not to be provided is it possible to remove this requirement Steep Thank you all and a Merry Christmas ...Show All
