Z.Y.S.'s Q&A profile
Visual Studio 2008 (Pre-release) Absolute path in XAML... how to avoid them?
In an application I create a Xaml file and some referenced local _files_ (images, etc.) in the same folder of the xaml file. The xaml and the other files are dynamically created/read/ written , so they can't be in the program files folder and must be somewhere under the user Documents folder. The problem is that the user could move those files into another PC/folder and the referenced path inside the xaml would be wrong. Hypothesis and problems I found: 1. specifying relative path in the XAML tags (i.e. Image). As far as I can see, relative names are used to look into the resources and not in the file system. Furthermore, once xaml is loaded, there is noway to keep memory about the folder from which it was loaded (and that's corre ...Show All
Visual Studio 2008 (Pre-release) feature requests for WPF v2
Here is my personal list of feaures I would like to see in v2 of WPF, what do you think I'd suggest you post suggestions in the WPF feedback center on Microsoft Connect ( https://connect.microsoft.com/site/sitehome.aspx SiteID=212 ) ...Show All
Visual Studio 2008 (Pre-release) XAML produces a stack overflow
The following XAML snippet produces a stack overflow when you select the combo box item in the menu. XAMLPad crashes pretty badly. I am using the latest CTP <Page xmlns=" http://schemas.microsoft.com/winfx/2006/xaml/presentation " xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml " > <Grid> <Grid.Resources> <ControlTemplate TargetType="{x:Type HeaderedContentControl}" x:Key="a1"> <Menu > <MenuItem Header="{TemplateBinding Header}" > <ContentPresenter/> </MenuItem> </Menu> </ControlTemplate> <ControlTemplate TargetType="{x:Type GroupBox}" x:Key="a2" ...Show All
.NET Development What is the List<OdbcParameter>.Enumerator?
I'm having diffuculty with a memory leak that appears to be related to the System.Data.Odbc class. When the OdbcCommand class is disposed the List<OdbcParameter>.Enumerator classes are not being disposed. Using a memory profiler I can see undisposed instances of them continuing to increase through all the garbage collection cycles. Does anyone know how to get these to release with the other OdbcCommand resources What is the List<OdbcParameter>.Enumerator I'm using .NET 2.0 to connect to a MaxDB database and call a stored procedure via the ODBC data provider (System.Data.Odbc). Here is a piece of example code: OdbcConnection dbConn = new OdbcConnection(connStr); dbConn.Open(); for(int i=1001; i<2001; i++) { ...Show All
Smart Device Development Libraries for Win Mobile
Hi there. I've had some trouble with an application I'm working on. Hope you can help. See I'm using a library that uses sys/types.h library among others. Getting a missing library error I look for it and found it under vc/include but when I add the path to the additional include paths the following errors pop: Error C2084: function 'errno_t wmemcpy_s(wchar_t *,rsize_t,const wchar_t *,rsize_t)' already has a body altcecrt.h 375 Error C2084: function 'errno_t wmemmove_s(wchar_t *,rsize_t,const wchar_t *,rsize_t)' already has a body altcecrt.h 380 Error C2065: '_ALLOCA_S_MARKER_SIZE' : undeclared identifier malloc.h 194 Error C2664: 'wcsftime' : cannot convert parameter 3 from 'const char *' to 'const wchar_t *' atltime.h 402 Error C2 ...Show All
Visual Studio Express Editions Look-up table :-
I need to do manipulation with my incoming data fr serial port n need to have a look-up table for this purpose, starting from 0.0dB and 30H data. For every increment of hex value, the level increases by 0.5dB. My data in hex format, i need to convert it to dB value based on the look-up table. How can this be done Disclaimer: I am no good at math and can't handle 'log' functions in math. Anyway the math in the following may be all wrong but maybe it will give you something to work with. Public Class Form1 Dim ht As New Hashtable Private Sub Form1_Load( ByVal sender As Object , ByVal e As System.EventArgs) Handles Me .Load ' Build a hashtable Dim dbtot A ...Show All
Smart Device Development batch file support
Hi, We are are using sql server mobile as database for our application. We need to install sql server mobile in the device. To do that we need to copy 3 files to the device as shown below( both for pocket pc and smart phone device) and the through the file explorer click on all the files sqlce30.dev.ENU.ppc.wce5.armv4i.CAB sqlce30.ppc.wce5.armv4i.CAB sqlce30.repl.ppc.wce5.armv4i.CAB (for Pocket PC) or sqlce30.dev.ENU.phone.wce5.armv4i.CAB sqlce30.phone.wce5.armv4i.CAB sqlce30.repl.phone.wce5.armv4i.CAB .Can we write a cab file which will run or install the contents with a single click.Is the batch file concept supported in windows mobile Thank's & Regard's Prathap.K.H Hi Check the Channel 9 Wiki art ...Show All
Visual Studio Express Editions Database Storage
Hi All, my final year project involves storing patients' info like name, age, size and DOB, Plus a bitmap image which are entered by the user (dentist) on the VB form. Pls advice how should go about doing this task Thanks in advance. Cheers Hi, if you need an advice, how to store Images in a Database, this should do it: Dim QuerySQL as String Dim cnSQL as new SQLClient.SQLConnection(HereGoesYourConnectionStringToTheDatabase) Dim bImage() As Byte Dim f As New IO.FileInfo(File) Dim fs As IO.FileStream ReDim bImage(f.Length - 1) fs = f.OpenRead fs.Read(bImage, 0, f.Length) fs.Close() QuerySQL = "INSERT INTO YourTable (Image) VALUES (@Image)" Dim comSQL As New SqlClient.SqlCommand(Query ...Show All
Visual Studio Team System FXCop looks for references.. Why..???
Hi, We are trying to run fxcop on our application, but then it asks for all the references used by that dll throwing the CA0058 error. Why is this so. Aren't we supposed to be doing static analysis of the code that we wrote Then why the need to check all the references. I understand I can fix this issue by pointing to all references, but I still would like to know y its needed Thanks for your assistance, Regards, Ramya You are right, we only analyze the code that you wrote, however, we still need to know about base classes, attributes, parameters, return types, etc that live in other assemblies. Without this information, we couldn't make security judgements (as base class' could be applied ...Show All
SQL Server ALTER DATABASE MODIFY NAME but
Leave the file location/directory the heck alone! How do I do this Just issuing: ALTER DATABASE Old_Name MODIFY NAME = New_Name moves the mdf and ldf files to a new, unwanted location (apparently the SQL Server default as it's under program files) with the new name. Is this possible or do I have to issue the additional ALTER DATABASE MODIFY FILE statements for this modify name does not move the file(s). create database [test] on(name=test,filename='c:\test.mdf') log on(name=test_log,filename='c:\test.ldf') go alter database [test] modify name=newtest go select * from [newtest]..sysfiles go drop database [newtest] go ==result== 1 test c:\test.mdf 2 test_log c:\test.ldf ...Show All
Software Development for Windows Vista Interacting with different users based on roles
Hello, I've designed a document validation workflow but still with no roles on it, so anyone can introduce a document and anyone can validate it. I've been searching info about roles and what I've seen is that you can say which roles can or cannot do an activity. But my application is a bit different: There are 4 different roles (ranks of the employees). Role 5 (the less "important") can post a document, that same user can modify it as many times as he wants and then send it to validate, and it has to be shown in the list of pending documents of role 4. But role 4 can as well post a document that has to be validated by role 3, and role 3 need validation from role 2 etc. I suppose there has to be a way of designing a sing ...Show All
Visual Studio Using ReportViewer Control into a WSS Web Part
Hi all, I already posted this thread in the WSS.Dev newsgroup but I got no answer. So I'm trying here. I would like to have the ControlViewer control loaded in a web part but I keep having an error when the Web Part is loading. I tried with other 2.0 controls and it worked properly I just can't make it work with the ControlViewer. I have removed all custom code in the web part. The Web Part only contains the ReportViewer Control and that doesn't work. The error iccurs on the PreRender event but I couldn't find why. The only settings I set for theControlViewr is the following line in the Web config of the WSS site: <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebF ...Show All
Visual C# Display 2 different tables in 1 datagridview
Hello. I have not worked with datagrid earlier and I have to just list two tables in the same datagridview but not at the same time. i want to show "Order" table at load, but when I click on the "customer" button gridview should show customer table. I need help with the code behind the button, how to switch from one order to customer showing in the same datagridview by pressing a button... Please..help did you change your code withe updated one i test it on my machine and it is working what you get when you press click i will pos it agin when loading the form dataGridView1.DataSource = northwindDataSet; dataGridView1.DataMember = "Orders&q ...Show All
.NET Development Is this only possible in XPath 2.0
I can't fugure out how to write an xpath to do the following in xpath 1.0: Doc < Plane > < Seats Number =" 1 " Window =" No "/> < Seats Number =" 2 " Window =" Yes "/> </ Plane > I would like to concatinate the @Number & @Window fields on each node set returned Desired Results: 1^NO 2^Yes The problem is if I use concat in xpath 1.0 I only get a single string result. Any ideas This is easy if the number of "Seats" elements is known (or can be obtained and then the XPath expression can be dynamically generated. In case one knows an expected maximum number of "Seats" elements, it is still ...Show All
Smart Device Development Register and unregister DLL
My C++ smartphone app automatically registers (ala regsvr on your desktop) at deployment because in the project's properties configuration page for deployment I have "Register Output" set to yes. What executible is this calling to register the dll I cannot find regsvr.exe or regsvrce.exe or wm5_regsvr.exe or any other variant on my phone. The reason I want to find it is I want to unregister the dll to clean things up (kind of like a clean deploy). I am using a Motorola Q, if it matters. Thanks, Ed I looked around the WM5 SP SDK and did not find such a tool, so you may have to write a reg/unreg tool. I routinely use the code snippets on that article to register / unregister DLLs from within an application which ...Show All
