Kamii47's Q&A profile
Visual Studio Forcing a clean build - especially for Unit test DLL's
G'day, On of the problems I'm finding frustrating to resolve is how to do the equivelant of the /clean project command in the GUI build process. "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\Devenv.exe" /Clean /project UnitTest C:\Data\Customers\xyz\Development\TheSolution.sln I know there is a Solution explorer right click option to "clean". But I really want to be able to switch that on perminantly for a project, so I can just build/debug it an know that all the latest files are being used. This seem particularly critical for Unit test DLL's for instance. I've had a snoop around the Pre-Build Events for Visual Basic solutions, but the help doesn't seem to give enough examples for me to work out ...Show All
Windows Forms WebBrowser - setting value for "type=file"
I'm using the VS 2005 control System.Windows.Forms.WebBrowser. I want to be able to set the value for a text area that indicates a file to be uploaded, where type=file HTMLInputElementClass iElement = (HTMLInputElementClass)element.DomElement; if (iElement.type.ToLower() == "file") { if (iElement.name == name) { iElement.value = text; Application.DoEvents(); ok = true; break; } } iElement.value is still null after the assignment. Help. Hi mojoshaneman, I have just tried the same thing, and successfully did it. I hope sharing this will help you. The c ...Show All
Visual C# PostMessages in to different app using C#
I want to send keystrokes to another application. Here is what I've done so far, but it doesn't seem to work... private IntPtr GetWindowHandle( string appName) { IntPtr windowHandle = IntPtr .Zero; Process [] processes = Process .GetProcessesByName(appName); if (processes.Length > 0) { windowHandle = processes[0].MainWindowHandle; } return windowHandle; } [ DllImport ( "user32.dll" )] private static extern bool PostMessage( IntPtr hWnd, // handle to destination window UI ...Show All
SQL Server when is the appropriate time to fire t-logs backup
Hi, Is it alright to run t-logs backup while complete or differential backup is still running in the background Objective is zero data loss and faster recovery time, which of the schedule is appropriate 1. full backup (weekly), then t-logs afterwards (round the clock, every 15 minutes), diff (daily) 2. full backup then differential then t-logs (round the clock,every 15 minutes) 3. full backup at the same time running the t-logs continuously, also while running diff backup (is this possible ) Jeff Irish wrote: maranbe, If zero dataloss is your goal perhaps you should be running a SQL 2005 Mirror. However, scenario 2 as presented should work. Full backup weekly, Differential Daily, Transaction Logs every 15 mins. The m ...Show All
Windows Forms Execute another form's Sub from a Dialog
Hi, I'm new at vb2005 and this is my problem: Let's say I have a form with a Combobox filled from a dataset, and I want to show a dialog where the user might insert a new value for that Combobox. If the user hits the Ok button, the values are stored ok, but what would I have to do to reload the Combobox content as soon as the user hits ok in the dialog, so the new value appears on the list Thanks in advance. George Waters wrote: but what would I have to do to reload the Combobox content as soon as the user hits ok in the dialog, so the new value appears on the list Thanks in advance. You need to refresh to source to which you combobox is bind ...Show All
Visual C++ Default argument and Virtual Function..........
why while run time polymorphism the default value of the base is taken not of derived.. class base { public: virtual function(int i, int j = 78) { cout<<i<<" "<<j; } }; class derived:public base { public: function(int i, int j = 55) { cout<<i<<" "<<j; } }; int main() { derived d; base *b = &d; b->function(12); } AND THE OUTPUT IS 12 78 and i think it shuld print 12 55 Because you did not declare the function as virtual in the derived class. Therefore the derived class is not overriding the base class's implementation of it. So when you call it with a "base" level reference you get the ba ...Show All
Visual Studio Changing the cursor color please...
I decided to change some of the colors in my visual studio 2005. I can't seem to find how to change the cursor color from gray. Also I seem to only be able to set the background color for the text editor part of the ide and not the tool windows. Anybody know how to do these Thanks in advance, Devin I have the same problem with the cursor on vista, did you ever find a way to make it act like XP ...Show All
Windows Forms splitContainer problem/bug in .NET 2
Hello, I want to draw nice splitter in splitContainer. To do this, I call method below in splitContainer1_Paint event. private void splitContainer1_Paint( object sender, PaintEventArgs e) { ProfessionalColorTable pct = new ProfessionalColorTable (); Rectangle bounds = (sender as SplitContainer ).SplitterRectangle; // Make sure we need to do work if ((bounds.Width > 0) && (bounds.Height > 0)) { Graphics g = e.Graphics; // Setup colors from the provided renderer Color begin = pct.OverflowButtonGradientMiddle; Color end = pct.OverflowButtonGradientEnd; // Make sure we need to do work using ( Brush b = new LinearGradientBrush (bounds, begin, ...Show All
Visual Studio 2008 (Pre-release) DLINQ for multi threaded applications
Hi, I would like to know the connection pooling support within DLINQ with the May 06 release. My scenario is such that there may be writes from different threads to the same content. Thanks, Karthik DLINQ currently does not support multi threaded access to a single data context. See the reply I got to a similar question in a previous post http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=595228&SiteID=1 ...Show All
Visual Studio Express Editions How do I select rows in DataGrid with values
Hi, How can I select all rows on tableviewgrid However, I don't want to select a new row i.e: colunm1 | column2 ------------------------------ 1 | 'xxx' 2 | 'ddd' * null | null -> new row When I use selectall(), new row is always selected, but I don't want. How do I select rows with values cheers, SelectAll will of course select all the rows, even if no data is there/new row. why dont you, when processing the selected cells, check to see if the last row contains data and if not then skip it and do the rest of your process request i will see what I can come up with - not thinking the usual self at the moment! ...Show All
Windows Forms Watermark TextBox in winform
Trying to create a control like Atlas control that will put a watermark inside a textbox while it is empty. My original idea was use UserControl1_Enter and UserControl1_Leave and set this.Text appropriately, but this method could foul up other code using the Text property. My next idea was to use the Paint method, but I am not even sure that TextBox has a OnPaint event at all. Any tips Jon, as far as I know there is no way you can override the painting the a TextBox control, short of drawing everything yourself. There is a solution that should do the trick for you, though. You will need to sublcass the TextBox and override a few things. Consider the following code I put together (far fr ...Show All
Windows Forms DateTimePicker focus on the day part
I am building a form for rapid data entry with keyboard only. the second control is a DateTimePicker and as is it will focus on the month whenever the control gets the focus. I tryed to SendKey({Left}) in the Enter event, but it is not working right most of the time. Is there a way to make it first focus on the month part You answered the right question! I tried your code but whenever the OnEnter fires I get a Win32Exception "Error creating window handle." So the theory is great, it just doesn't work. If there was a way to tell which part (day month or year) the focus is on when the OnEnter fires, then I could use the right SendKeys .Send Thank any way! ...Show All
Visual Studio Tools for Office Taskpanes created in VSTO workbook visible to all other workbooks which are opened --- How????
Hi Alex Thanks for the e-mail. Its a clever work around. Am I right in saying that you take the current VSTO document, save it, and then you would either save it as a new one in the case of someone who wants to create a new workbook or if it is an existing workbook, the contents of the existing workbook would be copied into existing VSTO project I'll have to think about this one. Two issues I would have are as follows: If I make anhancements to the code in the existing project in VSTO dev emvironment this will not effect the other previous workbooks with the old code saved. The other issue I have is that the action pane I have developed is heavy. i.e. It uses infragistic controls and once loaded with data, between itself ...Show All
.NET Development help: Update Records In a Database
I'm not using sql. All I've done is placed a dataview grid on the form and set up a datasource. Then I set up the text boxes so when you click on one of the records on the dataview grid it will shows the rest of the data from that set into the textboxes (That works). Then when I click an add button a new row appears (This also works) and then I am able to type into the textboxes with the information as required (this works). Then I'm stuck to actually update the database file because as soon as you close the form the new data is lost. I have tried using this code construct (not included all textboxes though) DataSet .tablename.column = textbox1.text; this .tablenameTableAdapter.update( this .dataset.tablename); The error ...Show All
SQL Server Am i going the right way about this
Hi, Im building an application in vb.net 05 and mobile sql. When i added the mobile database in visual studio it added a Dataset object in the object viewer. Now my question is should i add table adapters to this and do my selects inserts updates and deletes using this, or should i us the sqlceclient class connect to the db use a command object ect and do my operations I need it to be as fast as possible and 100 reliable. Can anyone give me a clue as to the best way forward Trev The automatic creating of bindingsource and datasource datasets is a convenience in VS2005 and you can certainly do most of your interaction with SQL Mobile using this approach. If you want fine ...Show All
