cunyalen's Q&A profile
Visual C# About properties
Can someone please explain to me in plain english what the following code is saying public string Result { get { if (_userAnswer == _correctAnswer) { return "Correct"; } else { return "Incorrect"; } } } thanks oh, IS dude It seems to be quite nature for you to regard properties as "strange" attributes, while actully they are special method called accessors , which provide a flexible mechanism to read, write, or compute the values of private fields. BR ...Show All
.NET Development WSE and MS office client
Can any one tell me what would be the impact of implementing WSE security enhancements on a webservice being consumed by office tools I have a basic webservice application exposing business functionality and its client is MS Excel using SOAP toolkit. I need to secure my webservice so i am thinking of using WSE on the webservice. Anybody knows what could be the impact on my excel client for using these enhancements Would it work seemlessely Also, Does anyone knows how to consume a webservice having custom SOAP header defined on webmethod in Excel client I want to pass some information to a webmethod in its header but i am not sure if soap header would be recognized in Excel client to pass that information. any sample or link to sa ...Show All
SQL Server Summary of data by business week
I have a large query that returns a list of records that are marked by day of the business week (Monday, Tuesday, Wed, etc). I am running into a challenge where I need to provide summaries of data from those days. For example, it needs to look like this: Date | Day of Week | Total Widgets | 09/01/06 | M | 4 09/02/06 | Tu | 5 09/03/06 | We | 6 09/04/06 | Th | 7 09/05/06 | Fri | 8 Total Widgets: 30 09/08/06 | M | 1 09/09/06 | Tu | 2 09/10/06 | We | 3 09/11/06 | Th | 4 09/12/06 | Fri | 5 Total Widgets: 15 I'm using Reporting Services to format and display the report. I've got the group by working for the entire data set, but I need to separate it by these sections. Any assisntance is appreciated. You mean want t ...Show All
Windows Forms Context Menu Strip
Hey, by the way my richtextbox is set up I can not set the contextmenustrip I want to use diectly on the control. I have to use the Form1_MouseClick event. So how would I make it so that it only does somthing if the mouse left button is pressed I tryed: private void Form1_MouseClick( object sender, MouseEventArgs e) { if ( MouseButtons .Left) { } } but that does not work... Thanks :) well I want it to apply to all of the textboxes due to the way it si cunstructed...so here is what I did(the load event gave me a runtime error): that is what Id id now, but still(becuase the timer is always actiavted and set to 1) I get a runtime error int he refactor of GetCurrentTextbox(): here is the hi ...Show All
Visual Studio Express Editions Load image in picturebox
i am trying to make one project in Vb to maint employee records with their photos so i have made that table in database with the column for photo as image file but now after i run the program and load the image the image comes , alright but after a few seconds the program gives me a error that "external exception was unhandled" ; genericerror code in GDI+ please guide me how to get the solution for this. the codes i have used is as follows.... Private Sub PictureBox1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click Dim myStream As IO.Stream = Nothing Dim openFileDialog1 As New OpenFileDialog() openFileDialog1.InitialDirectory = "c:\&quo ...Show All
Windows Forms Datagrid Cell Keypress
VS 2005 windows unbound datagridview I want to ensure that only numeric values are entered into a datagridview cell. Is there anywhere to put a keypress event in a cell Buster95 wrote: BTW, can someone explain how to post code on this Forum in boxes so that it comes out nice and neat. Thanks. This post describes some of what you are looking for How to Format Code for a Post . ...Show All
Windows Forms How to implement copy/paste/cut/undo/redo commands in C#?
The above code looks like it will handle TextBoxes and ComboBoxes, which is great, but anyone got any code to handle columns within a DataGridView Hi,Chris Gin What kind of work do you want to do whiling handling columns within a DGV And, I recommend you to start a new thread to ask your question. Best Regards. Ye ...Show All
SharePoint Products and Technologies Accessing a SQL Server table using sql authentication as opposed to windows authentication
I have created a pivot table based on a sql server 2005 relational DB connection, with the userid and password stored in the ODC (sql server authentication). The ODC is in the data connection library (DCL) and is approved. I created an Excel sheet with a pivot table based on the ODC. I can refresh this pivot table in Excel 2005, and I have deployed the sheet to the documents library. When accessing the sheet via Excel Services Web access, it displays properly, but refuses to refresh, errorring with : "Unable to retrieve external data for the following connections: xxxxx The data sources may be unreachable, may not be responding, or may have denied you access. Verify that data refresh is enabled for the trusted file location and ...Show All
Software Development for Windows Vista There will pop-up a "UAC" dialog when my program run.
Hello everyone I have a program. It will connect internet . There always pop-up a "UAC" dialog when my program run. It tip " A unidefentified program wants access to you compater " now ,I want remove this dialog when my program run What can i do my program is build by VC6, and it must be work well in other Operate System. Please help me . thanks. Hi, I have try this with VC6,, but no pop up message shown.. Any possible way to get administrator privilege for oly one time request for user.. next timer system restart and application restart.. no need to prompt to user for permission... Thanks ...Show All
Visual Studio 2008 (Pre-release) orcas alpha
maybe it is not 100% linq related (I personaly think that it is ;p) on friday first public alpha of vs orcas has been relased (or is it vs2k5 on net4 steroids ) http://www.microsoft.com/downloads/details.aspx FamilyID=82243606-d16d-445c-8949-9ee8c10cda2e&DisplayLang=en aviable as vpc image. some info @ dowload page The Orcas CTP's are released with only the features that have migrated into the main source tree after having passed all their quality gates. So, unlike the LINQ specific preview, you'll only see LINQ features trickling in to the official Orcas CTP's bit by bit. We do plan to have most of what available in May's LINQ preview in the first beta, refined of course, and much more s ...Show All
SQL Server Preview has data but no columns returned
In my SSIS package, I connect to an external SQL server database. This external database supports a stored procedure that I need to execute to "retrieve data". So in my package, I set the DataAccess Mode property of my OLEDB datasource to "SQL Command" and I provide the command EXEC <proc_name> <Param>,<output_param>. (The proc has an output parameter). The preview shows all the columns and data, but somehow no columns are returned....so when I try to link this data source to a copy column task, I get an error saying the source does not have any columns...any idea why this could be happening. Thanks - Manmeet Unfortunately that didnt work too...this is what I did...I now have this variable that st ...Show All
.NET Development Thread Memory consumption
It seems that starting a managed Thread in .net 2.0 allocates 1MB of memory. I created a quick and dirty sample to reproduce this behaviour, it creates 100 threads and each thread sleeps for 10 seconds. Memory usage (while all threads are live), 100MB when compiled with the c++/cli or c# .net 2.0 compiler. Same code ported and compiled with VS.NET 2003 allocates just 3 MB. It has to be that I'm doing something wrong, can anybody put some light on this Srdjan // -------------100MB, cli/c++ .net 2.0 using namespace System; using namespace System::Threading; using namespace System::Diagnostics; ref class Work { public: static void DoWork() { ...Show All
Visual C++ Problem with GetSaveFileName(&ofn)
GetOpenFileName(&ofn) works great, but no matter what i try to save the file as with GetSaveFileName(&ofn), it takes the name CB. When i run it with the debugger, right before ofn.lpstrFile is used as a parameter in my file out function, it is supposedly the correct file path. Try one more adjustment – the ' & ' character before ofn : void InitOfnStruct(OPENFILENAME & ofn, . . . .) I hope it works now. ...Show All
Visual C# Shutdown.exe problems
Process shutdown = new Process(); shutdown.StartInfo.FileName = "C:/WINDOWS/System32/Shutdown.exe"; shutdown.StartInfo.Arguments = "-s -f -t 20 -m \\deruu"; shutdown.Start(); I can get it to log me out using argument -l only, but with that I only get a "Frozen" cmd window titled "Shutdown.exe" and nothing happens. Damn, I suspected it had something to do with that but figured C# would ignore it if it wasn't followed something valid. Thanks for the help edit: oh yeah, On my list over connected computers they appear like this: MSHOME/DERUU, How can I get rid of "MSHOME/" editagain: nevermind, problem solved. ...Show All
Visual Studio Use sums of Subreports in the parent table?
Is it possible to use the data in a Subreport, like making calculations to be displayed in its parent table ...Show All
