Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

peterdrozd

@peterdrozd
About
Posts
10
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • HELP - WPF and find control under mouse and Send Click
    P peterdrozd

    I am trying to code the following with little luck. has anyone a solution to this problem? Does anyone have any source for this? it can not be done with pinvoke and user32 calls. it will not work. I need to find the control under the mouse in the VIEW and I have force a Mouse Click on it. I need to do it from the ModelView. So in the MainViewModel I have an interface to a hardware device. when the device moves the mouse virtually it moves on the screen. So I am able to move the mouse via the device. 1) find window control in the view from mouse position and in ViewModel 2) Send the click to it. The control may be a Button but maybe something else. Does this violate the MVVM Pattern? Thanks

    ------------- Thanks - Pete

    The Lounge wpf help csharp hardware regex

  • Need some Simple Code
    P peterdrozd

    Hi; I have been wrestling with microsoft's changing standards and technologies like many of us. with that I was really not prepaired when silverlight 3/4 came out and WPF. I'm a winforms guy. So I have been looking for an example of a project that will show me how to use an MVVM pattern with WPF with an Icommand in it. That may seem trivial to most here. but I just have allot of problems with the databinding concepts and the viewmodels. I would like to create a control that I can host in a window that is XAML and have that control connected to a viewmodel and use ICommand for the clicks and such. Everyone adds their own classes and it seems to clutter up the core concept for a rookie. I would like to use a WCF service to fill the UI with data and back and forth. Can someone furnish me with some info on this. this may need a couple of tutorials or just one good one to get me off to the races. I want to use the ICommand so that I will be able to use some of that MVVMness with Silverlight 4. I thank you in advance for your help. Blessings and regards -Peter ;)

    WPF csharp wpf tutorial asp-net winforms

  • Newbie ASP.NET Question
    P peterdrozd

    Thanks! I did a basic project with a webservice and a default page project. My web page just displays the results from the webservice. So I get Webservice1.dll and WebApplication1.DLL So I upload them to the bin dir, then what do I do? Do I need the Service1.asmx files and the Default.aspx files as well, and do I have to keep them in the right directories? Each project under the solution has a webconfig.xml file. So I am confused as to what do do with that in terms of uploading. thanks -peter

    ASP.NET visual-studio question csharp asp-net hosting

  • Newbie ASP.NET Question
    P peterdrozd

    Hello; I am trying to come up to speed and learn ASP.NET. I am doing pretty good. However, I have a shared hosted site that supports ASP.NET 3.5 IIS7 How do my applications run on this shared environment? Does anyone know the basics to that? Do I need to change my webconfig.xml file to allow debugging there. again, I am new to this all and used to code standard ASP. In the VS 2008 IDE I can debug nicely and checkout my web service and all that fine. However How would I run a compiled DLL on my shared hosting account? I know these are dumb questions but I went through several books and none cover this. Maybe ASP.NET will only work on machines that I am physically hosting? I mean, the goal is to create reusable DLLs that I can use in the site do do the work. Thanks everyone in advance for your patience and not throwing stones, LOL :omg: -pete

    ASP.NET visual-studio question csharp asp-net hosting

  • MessageBox with custom background color
    P peterdrozd

    This is a great Article - Thanks! I could not figure out how to change the background color though. I did not see anything in the code of the project that allowed you to do that. -Pete

    .NET (Core and Framework) csharp question c++ business

  • MessageBox with custom background color
    P peterdrozd

    I have researched adding a MessageBox to an application. However the sealed class does not give you much. The solution is always to create your own. I figure you could use the Win32 Version and import it into C#. but that does not take care of the background color. in MFC you call setdlgBackColor or something like that and the entire application is converted to the new color (skin). in C# you do not have that. is this exposed in VB.NET? I was thinking I could link in a VB.NET DLL with the functionality. still there are several dialogs in windows that act this way. one of them is the fileopen dialog. does anyone have an elegant solution that does not involve recoding the entire functionality, LOL, of the dialog / MessageBox in question? there are many people on the web running into this problem, especially if they are skinning their apps or providing custom colors for customer requirements. Thanks -Pete

    .NET (Core and Framework) csharp question c++ business

  • Reference Casting question.
    P peterdrozd

    fixed it. I had to remove all references for that data. The problem was that I have some arguments that have to be passed as references. I have others that have to be passed as value types. the _Event is a value type. I was passing it in as a reference so in that function, I was referencing the pointer I think. So it would compile but the value was probably greater than max value. I guess this all came about because I have become accustomed to coding inline classes and not removing the class definition from the implementation. there are not too many good examples online that I found on how to do it right. thanks everyone for your help. -Peter :cool:

    Managed C++/CLI question csharp

  • Reference Casting question.
    P peterdrozd

    here is part of the header file.

    public ref class DataEvent16
    {
    private:
    System::UInt16 ^ _Event;

    public:
        DataEvent16(System::UInt16 ^ Event);
        DataEvent16();
        property System::UInt16 RawData
        {
            System::UInt16 get();
            void set ( System::UInt16 value);
        }
        property System::UInt16 IsSet
        {
            System::UInt16  get();
        }
        property System::Boolean IsActive
        {
            System::Boolean get();
        }
    

    };

    Implementation file

    DataEvent16::vDataEvent16(System::UInt16 ^ Event)
    {
    _Event = Event;
    }
    DataEvent16::vDataEvent16()
    {
    _Event = gcnew System::UInt16(0);
    }
    System::Boolean vDataEvent16::IsActive::get()
    {
    System::Boolean data = (System::Boolean)(((* _Event) & 0x02) != 0);
    return data;
    }

    this will compile but explode. on the boolean statement. I know it seems like overkill but I have tried several iterations. :)

    Managed C++/CLI question csharp

  • Reference Casting question.
    P peterdrozd

    I tried it and it does not work. It may be that I separated the class to a header file from the implemenation.

    System::Boolean DataEvent16::IsActive::get()
    {
    System::Boolean data = (System::Boolean)(((* _Event) & 0x02) != 0); <--fails here.
    return data;
    }

    header file
    property System::Boolean IsActive
    {
    System::Boolean get();
    }

    this still fails. I am trying to get bits from an unsigned short and pass back to C# the value of the bits. I tried a union with a structure to define the bits and tried to set a variable that had all the bits as a System::UInt16 but it would not let me assign the * (System::Uint16 ^ ) to the unmanaged data type so I had to switch gears and try this method. doing a return when the class is implemented inline works fine however I can not use the class in another CPP file as a class variable because I could not make one class aware of the other with out a header. so I separated them. this led to problems with visual studio 2005 C++ CLI This should be a simple item but it's starting to take up so much time. :sigh: thanks -- Pete :)

    modified on Thursday, September 11, 2008 11:34 AM

    Managed C++/CLI question csharp

  • Reference Casting question.
    P peterdrozd

    Hello I am having real trouble with the following code.

    System::Boolean vDataEvent16::IsSet::get()
    {
    System::Boolean data = (System::Boolean)(((* _Event) & 0x01) != false);
    return data;
    }

    I get an invalid cast exception. How would I overcome this? :omg: _Event is defined as a System::UInt16 ^ _Event and is passed in from C# assembly to the class constructor. I wanted to use unions with some structs to view bits in the struct as individual properties but I could not cast the System::UInt16 to an unsigned short or rather to an unmanaged value type either. Any suggesions Really appreciate the response. thanks -Peter

    Managed C++/CLI question csharp
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups