alan_ding_ding's Q&A profile
Visual Studio Express Editions How do I pass data from Form2 to Form1?
The user selects a name & address record from a DataGridView on Form2. I need to display the name & address in a TextBox on Form1. How do I pass the data across If the textbox has been added with Friend visibility, which it will have been if you made it in the form designer, then form1.textbox1.text = "Whatever you want" will work. However many people would frown on that. A more hygenic way to do it would be to declare a writeonly property on form1 (assuming you only want to display the address and not read it back again) and use that to set the display in the textbox. On ...Show All
Smart Device Development Serial Port Error: COM1: does not exist
I have a PPC app that I am simply trying to open a serial port for using the SerialPort control in VS2005. As soon as I try to open the port it will give me "Error 57: The port 'COM1:' does not exist. And it does this for COM2, COM3 & COM4 too. This is a Dell Axim x30 with Wifi if that helps at all. Anyway, I cant figure out why it keeps throwing this error. If anybody has any ideas what may be going on I would love to hear em'. Thanks Mike Are you sure you have COM1[2,3,4] There might be no COM port at all or it might be pretty much any number, depends on particular device. ...Show All
.NET Development Start a XMLWriter already indented
Hi, I have created a xml file with the XmlTextWriter . I want to add this xml to another xml I am doing in other fragment of code, and I want to continue indented in the proper way. I have something like this: <logEntry> ............ <ExtendedProperties> code to Replace </ExtendedProperties> </logEntry> I want to get something like this <logEntry> <ExtendedProperties> <ExtendedProperty> ................. </ExtendedProperty> </ExtendedProperties> </logEntry> But if i add the xml to the xml i have alr ...Show All
Visual C# If statement problems
Hi, I'm very new to the C# community I have been working on a program that uses username recongnicition and I have a question. Here is my code if (textBox1.Value == "mittensonfire") { MessageBox.Show("You are very leet"); } else { &nbs ...Show All
Visual Studio Express Editions Difficulty adding a parameter to a querry
I am using two MS Access tables in my data source when I create a querry with a literal string everything works fine i.e. Select MyTable * from MyTable where (MyTable.Description Like '%' + 'Anything' + '%' I get the proper results When trying to use a user input field inside the query it doesnt work i.e. Select MyTable * from MyTable where (MyTable.Description Like '%' + @Description + '%' I get an unable to parse error If I use two SQL tables (non access0 everything works fine P.S. My head is hurting because I have been banging against my desk for the past two weeks trying everything I ...Show All
Visual Basic How do I change the style and the color of a font?
I have downloaded vb express beta 2 and am trying to learn it by converting some of by vb6 code. I have a million questions (well almost a million). In my vb6 program I loaded the fonts that were on the computer and set my picturebox font to it. However in vb net the picturebox does not have a font, thus starting my problems. After many hours searching I found how to enum my fonts. Then came the problem of setting the font. I came up with this and I don't get an error. Dim myFont as Font myFont = New Font(cboFontName.SelectedText, Val(txt1FontSize)) Is this the right way to do it My next problem is setting the size, bold, italic an ...Show All
Visual FoxPro Error using SQL to populate grid
I have a 9 column grid that I'm trying to populate using an SQL statement in the RecordSource property of the grid. The statement works fine if I only use 8 fields, but when I try to add the ninth field, in any order, I get a "Command contains unrecognized phrase/keyword" error. This statement works - thisform.grdmatching.RecordSource="select main.main_id, main.prepdate, ; main.reqby, act.desc, main.episode, vendors.vendor, ; detail.desc, detail.estprice ; from main,act,vendors,detail ; where act.act_id=main.act_id AND ; v ...Show All
SQL Server SSIS Requests...
May be it's too late, but I think this requests could be scheduled at least for a SP1 if it's not possible for the RTM. 1) Execute Task without debugger: it would be very nice to be able to execute a single task without going in debugging mode. Just as you would ask "Start Without Debugging CTRL+F5" but for a single task 2) Customize default properties for task and component: when you drag a task on the package you get a default value for the properties that you could want to change; often I need to change the same property in the same way each time (for example I'd like to set the Batch Size for a OLE DB destination to 1000 instead than 0 ...Show All
Visual Studio Changing page margin using parameter in report
Hi All, How should I use parameters to change page properties like margin settings and page length etc is there any way I can use expressions to use those parameters for this task Please write a small example if you can. ...Show All
Windows Forms Programmatically create drop shadow for image (.jpg file)
I'd like to create a small little app to use for myself that will automatically create a drop shadow on a .jpg file. For an example of what I'd like to do with .NET check out the thumbnails at the following link: http://www.level3photography.com/Proofs/Linsey/default.htm I'm curious if anyone has any sample code for creating a drop shadow on an image using ...Show All
Visual Studio Team System TFS Workgroup
I have received an update to our MSDN subscription (Disc 3073 December 2005) that claims to have the Developer version of VS 2005 Team Edition along with TFS Workgroup Edition. I popped in the disc and went through the install (Full) and what was installed appears to be the VS2005 product. This indeed seems to have the Team Edition for Developer tools but I am unable to find and install the TFS Workgroup Edition bits to get the task lists, source control etc... that I am familiar with from the TFS beta installs I did previously in our test environment. Any words of wisdom Thanks! Check out: http://blo ...Show All
Windows Forms DataGridView Performance questions
Hi, I just did some testing with a DataGridView which had 20 rows and 4 columns. All I did is realtime updating 1-3 of the rows in the datagridview at a rate of max. 4 updates per second. However, this spiked my CPU usage up to 60% but I've seen software that uses only about 2-6% CPU power to do similar processing. What is the reason for ...Show All
Windows Forms Resource files not being included?
My application is globalized and many assemblies have their resource files for storing globalization information. When I publish by ClickOnce, I find in the "Application Files" window that all resource files, except those of the startup assembly, are not included. Can I add them by myself or any other way to solve the problem Thanks Hi Kennon, First of all ClickOnce has an option for publishing in a particular language, and only the resources with those are included, atleast that was the case with me also. What I did to solve this was that I copied the resource files along with their respective folders i ...Show All
SQL Server SQL Server 2005 equivalent to "Quiesce Database" for split mirror backup?
We run on a SAN and we currently use a split-mirror setup to backup our non-Microsoft databases. We quiesce the database (which suspends all transactions), split the mirror, unquiesce the database, and backup the database from the split secondary disk. The quiesce/unquiesce takes a matter of seconds. Once the backup is done, we reconnect the mirror at the SAN level and it synchs back up. It works quite well. We would like to do something similar with our SQL Server 2005 DB. The database will quickly become a VLDB and using the native backup utilities will take too long (I know there are tools that can speed this up, but we would still lik ...Show All
Visual C# How to associate a column with dataGrid
suppose i have query select name, father_name, Grad, Loc from emp , now i want to associate only name and father_name with data grid. So how can i do. You can this by creating two columns in the DataGrid i.e NAME, FATHER NAME. then assign the Column DataPropertyName to the respective column of the Database. ...Show All
