Cem DEMiRKIR's Q&A profile
Visual Studio 2008 (Pre-release) Custom Control, Converter parameters, Trigger using parent property
Hello all I am trying to create a custom text box which uses the next template: < Style TargetType = " {x:Type local:XTextBox} " > < Setter Property = " Template " > < Setter.Value > < ControlTemplate TargetType = " {x:Type local:XTextBox} " > < Border Background = " {TemplateBinding Background} " BorderBrush = " {TemplateBinding BorderBrush} " BorderThickness = " {TemplateBinding BorderThickness} " > < TextBox x:Name = " txtVal " Background = " Beige " IsReadOnly = " True " Text = " {Binding RelativeSource={x:Static Relati ...Show All
.NET Development generic DictionaryBase
In .NET 1.1 there is the DictionaryBase to derive from for own Dictionray classes. What class would I derive from in .NET 2.0 if I where to write a custom generic Dictionary<TKey,TValue> Is there a Generic Base class that adds the basic Dictionary functionality like Dictionarybase does I have thought about this too, but most members are not virtual, hence extending the functionalitly is not possible. For example I couldn't introduce some exrta functionality whenever an item gets added to the dictionary since the Add method is not virtual and there is no protected OnInsert like in DistributedBase. So unfortunately I guess I will have to go with IDictionary<TKey,TValue> ... ...Show All
Software Development for Windows Vista Previous versions of files
I have a simple App which is using GetPrivateProfileString() to obtain several values from an .ini file located in a subfolder of now 'protected' c:\Program Files area in vista. The file exists & the particular items can be seen if the file is opened in notepad. My App works if I run it as an administrator, but If I am merely a 'standard user' the values returned are from a previous file version rather that the file that is clearly visible in the folder!!!! I have one previous file versions which shows up under under properties of the file in question. All I want is the values from the file, surely this functionality is unexpected and would point to a bug My vista (business) installation is completely text book. Anybody ...Show All
Software Development for Windows Vista How to handle instance state of old version workflow?
Hi, every one. We are trying to use state workflow to handle our sales order process. We create a new instance of the workflow for each new order as the new order is created. As order is approved/shipping/closed, workflow instance handle it’s state. This works perfect. But when user changes the workflow definition, the old instance cannot load! Firstly we consider about keeping all version of workflow class in one assembly But this will lead the workflow definition assembly growing large forever. Because usually a sales order need several month to be processed and user need change the workflow frequently. So there will be a lots of old version instance stay in our database. ...Show All
Visual Studio Express Editions 30 day Free Trial
I am adding "30 day Free Trial" code to my app. I want to write out a file to a secret location with the first run date, etc. Would C:/Windows/System be a good place to put it As an alternative, create a 'demo' version with limited or restricted functionality - they can use it as long as they like. If it is truly useful, provide a mechanism within the program for obtaining the 'full' version (with license number, user name, etc. However much information you feel will keep people 'honest'). There's o way to prevent a user taking the full version and copying it to ther machines short of web authentication (with it's obvious and annoying flaws) or a hardware key (with the added expense ...Show All
Visual C++ TerminateThread ???
In MSDN it is mentioned that TerminateThread is dangerous function and given some disadvantages of using it. So we should never use TerminateThread If so then what is the use of this function Consider a situation where I am calling a function from third party library and that function some time takes long time to return may be 5 hours or may be more than a day (I am not sure about the reason and that is not in my control). I need to implement some timeout mechanism so I called that function in a thread and waiting for 15 minutes to return it and then terminating the thread and proceeding further. The thread is just calling that function doing nothing else. So is it ok if I call TerminateThread to terminate that thread after tim ...Show All
SQL Server Running Totals
We are trying to create a report that shows a Week to Date, Month to Date, and Year to Date Week to Date Month to Date Year to Date Item Number I've tried using an if statement (if date = current week, Qty, 0) and then sum the data but I get an error message that reportitems can only be summed in the page header and footer. I've also tried running totals, but it doesn't like the iif statement. Any ideas on how to do this Nancy Nancy, Here's an example of running values with a IIF statement. I believe you can accomplish what you're trying to do the same way. RunningValue(IIf(Fields!elca_employer_number.Value<0,Fields!elca_employer_number.Value, nothing ), count ...Show All
Visual Studio Express Editions Express edition vs. "the real thing"
Hi folks, I am currently working on a program that I intend to use at our company. Since VBE is free, I thought I start with that to see if I can manage to get the job done. Now it appears that it might work, so I think about purchasing the VB Studio 2005 package (VS). I bought Evangelos Petroutsos book "Visual Basic 2005" (recommended!), and from what I can see everything applies to both the VB part of VS, and to the VBE edition. I have a few questions however, just to make sure: - can any solution written in |the Express edition be imported / opened in VS or does it need to be re-written - will an application compiled in VS run faster (more optimized code) - is there anything else different that I should know Greetings, Th ...Show All
.NET Development Usage of FxCop 1.35 for ASP.NET 2.0 Web site
Hi all, Can any body help me out in doing Code-design/review through FxCop 1.35 for a ASP.NET 2.0 website as i am not able to do them for my BAL(business access layer) classes and DAL classes coz. it does not create a .NET dll so that i can add them . Regards, sreedhar Thanks Rodrigo, Let me check my installation in detail Its VS2005 Professional Edition. Let me check something has to be enabled or not.. Regards ...Show All
.NET Development SQL2005 & VB.NET 2005
hi i have a question,i can connect to a sql server 2005 database and get results but when i want to insert records to my database,i dont get an error but it doesnt update!!! Dim conn As New OleDbConnection( "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=mylibrary;Data Source=IBRAHIM-6740DDE\SQLEXPRESS;" ) Dim ds As New DataSet Try conn.Open() Dim com As New OleDbCommand( "INSERT INTO bolumler(adi,altbolumadi,kayittarihi) VALUES ('" + TextBox2.Text + "','" + TextBox3.Text + "','" + DateTimePicker1.Text + "')" , conn) conn.Close() Catch ex As OleDbException MessageBox.Show(ex.Message) Catch j ...Show All
Visual Studio Properties Window
Is there a reason why, when you are in source mode, and you click on a control the Properties Window is not populated I am almost positive that pre SP1 this worked. Thanks, SLTDon Very helpful Thank you !! But for the <body> tag properties, why don't the "topmargin" , "bottommargin", "leftmargin" properties show up ...Show All
Visual Basic Drawing a line on an Image
Hi guys, hope you can help me out on this one :) I'm developing a small application that contains a distance measurement tool. The idea is to make it a bit like map24.com (you clik once to select a starting point, and again to select an ending point). This works fine and I can use the graphics.drawline method to draw the line. But I would like the user to see the line already after the first click (like drawing in paint). Then when you move the mouse the ending point of the line moves. If I try to do this it draws a new line every time I move the mouse because I'm creating a new instanes og the graphics on mousemove. I have trying to make one instance and use the clear method before I draw a new line, but this method requires a color an ...Show All
Visual Studio Function evaluation disabled because a previous function evaluation timed out. You must continue execution
This error happens when you sit at a check-point for around 30-40 seconds. Is there a way to disable this When I attempt to continue execution (to another break-point on the next line), it does not stop. Is this a Visual Studio setting or a runtime setting. Larry - we certainly here you. This is a pretty fundamental difference between a managed runtime, that imposes a strict API on inspection of data, and the native OS and compiler, which gives us clear information about runtime layout of objects and the ability to read arbitrary locations in memory. We've discussed this many times with our colleagues in the runtime team, but basically our hands are tied to the runtime APIs. We are hopefull that this ...Show All
SQL Server SSIS package errorcodde
I need to load all the ErrorCodes that could be generated by a running SSIS package into an error anagraph table including the code and the description of the errors. Each source record processed should be updated with the SSIS error code, if any exisits, and the error table should be used as base dictionary for all the errors. There is an easy way to do this Cosimo The way I do it is I populate the errorcode/description table everytime I receive an error. In doing so, I also look up the description with a script task. I suppose you could take the MSDN page that has all of the error codes and descriptions and use that somehow as source to populate a table, otherwise, I can't think of an easy way ...Show All
Visual C++ FindFirstFile returing wrong results
hi all , i used FindFirstFile function to search for files in folder and supplied a input as 'sea*' and though there is no file starts with sea still it is returing results as SEER_CSpringRight.xxx and SEER_ESpring_F_L.xxx .. Any help is appreciated . WIN32_FIND_DATA wfFile; HANDLE hSearch=NULL; hSearch=FindFirstFileW(L "D:\\test\\sea*" , &wfFile); AfxMessageBox(wfFile.cFileName); while (FindNextFile(hSearch,&wfFile)) { AfxMessageBox(wfFile.cFileName); } FindClose(hSearch); Results getting from above code that are not expected:SEER_CSpringRight.xxx and SEER_ESpring_F_L.xxx Addition information : in test folder othe ...Show All
