MikeS's Q&A profile
Visual Studio Express Editions Save checkbox Settings
HI again how can i save checkbox settings for example: default configuration is, if cehckbox is uncheked than program will initialize normaly, if is checked than will initialize minimized. Thanks ;P 'Create a setting called 'cb1' '(Double click on the solution explorer window, 'My project') 'Find the 'settings' tab. 'Name = cb1, Type = Boolean, Scope = user, Value = False 'On a form with 2 buttons: Public Class Form1 Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' chk the box Me .CheckBox1.Checked = True End Sub Private Sub Button2_Click( ByVal sender As System.Object, ByVal e As System.Eve ...Show All
SQL Server First Letter Capital More Than One Word
Here is my question: Can you set this code up to do more than one word ex: I have names like Mc Donald, or Brook-Smith and the are lower case like the code states upper (left( client . first , 1 ))+ lower (right( client . first , len ( client . first )- 1 )) + ' ' + upper (left( client . last , 1 ))+ lower (right( client . last , len ( client . last )- 1 )) As 'Full Name' I think you may have overlooked this from the last post, but these two functions do exactly that. Please try this function or set of functions. The first one is ProperWord and the other is ProperString. One calls the other, but if you are only doing one word, then you can just use ProperWord. Feel free to email ...Show All
Visual Studio Team System Compare directories
How do I do a directory comparison with TFS. i.e. compare a directory on my machine to a folder in the version control of TFS Try this Option; Install power tool for TFS on your dev machine. Can be downloaded here ...Show All
Windows Forms InvalidOperationException when deleting new row with BindingNavigator
When I use the BindingNavigator's delete button to delete the newrow in a DataGridView, if the new row is the only row, I get an InvalidOperationException "Current item cannot be removed from the list because there is no current item." This will happen in a simple designer-built example. Create a DataSet with a DataTable with a Column. Then add the bound DataGridView to the form. Run and delete the newrow using the Navigator. The unhandled exception occurs. I can create my own delete button and check for the newrow before doing the delete. Is there a better way to handle this Should I be catching this exception instead Thanks. i could not get around this problem but setting the navi ...Show All
Visual Studio Team System Overwrite Drop Location and keep output from project files!!
Hi All, Is there anyway that I could by pass drop location and keep the output as I set in the project files Best Regards, Hi You could also use the following to copy your binaries to the proper location <Target Name="AfterDropBuild"> <CreateItem Include="$(BinariesRoot)\**\*.*" > <Output ItemName="FilesToCopy" TaskParameter="Include" /> </CreateItem> <Copy SourceFiles="@(FilesToCopy)" DestinationFolder=" \\machineA\TeamBuildDeploy\Testers " /> </Target> ...Show All
Windows Forms Another Code generation for Property XXX failed.
Hi, When I open-up a form which a bunch of controls (partly custom controls) on it, they are immediately marked as having been changed in Source-Control. I then open-up the resx file which seems to be the source of the problem and I get the following error: Code generation for property 'DesignTimeLayout' failed. Error was: 'Unable to cast object of type 'Janus.Windows.GridEX.GridEXLayout' to type 'Janus.Windows.GridEX.GridEXLayout'.' After hitting OK, if I jump into the form, then back into the RESX, the corresponding layout-strings are gone. They are readable and ok, though! If I compile and run the program, everything is fine and the properties are read and the grid displays fine. Also this problem only seems to occur once in ...Show All
SQL Server Beginners
I have just started learning SQL server. Where from I start. I have downloaded SQL Management Studio & SQL Express Edition. Now What should I do now HI, Well, I have downloaded the book now. I have some knowledge about databases. as I used to work with MS Access already Thanks & regards ...Show All
.NET Development Validate XML against a DataSet Schema.
I have limited XML skills and am completely baffled by how to validate an XMLDocument using a DataSet schema. Let me explain, I have a web service with an XMLDocument as it's main input parameter. This XML needs loading into my database. I can successfully do this as follows:- oraCmd = new OracleCommand("MyOracleTable", oraConn); oraCmd.CommandType = CommandType.TableDirect; // get Data Adapter oraDA = new OracleDataAdapter(); oraDA.SelectCommand = oraCmd; // Create ins procs for saving data OracleCommandBuilder oraCmdBuilder = new OracleCommandBuilder(oraDA); oraDA.InsertCommand = oraCmdBuilder.GetInsertCommand(); // get schema for DataSet DataSet oraDS = new DataSet(); oraDS.DataSetName = "Plan"; oraDA.FillSchema(o ...Show All
Visual Studio Express Editions Readline
How to readline from a txt file from line 1 to line 10, then calculate the average of the 10 value, then continue to take the average of the next 10 values again, this process starts over and over again until it reaches the end of the txt file Dim Total, Count As Integer If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then Dim SR As New System.IO.StreamReader(OpenFileDialog1.FileName) Do While Not SR.EndOfStream Total = Total + CInt(SR.ReadLine) Count += 1 If Count = 10 Then MessageBox.Show((Total / 10).ToString) Count = 0 Total = 0 End If Loop If Count <> 0 Then MessageBox.Show(" ...Show All
SQL Server Time Intelligence
How does the Time Intelligence work I used the wizard to create Year To Date calculation. It created the calculation and assigned the expression to "NA". It also created a calculation script as shown below. When I use this in a browser, I always get NA for Year To Date. What am I missing Is this using the computer's date when computing year to date // Year to Date ( [Start Date].[Year - Quarter - Month - Date Start Date Calculations].[Year to Date], [Start Date].[Year].[Year]. Members , [Start Date].[Date]. Members , { [Measures].[WST AMT], [Measures].[TOTAL AMT] } ) = Aggregate ( { [Start Date].[Year - Quarter - Month - Date Start Date Calculations]. DefaultMember } * PeriodsToDa ...Show All
Visual C# VB.NET 2.0 to C#.NET 2.0 (Help Please)
I'm working on Converting a VB.NET 2.0 Project to C#.NET 2.0 and need a bit of help with this... Here is the VB.NET Code i'm coverting:: statz.Items.Item(2).Text = "0" For i = 0 To CInt (ClientList.Text) ClientID(i) = ListView1.Items.Item(i).SubItems(1).Text Socket(i).Close() Socket(i).Connect(ServerList.Text, 5050) If ServerList.SelectedIndex = ServerList.Items.Count + 1 Then ServerList.SelectedIndex = 1 Else ServerList.SelectedIndex = ServerList.SelectedIndex + 1 End If /****************************************************/ ListView1.Items.Item(i).SmallIcon = 2 Yes it is intialized in several Areas this is the VB.NET:: Private ...Show All
SQL Server Package Validation Error
I have a package which takes a text file and imports data into a SQL table. It returns the Package Validation Error: Error at Data Flow Task [SQL Server Destination [1430]]: Failure inserting into the read-only column "ZipCode". The column ZipCode in the sql table is a varchar(50) column. I do not understand why it thinks the column is a read only column; if someone could shed some light on this I would greatly appreciate it. Thanks! GN Okay I've confirmed that it is a permission error. When I use my login, which has sysadmin privleges, for the database connection there is no problem inserting into the table fields. When I use another login that does not have sysadmin privleg ...Show All
Smart Device Development Tray Icon in C# in WM5
Is there any way to add tray icon of an application that is executed in background I wrote an application in C# and i want when it is sent to background(it is minimized) to get an icon in the tray. When i click the tray icon, i get the application back again... I work in C#, in Visual Studio 2005. The whole project is about PPC Windows Mobile 5 device. Thank you Hi Perarg The Windows Mobile 5.0 Pocket PC SDK ships with a C++ sample showing how to add a tray icon: ...\windows ce tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Samples\CPP\Win32\Trayapp This article may help to convert this sample into C# code. Michael ...Show All
Visual Basic Problem saving graphics to a file
Hi, I have an application in which the PaintEvent calls up a procedure to get data from four Sql tables, and produce drawings. This part of the app works fine. I am now trying to copy these drawing one at a time to a Bitmap file, and not having much success. I've omitted the the Sql statement sections in the following code as they are not the problem. Private curFileName As String Private curImage As Image Dim ImageNo As Int32 = 0 ' This procedure adds the drawings ands text to the appropriate rectangle. Private Sub DrawDetails(ByVal e As Graphics) If ImageNo = 0 Then ImageNo = 1 Else ImageNo = ImageNo + 1 End If curFileName = "Drawing " & ImageNo & ".bmp& ...Show All
Visual Studio Express Editions How to find missing numbers
I am trying to figure out code to determine which numbers are missing from a column within a datagridview based on a number entered by the user. In other words, if the user enters 10 into a textbox and there are 3 rows of data in a datagridview that contain 2, 5, and 7 in a column named Number, then I need a string result to be "1 Or 3 Or 4 Or 6 Or 8 Or 9 Or 10". Can anyone help me I'm sure it has to involve For, Next statements and possibly some If, Then statements, but I can't follow the logic and put it to code. For an added challenge, The "numbers" in the column are actually strings, with the number 1 displayed as "001", the number 10 as "010", and the number 100 as "100". But, ...Show All
