Sourcecode's Q&A profile
Visual Studio Remove Template security warning dialog
We have created templates for classes used in our product integrated in Visual Studio 2005. Currently we place them in the My Documents location. When the user selects "Add New Item..." and the template, a scary dialog appears, Microsoft Visual Studio - Security Warning The following template is attempting to open one or more documents in a manner that could pose a security risk. ..... This is horrible! The template has no custom wizard and is no security risk, much less than the security risk from any possible add-in, which seem to have no such dialog. How do we prevent this dialog from appearing If we put the template into the sta ...Show All
Windows Forms Data Grid View Set Seleted Row
Any one out there have a good way to set a row to selected based on a column value Basically I have the value of the column so I so I need to find that column and then set the whole row to selected where the column value = myValue Before in 1.1 you could just do this to set the cursor / dg Arrow dataGrid.CurrentRowIndex = MyRowIndex and dataGrid.Select(myRowIndex) to select the row but not any more Hope that makes sense :) If it has to be done only when you click on the DataGridView, then you can also set this property of the DataGridView: DataGridView1.SelectionMode = DataGridViewSelec ...Show All
Visual Basic Blair Allen Stark
Here is the problem I am working on. It asks me to use the method CalculateCharges, but I don't fully understand how to do this or how it works. I would be grateful for any input. Lab Problem III A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour for each hour or part thereof in excess of three hours. The maximum charge for any given 24-hour period is $10.00. Assume that no car parks for longer than 24 hours at a time. Develop a console program that calculate and displays the charges for each customer who parked a car in this garage yesterday. ...Show All
Visual Studio Formating a date parameter
Does anyone know a way to change the format for a date ("yyyy-mm-dd" to "mm-dd-yyyy") in the Parameters Value pop-up window I would really rather not build my own parameter window, but is that the only solution As far as I know, you can't change the format in the Paramaters popup window (I drove myself crazy a while back trying to do it). The only thing you can do is have your user select the date from the date picker or design your own popup and then send the parameters to the report. ...Show All
SQL Server Calendar slow to load
Is anyone else experiencing performance problems with reports that use the calendar control for date parameters Whenever we load a report that uses a calendar it takes several seconds to fully load the form (you can see something like this in the status bar:"...ReportViewerWebControl.axd OpType=Calendar..."). This is not a serious problem, but if the user tries to use the control before it fully loads then the page throws javascript errors. I am wondering if this is a issue with the report itself or the server configuration, or if it is just something we have to live with. The calen ...Show All
.NET Development Sending Windows Messages
I am playing around trying to send messages to windows (specifically close messages and specific messages to dialog boxes). I am using visual studio 2003, and am using the windows API to try to send the messages. What I have found is that FlashWindow and CloseWindow work, MoveWindow kind of works (it does respond, but does some weird things), but SendMessage and DestroyWindow do nothing. Following is the code I have been tinkering with, does anyone have any advice (eg. are there any .NET framework classes which can help me here): Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpW ...Show All
Visual Basic How to set-up relative paths in VB
Hi there, Hope this is a simple one. Its related to setting up an application and its associated support files for a ClickOnce deployment. Using the Solution Explorer I have added a folder to my project. So I have MyProject\Graphics I have then added the graphics file to this folder and set its properties to "copy always". So I have Myproject\Graphics\MyImage.jpg Then I have a included a picturebox1 on my windows form in the design view. So, I go to the properties and want to add in the relative path to MyImage.jpg. I have tried setting ImageLocation property to: /Graphics/MyImage.jpg Graphics/MyIma ...Show All
Visual C# Monitoring a DB Table!
Hi, It would be great if someone can provide me a better solution to this problem. I need to constantly monitor a sql table. If any new records are added to this table, I need to fetch the newly added records and process them. Right now I am using an infinite loop to do this in C#. Is there any other efficient way of doing this. It would be helpful if you could provide your solutions in C#. Thanks & Regards, Frenz There are a lot of ways to handle that, and they're going to fall underneath one of two approaches: Polling Triggers/Notification services You've said you don't want p ...Show All
Visual C++ Cannot read file
I'm gettting an access violation error when trying to read a file The code I'm using is: char PeopleFileName[_MAX_PATH]; char buf[256]; strcpy_s(PeopleFileName, fileName); strcpy_s(&PeopleFileName[strlen(PeopleFileName)], MAX_PATH, ".peo"); std::ifstream PeopleFile(PeopleFileName, std::ios::binary); GetStringFromFile(PeopleFile, buf); m_iRecordCount[2] = atoi(buf); m_People = new CPerson[m_iRecordCount[2]]; for (int iPerson = 0; iPerson < m_iRecordCount[2]; ++iPerson) { CPerson pPerson = m_People[iPerson]; GetStringFromFile(PeopleFile, buf); pPerson.SetName(buf); GetStringFromFile(PeopleFile, buf); pPerson.SetSe ...Show All
SQL Server Still need LOB at the end of a dataset?
Do we still need to keep LOB columns (varchar(MAX), etc) as the last columns of a SELECT statement Anybody know for sure if that MDAC limitation/bug is fixed with SNAC ...Show All
.NET Development WebBrowser control connects but httpRequest does not! Why is it different?
Using VB.Net I have a form, user, password, url. A multiline tex box to show html source, a web browser control to show html ( mainly to prove connection is possible.) I try to requst a page from my webserver which has basic authentication set, user Test, pwd Test. The webserver is onboard a network input output module When the browser connects a dialog pops up. i enter the credentials and click ok. The web server sends the correct page. When using the request method i get disconnected during the GetResponse. What is the web browser control doing that i am not Code included: If the webbrowser can do it then surel ...Show All
Visual Studio 2008 (Pre-release) RichTextBox How To!
Hi, I have searched the net and the documentation that shipped with Beta 2 and have not found any results or information that was able to aid me. Hopefully there are some RichTextBox experts that could please help me with the following things: How can I make the RichTextBox single line (this was possible in Win32, and no, changing the control template to a textbox does not work! Because then it essentially is a textbox!) Why is it so difficult to control drag/drop operations in both the textbox and RichTextBox I would like to control over what is dropped onto the textbox, for instance if images is d ...Show All
Windows Forms Integrated Database
Hi. I have some experience with windows forms, ASP.NET, MS SQL Server and GDI+ programming. I am familiar with retrieving and inserting data into a database. However most of my development up until now has been web based. That means I could just use one SQL server. Now I am contemplating a new project that would be a windows form&n ...Show All
Visual Studio Express Editions Copy/Paste bug?
A simple problem that is causing great frustration: sometimes when I copy or cut (usually cut) a line of code, what will instead end up on the clipboard is a single line break. When I go to paste, instead of the code I expected I will get a blank line and have to hit undo until I can try the operation again. It doesn't happen all the time, but certainly enough to be a major problem. Couldn't find this on a search, so presumably it's not a widespread problem. Is there anything I can do Visual Studio has a feature that places a linebreak in the clipboard when you're copying (also applied for cut) without an ...Show All
Visual Studio regarding reports
Im using reportviewer control on the form and Project>Add New Item>report for creating reports Are these not Crystal reports Where are crystal reports located in vs.net2005 IDE I am new at this so my ability to help is limited. To create a CR report, go to your Solution explorer, right click on progject name, choose Add and then New Item. Click on Crystal Report. To add a CR viewer, go to your tool box. I found CR stuff at the bottom of my list. Online Help had some decent instructions and tutorials. I hope this isn't to late and it helps. ...Show All
