perrs's Q&A profile
Windows Forms Avoiding the selection of text in a DropDown ListBox
I've built a User Control that has a number of controls in it. One of these is a simple DropDown ListBox. When the User Control is instantiated it always selects [in blue] the text of the selected item. I've tried everything I can think of to "hide" the blue, such as setting SelectionStart = 0 and SelectionLength = 0. I've also tried setting the focus to another control. But nothing seems to stop this highlighting from occurring. Any ideas how to resolve this problem Robert W. Vancouver, BC No, actually, I want a selection to occur. To better explain my dilemma, let me add this: In this dropdown listbox there are only two values to choose from: Simple Weighted One of them MUST be selected at a ...Show All
Visual Studio Express Editions VB express, "Exclude from project"?
How does one exclude a file from a project in VB express In the C#and C++ versions a right click on a file in the solution explorer will give the option to exclude a file. In VB express, the only option is to delete it, which will delete the actual file. Am I missing something What do you mean by "Exclude from project" What exactly is the result you are trying to achieve There is a "Build Action" which you could set to "none" which would effectively "exclude" a file/module/class, etc. from the project. ...Show All
Windows Forms DataGridView: Scrolling to Selected row
(.NET 2.0 Framework) In the DataGridView control, I have programmatically selected a row that's currently not displayed in the grid. However, the grid does not seem to scroll to the selected row automatically, and there doesn't seem to be a way to scroll programmatically to any row, let alone the selected row. Some details: - my DataGridView is running under VirtualMode - I first execute DataGridView.ClearSelection() then DataGridView.Rows[index].Selected = true - I have traced the rows that aren't displayed and the pertinent properties are: DataGridViewRow.Visible = true DataGridViewRow.Displayed = false I see no functions under DataGridView or DataGridViewRow to force the DataGridView to for ...Show All
Visual Studio Express Editions Getting started with C++ Express - Please help!
I've been using VC++ 6.0 for a long, long time. The main reason I want to change is the many bugs in 6.0 having to do with templates. Tonight I downloaded VC++ 2005 Express and the SDK. I tried to follow all the directions for integrating the SDK, but it was very confusing. It would be nice if there were a start-to-finish set of instructions that included exactly what buttons to push to get the right version of the SDK. Anyway, here's where I am: I created a tiny console application. I don't know if it's native or managed. (How do you choose I want native.) I've stripped it down to #include <windows.h> followed by "int main() {return 0;}". The "Release" version compiles and runs. But the "Debug" version ...Show All
Visual Studio Express Editions Setting keyboard shortcuts in VS Express
Hello. I have been trying to set keyboard shortcuts and can't quite figure it out. I've tried going to Tools/Options and selecting 'keyboard' and then I get a dialog which wants me to press the shortcut, but once I've done that I can't figure out how to get that key combination to actually execute what I want it to do. Since I'm using the express version, for which apparently you can't set watches, I'm always using MessageBox::Show(Convert::ToString(x)) to check different numbers, so I want to be able to press a few keys and have 'MessageBox::Show(Convert::ToString(' appear. This is more of and IDE than language question but the only time I ever posted in the visual studio debugger forum no one even looked at my question, which was very si ...Show All
.NET Development XSLT output incompatible with standard
Hi Folks, I am trying to convert XML to CSV format output. I was able to convert it by using the following option: output method ="text" But, the output doesn't seem to adhere to the standard. I was referrring to the following link to refer to the CSV format: http://en.wikipedia.org/wiki/Comma-separated_values Please correct me if i am wrong. TIA Sek Anton, that was quite self-explanatory i was spending time understanding every bit of your work! kudos for taking time to post. -Sek ...Show All
SQL Server Custom Code for a Parameter
I'm using a GAC-installed assembly as part of a Reporting Services (2005) report. The code does not need any permissions beyond execution. All it does it take today's date and calculate last week's start and end date. It's all just datetime manipulations. All methods are static. In the VS2005 report designer, I can do everything fine. The code runs as expected and defaults the parameters to the right date. When I upload the rdl to the Report Server, I get the message "Error during processing of ‘Start’ report parameter. (rsReportParameterProcessingError) ". If I override the "Start" parameter, it doesn't give me that error anymore. Start should be the Sunday of the previous week. I have deployed the signed ass ...Show All
Visual Studio Team System Can only connect VS to Team Foundation Server from server machine
Fresh install, 2 tier server config, one App and one Data. Service pack 1 beta. We have a strange problem regarding VS TFS: When we connect from the local machine using VS/Team Explorer everything works correctly. All functionality is functioning as expected. When we try to connect from another machine, in the same domain, from the same domain account (domain admin) we get the following error when we try to add the server to Visual Studio: TF31002: Unable to connect to this Team Foundation Server: ........ This is with the exact same installation media for the team explorer software, on the local network with the TFS server. When we try to open the web service manually we are presented with it's methods, so that lead us to beli ...Show All
SQL Server Running Value
Hi In my report I have the total column,under the total i have two sub fields:no , Row%and i have another column Cumulative total sub fields are no,***% For the Row % under total i write like this: =Round((Fields!Male.Value+Fields!Female.Value+Fields!Unknown.Value+Fields!Invalid.Value)/Sum(Fields!Male.Value+Fields!Female.Value+Fields!Unknown.Value+Fields!Invalid.Value)*100,2) For the *** % under cumulative total the expression is: =RunningValue((Fields!Male.Value+Fields!Female.Value+Fields!Unknown.Value+Fields!Invalid.Value)/Sum(Fields!Male.Value+Fields!Female.Value+Fields!Unknown.Value+Fields!Invalid.Value)*100, sum , "AgeByGender" ) But i am getting this error: The Value ex ...Show All
Visual Basic IsEmpty() in VB.NET
I am updating a VB6 class module to VB.NET and the editor says IsEmpty is not declared. Is this function not available in VB.NET and, if so, what replaces it I have added VB compatibility to the project references, but it does not make a difference. Is Nothing or IsNothing() both work. Thanks for the tip. I was having the same problem and it got me over the hump. Donnie Curington Senior Associate Stress Engineering Services Houston, TX ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Combining two effect
Hi, i am trying to render mesh with two effect: the first - simple texturing effect, and second - simple directional light and always get a result of first shader. And when i am rotate camera i get a strange artifacts. May be someone can show me a working render with two effects and mesh Thanks Shawn! That article is very interesting, but not so easy and i am trying to understand some aspects of it. Now, i want to answer you about my problem. Sorry for my english :) For example, I have a model or mesh. My model contains list of effects: class Model { List<Effect> effects; } And I have two simple effects: the first is a simple texturing ...Show All
.NET Development Very long signing a message
Hi all. I have a method which sign a message with a certificate registered on my computer: public static byte [] SignMessage( byte [] m_message, X509Certificate2 m_cert) { DateTime dt = DateTime .Now; ContentInfo m_contentinfo = new ContentInfo (m_message); SignedCms m_signedcms = new SignedCms (m_contentinfo); CmsSigner m_cmssigner = new CmsSigner ( SubjectIdentifierType .IssuerAndSerialNumber,m_cert); m_signedcms.ComputeSignature(m_cmssigner); global ::System.Windows.Forms. MessageBox .Show( DateTime .Now.Subtract(dt).ToString()); return m_signedcms.Encode(); } m_message array lenght is not more than 150 bytes (!!!). mbox shows me at least 6-7 seconds for only one ...Show All
Visual Basic DateTimePicker ValueChanged Event Bug
Hi, I've found what i think is a bug in the DateTimePicker. To test the apparent bug add two datetimepicker controls to a form, add a message box warning on the ValueChanged event of dtp1 if dtp1.value > dtp2.value. Run the project and change the date on dtp1 by dropping down the dates and clicking on the month change arrow button. Whilst you are reading the message popped up, the control will still be processing the change month click event again and again. This makes the ValueChanged event next to useless and must be a bug cheers dave I'd tend to agree with MacMatt_98 on this one - this would appear to be validation, in which case the validating event is probably a better choice to use than t ...Show All
Windows Forms AutoScrollMinSize doesn't set the scrollbar sizes correctly
Hi, Did a search and can't seem to find an answer. I've got a custom paint control (derived from UserControl) that has AutoScroll to true. I hide and show containers (for navigation) and embed several versions of the custom control in there. I'm setting the AutoScrollMinSize and the size of the scroll seems to reflect changes to the view settings (the nofification works and the resize seems to be correct) but the scroll bars don't resize even though they should. The scrollbars resize correctly on a control that isn't shown, but not on the active control. The size is correct and I've even tried resizing the control to see what happens, but nothing. Can I force a resize of the scroll bars in some other way Does any one have any ...Show All
Visual Studio Trouble connecting to SQL Server
I installed SQL Server and Visual Studio 2005 Team Foundation Server, Beta 2 on a Windows Server 2003 PC (the server), and Visual Studio 2005 Team Suite, Beta 2 on a Windows Xp PC (the client). More detailed installation and configuration information is in the latter half of this message. I have looked at all of the headers in this forum and noted atoenne's trouble connecting to SQL Server 2005 Express CPT and SeeBee's trouble connecting with a local SQL Server. My problem is similar, but still different. On the client I bring up Visual Studio 2005 Beta 2, and go through the "Walkthrough: Basic Data Access in Web Pages." When I get to the step to create an SqlDataSource I configure a data source by creating a new connection and enter NEW ...Show All
