Lau Han Ching's Q&A profile
Visual C++ CRichEditCtrl and Justification
Hi, If i use a CRichEditCtrl to edit text, in particular justfying text to the left, right, center etc and doing this using the SetParaFormat method. How can I justfy that text, when I need to programtically to say the right, without using the control or more specifically using the ctrl in a dialog, such that the user doesnt see whats going on Many thanks Will I don't understand what you want to do! If you want to change the alignment of the text you already found the function SetParaFormat. Using this function changes the layout "programmatically" and "the user doesn't se ...Show All
SQL Server Create New SQL Server Mobile Edition Database
Hi, I follow the instruction to install SQL Server 2005 Mobile Edition, but when I try to change the Data Source to add a new connection, I don't find "Create New SQL Server Mobile Edition Database". Does anyone know how to fix this Thanks Paolo Giorgio The following steps should give you a brand new Sql Mobile database - Go to the new connection dialog. Quickest way is to right click on Data Connections in the Server Explorer and choosing to add a connection - Make sure you have the Sql Mobile provider selected. The full name is "Microsoft SQL Server Mobile Edition (.NET Framework Data Provider f ...Show All
Windows Forms How can view custom datagrid to windows forms designer?
I am using Visual Studio 2003 (c++) c# example also fine. I have created a custom datagrid called mydatagrid extending System::Windows::Forms::DataGrid. When I added this in form1.h using include mydatagrid.h, it works. It does not show mydatagrid in the form1 designer, but shows all other controls. How can view custom datagrid to windows forms designer I am also seeing a slow response in Visual Studio when I click form1 designer. Thanks in advance, ...Show All
Windows Forms Databinding textfield in a master detail relation
To all I'm creating a character database for when I play Dungeons and Dragons (pencil and paper version). The problem that I'm currently experiencing is when binding a datafield to a field in a master - detail - detail relationship, the information is for the first record in the table and doesn't update when scrolling the ClassSkills detail table. Following is the relationships for the 3 tables. Table Relation Class ClassSkills One to Many based on ClassName &nb ...Show All
Windows Forms DataGridView KeyDown?
(VS2005 - beta 2) Hello, is there anyway to capture a keypress or keydown event in the DataGridView I know there's events called KeyDown and Keypress, but if the DGV is in edit mode, they never get caught. My ultimate goal is to make it so pressing enter moves to the Cell to the right, instead of to the next row but I need to know what key is being pressed before I can do that. Thanks -Adam Hi Logan I would explain step by step You have to derive the datagridview class to do this. First you have to add a new class1.vb to your project and write some code in it: Public Class DGV ...Show All
Windows Forms Web Browser Sizing
How do I set the height, width, top and left of a form to the Web Browser Control's web page specification in VB .NET 2005 Basically like in VB6 or with the AxWebBrowser control you have subs that say SetHeight and what not. Can someone please help me out here Thanks! Well if any body knows, I am still waiting for the answer on this one. I got the WB.Document.Size.Width to work but it not able to get the new windows size. I have been testing with java like I posted above. Please help! ...Show All
.NET Development How to attain external IP address as I am behind a router.... ?
I asked a question here : http://forums.microsoft.com/msdn/ShowPost.aspx PostID=115743 and I got a great response but the coding for vb 2005 only returns the internal ip address ie 192.168.x.x can anyone help me in vb 2005 to return the external ip address ie the one that your ISP assigns you If the router is on the edge of your network and you have a domain name assigned to it, you can do something similar to the response to your first question. This time you should resolve the domain name and that will give you the public facing IPAddress the router is using. If this is not the case, I'm not ...Show All
Visual Basic IDE Performance problems (slow building, slow property editors, ...) in VS 2005
Hi, we are currently migrating our VB.NET VS 2003 projects to VS 2005. Some of our developers are experiencing performance problems with their VS 2005 IDE. These problems are becoming a blocking issue since it slows down their development time... The performance problems are multiple: slow builds, slow Intellisense, ... but when opening a designer screen with a PropertyGrid (eg. the "Properties" - "Compile" window of a VB.NET project's properties, the "embedded resource editor", ...) is really slow. The PropertyGrid draws itself one 'cell' every second, and in the case of a resource file with 100+ lines this tak ...Show All
Visual Studio 2008 (Pre-release) LINQ CTP (May 2006) is here!
We have the new CTP for you on the LINQ home page . There is one combined MSI for VB and C# developers that contains plenty of goodies: lots of features that you had requested and we had planned in VB, C#, System.Query, DLinq and XLinq. New component - LINQ over DataSet. New samples, visualizers. I will leave it to you to explore the details and give us feedback. Thanks for your interest and excitement since last PDC. This is what keeps us going. Dinesh Kulkarni Program Manager - The LINQ Project ...I think you should support true many to many and you shouldn't have to map the intermediate table to a class. O ...Show All
Visual C# Generics Question
I am just starting to work a bit with generics and ran into a little snag. I have a list object that inherits from bindinglist and I implemented a constraint of LabeledRowCollection. The code looks like this: public abstract class ItemList <T> : BindingList <T> where T : LabeledRowCollection , new () What I am trying to do now is have ItemList implement the IBindingListView Interface, but I can't get it to work. If I try: public abstract class ItemList <T> : IBindingListView, BindingList <T> where T : LabeledRowCollection , new () I get a compile error that says the BindingList declar ...Show All
SQL Server Recursive Trigger Problem
Hi, I'm using windows Sharepoint Services for my application. This sharepoint site contains One Database. In this database one table called Docs Table is there. In this Docs Table i have written Insert,Update and Delete Triggers. Problem i'm facing: When i insert any row in this table(the insertion will be performed when i create a New Document in Sharepoint site or when i Create New Folder in Sharepoint site) my Insert Trigger is called correctly in addition Update trigger is also Called for the same row. When i update any row(the Updation will be performed when i edit a Document in Sharepoint site or when i edit a Folder Name i ...Show All
Windows Forms multiple forms and datagridview question
Hi all :) New problem today for me :( I have a form where users are allowed to insert some data. On another form, i have a datagridview that filter records. On this form, im trying to select a record on datagridview, and bind results to another form that is already opened and active. Thx at all in advance. I would create properties on the Data Entry form and when an item is selected in the DataGridView, set the parameter values on the Data Entry form. In the property set statements on the Data Entry form, post the data to the related controls. Obviously, you will need to handle w ...Show All
Visual Studio Express Editions Command Button Problem
I have recently downloaded Microsoft Visual Basic 2005 Express Edition and I need to add a "command button" for a simple project. In all of my toolbox, I could not find one, however I found "button" and named it cmdBeep. When I added it to my form, switched to the code view and tried to select it so i could add Beep (to make button beep), it automatically changed back to frmFirstCode, the name of my form. Im not sure what the problem is, so any help would be greatly appreciated. Thanks hi, here its some nice tutorials http://msdn.microsoft.com/vstudio/express ...Show All
Visual Studio Remote building
I'm currently finishing a system able to perform builds of .Net solution on a remote server based on code from VSS. Will it be possible with the MS build system and VS 2005 to perform builds on remote machines You will also be able to use Team Build (which is a part of Visual Studio Team System). Team Build is built on top of MSBuild and will provide the ability to run builds on a dedicated build machine. Overview of Visual Studio Team System - http://lab.msdn.microsoft.com/teamsystem/ Overview of Team Build - http://msdn2.microsoft.com/library/ms181710(en-us,vs.80).aspx Faisal Mohamood - MSFT MSB ...Show All
Visual Studio Tools for Office Adding attachment to a mail
I'm trying to find an example of adding an attachment to an email message. I know how to create/address an email message via C# code. However, now I want to open a specific folder (I'll hardcode the folder name into the app) and for every message in that folder, add it to the new email as an attachment and send it. Once it's send then I'd delete all the messages from that folder. I can't find the proper syntax for adding those attachments though. In the Outlook OM is an Attachments collection. Your message will have a property that returns this collection. You then use the Add method on th ...Show All
