piyush varma's Q&A profile
Visual Basic controlling date formats in control panel
HI, How to control the date format in the control panel. regional settings. because when we change the formats in the control panel while the application is running. the date values stores different values. How to prevent this by locking the control panel settings. Or to change the values of the date format in the regional settings programmatically. when we start out application. Is this the right syntax for storing dates anydatatable("anydatefield")= cdate(format(dtpicker1.value,"dd/MM/yyyy")). or simply anydatatable("anydatefield") = dtpicker1.value Although set the custom format in the properties, it changes according to the regional settings. How to access the .cpl classes. t ...Show All
Windows Forms text on ListView isn't rendering correctly
i am having a problem with a listview control not showing the color correctly. What is happening is when a form is closed over the listView control the font and color don't show properly. Its kinda hard to explain but Here is a link to a pic of what is happening. The main form that the listview control is on does have the double buffer property set to true. I don't know of any other way to fix it. Any suggestions thanks in advance thanks for the reply guys this is what i have: Font font = new Font ( "Tahoma" , 8); ListViewItem lvIndex = new ListViewItem (salesNum, 0); lvIndex.UseItemStyleForSubItems = false ; lvIndex.SubItems.Add(salesName, Color .Red, Color .Empty, f ...Show All
Visual Studio Express Editions Disable triggering of events?
Is there a way through code to enable & disable the events for a control For example, I have a textbox control that I sometimes want to trigger the .textchanged event when text is typed in it & sometimes I don't. To be more specific, when somebody types text into the textbox, I want the TextChanged event to trigger with each character typed, because I am checking the text for certain strings on the fly. But if I set the text of the textbox programatically, then I dont want the TextChanged event to trigger. I hope I explained this well enough for you to follow. Thanks for any help... The addhandler and removehandler statments work in conjunction with each other to add and remove event handlers: ...Show All
Visual C# COM object interfereing with a CheckBoxList?
I apologize if this is the wrong area, but I couldn't find anything else that fits the subject quite right... I've got a com object ( IE ) running and grabbing information, however when I try to populate a CheckboxList control, it simply refuses to fill the control with any data. Is there some weird interaction between the two I am unaware of So basically, an event fires,and then data is processed, here's a quick snippet... CheckBoxList checkBox; checkBox = new CheckBoxList(); // Get the data, and now... foreach(string dataItem in myData) { checkBox.Items.Add(dataItem); } After this is through I would expect my CheckBoxList to be populated, but it remains blank. Any ideas on why this might happen Thanks! ...Show All
.NET Development Help request on How to draw a vertical upward string?
Assume that I have drawn two coordinate axes on the screen (X and Y). When I want to put axis captions on the screen it's OK with X-axis such that Graphics^ gObj = this->CreateGraphics(); String^ xAxis ="X-Axis"; // Make necessary arrangements here such as measure string and find the optimal screen position, etc. then draw the string gObj->DrawString(// put necessary parameters here); Then the result is "X-Axis". It is just fine. How can I do it for the y-axis When I choose text alignment vertical, the string containing "Y-Axis" is drawn like this : Y - A x i s (LOL!). How can I put a vertical upward string "Y-Axis" parallel with the vertical y-axis on the screen Rega ...Show All
Visual Studio Tools for Office Not all nodes available as VSTO-Controls in a VSTO2005 Word solution
I made a VSTO2005 Word template solution created with an existing Word 2003 template. Attached to the template is an extensive XML Schema, all the nodes, even the optional ones, are used once in the template. Unfortunately not all nodes are available as VSTO-controls. All nodes below an <extension>-Elements in the XML-Schema are invisible. Is there a documentation about which schema-elements are not supported Please consider the following example, first the XML-Schema: < xml version="1.0" encoding="utf-8" > <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:t="myNamespace" targetNamespace="myNamespace"> <xsd:element name="course"> <xsd ...Show All
Visual Studio Team System TFS Project & Report Server ERrors
When I create a new TFS Project, the Reporting Services component that retrieves "Remaining Work" and "Bug RAtes", etc errors with a message The path of the item "//Sites/MyTracker/Remaining Work" is not valid. The path must be less than 260 characters long and must start with slash. Other restrictions apply. (rsInvalidItemPath) The path of the item "//Sites/MyTracker/Bug Rates" is not valid. The path must be less than 260 characters long and must start with slash. Other restrictions apply. (rsInvalidItemPath) What can I do to fix this Hi Randy, The steps below are to verify that the base URL to the reporting server is correct in TFS. - Log ...Show All
.NET Development request help with DLL on database machine & thin Client application
Hello, Here is what I'm doing: 1. SQL Server 2005 database is created on machine using Transact-SQL (this includes dropping any previous files). This is created onto the Defaul instance (MSSQLSERVER). 2. a DLL (class library) is made in VB.NET using ADO.NET connection objects. The connection string looks like this: strConnection = "Data Source=.;Initial Catalog=" & dbName & ";Integrated Security=True" where "dbName" is "SQLdatabase1" 3. the Client application adds a Reference to this DLL and will run from the development machine. Here is the problem and the question: When I install the DLL onto the database machine, and I shut off the .MDF database on my developm ...Show All
Visual Studio Express Editions Registering DLL
I am upgrading a VB6.0 program to .Net with Visual Basic 2005 Express Edition. The program runs on the computer I use for debugging etc. but when I try to move it to another computer it looks like the MSGrid DLL is not being registered on the new computer. I have been using Publish to create a setup.exe. Any suggestions Thanks The publishing capability included with VB Express (ClickOnce) does not have the ability to register activeX controls, in this case MSGrid. You will have to one of the following: Replace it with the much more capable built in .NET Framework controls (e.g. DataGridView) Have the installler of the published application register the control manually create your ...Show All
Windows Live Developer Forums hide virtual earth logo and
does anyone know how to remove the virtual earth logo on the bottom left corner of the map and also the map ruler on the bottom right corner, thank you! yuki From an API perspective, it would be nice if there were properties on the map control that allowed basic 4-corner positioning of the ruler and logo. It would also be nice if the click-through to local.live.com were optional. I have no problems with the Terms of Use and "not being able" ;) to obscure the logo -- but the click through behavior as unexpected is something I'd like to be able to control. ...Show All
SQL Server Smart Aggregation
I'm having problems implementing the following in reporting services 2005. My hierarchy looks like this (just to illustrate the problem...): University->Student->Exam My query returns the following fields: University,Student,StudentPayment,ExamName,ExamScore I need to create a report that will show the hierarchy and to smartly aggregate the StudentPayment to both the Student and the University levels. The problem is that the StudentPayment field is being multiplied by the number of exams in the upper level aggregation. If only I could set the granularity level of the StudentPayment measurement... Note that I don't have access to the query, so I can't change anything on that front. Thanks, Efi ...Show All
Visual Basic VB Generics: if list.Exists("Foo")
I love generics but I don't understand them very well and can't find an answer that makes any sense to me. Perhaps someone can help. I understand dim l as List(Of String) and l.Add("One") l.Add("Two") l.Add("Three") but I don't get if l.Exists("Foo") then l is a list of String, and apparently I need to define a delegate that returns true/false if the param exists in the list. Have to use AddressOf to tell Exists what to call when it's invoked. All that sorta makes sense. However, I'm very unclear on what the delegate should look like MSDN shows a hard coded "saurus", but that makes no sense to me - it seems like I ought to walk the list somehow, and I'm assumi ...Show All
.NET Development sent and received data size!
hi.. how can i make sure that the socket doesnt send more data than i want it to send ! and that it does not receive more data than that was sent to it!! to be more clear im sending pics from a client to a server.. the max size of the image is 4500bytes.. but some times the size received on the server is more than that!! how come! thnx I assume you are using TCP sockets If so, the amount of data sent will always match that recieved. If UDP, could you potentially have multiple clients sending data to a single receiver ...Show All
SQL Server Referencing the return value of a Subreport
I have a subreport inside my main report and it is working just fine. The subreport is called sbrCaseSummary. In an expression of another txtbox in the main report I want to reference the value returned from the subreport. How do you reference it I can't find out how that's done. Help. ...Show All
SQL Server How to include a single quote in a sql query
Hi Declare @Customer varchar(255) Set @Customer = Single quotes + customer name + single quotes Select Customerid from Customer Where name = @Customer I have a query written above, but i was not able to add single quotes to the set statement above. Can i know as how to go about it Early reply is much appreciated. Thanks! Hello, If your issue is that you are having difficulties finding a way to deal with character string which may contain one or more single quotes, then the solution is NOT to surround the string with single quotes as a previous user suggested. This will only work if there is in fact onle one single quote in your string such as O'Brian. It will not work if there are multiple quotes such as Here's ...Show All
