Search Results

Search found 2 results on 1 pages for 'masterfu'.

Page 1/1 | 1 

  • How to keep relative position of WPF elements on background image

    - by Masterfu
    Hi folks, I am new to WPF, so the answer to the following question might be obvious, however it isn't to me. I need to display an image where users can set markers on (As an example: You might want to mark a person's face on a photograph with a rectangle), however the markers need to keep their relative position when scaling the image. Currently I am doing this by using a Canvas and setting an ImageBrush as Background. This displays the image and I can add elements like a Label (as replacement for a rectangle) on top of the image. But when I set a label like this, it's position is absolute and so when the underlying picture is scaled (because the user drags the window larger) the Label stays at it's absolute position (say, 100,100) instead of moving to the new position that keeps it "in sync" with the underlying image. To cut the matter short: When I set a marker on a person's eye, it shouldn't be on the person's ear after scaling the window. Any suggestions on how to do that in WPF? Maybe Canvas is the wrong approach in the first place? I could keep a collection of markers in code and recalculate their position every time the window gets resized, but I hope there is a way to let WPF do that work for me :-) I am interested in hearing your opinions on this. Thanks

    Read the article

  • How to access SQL CE 3.5 from VB6

    - by Masterfu
    We have a .NET 3.5 SP1 application written in C# that stores data in an SQL CE 3.5 Database. We also need to access (read only) this very data from a legacy VB6 application. I don't know if this is at all possible. There are several approaches to this problem that I can think of. 1) I have read about ADOCE Connections, but this seems to be an option for embedded Visual Basic only 2) I can't seem to get a connection working using ADODB.Connection Objects like so Dim MyConnObj As New ADODB.Connection ' Microsoft.SQLSERVER.CE.OLEDB.3.5 ' Microsoft.SQLSERVER.MOBILE.OLEDB.3.0 MyConnObj.ConnectionString = "Provider=SQLOLEDB;Data Source=c:\test.sdf" MyConnObj.Open Maybe this is just a bad choice of providers? I also tried the providers that appear as comments above and different connection strings, but to no avail. Both providers are not installed on my dev machine and won't be installed on my customer's machine. 3) Maybe there is a way to use a more generic approach like ODBC? But I believe this would result in setup / deployment work, right? Does anyone have any experience with this scenario? As you can see, I am really looking for some good starting points. I also accept answers like "This is drop dead simple and so are you" as long as they come with some guiding directions ;-)

    Read the article

1