DDE in VB.NET


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 14 of 14

Thread: DDE in VB.NET

  1. #1
    John Proffitt Guest

    DDE in VB.NET


    Once upon a time, when I wanted to learn how to write a MDI program in VB6,
    I undertook to adapt and improve the MDINote sample code that shipped with
    VB. Now that I'm trying to learn .NET I thought, what better way to start
    than to port this simple text editor?

    The point of the exercise is more to teach myself .NET than to create a
    usable editor. I strained the VB6 project through the .NET upgrade wizard
    to see what that would do. Simultaneously I started coding in VS7. I like
    my version a lot better than the wizard's, but there have been times when
    the wizard code pointed me in the right direction.

    There are also times, like right now, when the wizard threw me a bum steer.
    One feature that was easy to implement in VB6 is a DDE server that responds
    to messages from the OS when somebody double-clicks a file with TXT extension.
    The wizard faithfully replicated this code in its output, but there is a
    little note which says, "UPGRADE_WARNING: Form Event MDIForm.LinkExecute
    was not upgraded." The help file says there is no support for DDE in .NET.
    DDE is deprecated as "early technology". I suppose that's why every Microsoft
    operating system, every Office application, Internet Explorer, etc. all use
    DDE.

    But I digress. I can surely kluge up some kind of DDE class... eventually.
    It would probably be better than the VB6 approach which relies on an interface
    element (form or control - which means you have to have a window), when all
    you really need is a callback function. This seems like such a common problem,
    and I have no desire to reinvent the wheel. Do you guys know of any freely
    available DDE sample code for .NET?

  2. #2
    Phil Weber Guest

    Re: DDE in VB.NET

    > Do you guys know of any freely available DDE sample
    > code for .NET?


    John: Found the following by searching for "vb.net dde" at
    http://groups.google.com: http://www.ozemail.com.au/~markhurd/vbnetdde.zip
    ---
    Phil Weber



  3. #3
    John Proffitt Guest

    Re: DDE in VB.NET


    Thanks, Phil.

    This would appear to be exactly the sort of thing I was seeking. Should
    be both a timesaver and an inspiration.

    Thanks also for groups.google.com - I did a google.com search before I posted
    my message, but came up empty. I'll have to find out what 'groups' has to
    offer.

    JBP


    "Phil Weber" <pweber@nospam.fawcette.com> wrote:
    >John: Found the following by searching for "vb.net dde" at
    >http://groups.google.com: http://www.ozemail.com.au/~markhurd/vbnetdde.zip
    >---
    >Phil Weber
    >
    >



  4. #4
    MMFAN Guest

    Re: DDE in VB.NET


    It's better than nothing but still a hack. I didn't think you needed to Hack
    in .Net?


    "Phil Weber" <pweber@nospam.fawcette.com> wrote:
    > > Do you guys know of any freely available DDE sample
    > > code for .NET?

    >
    >John: Found the following by searching for "vb.net dde" at
    >http://groups.google.com: http://www.ozemail.com.au/~markhurd/vbnetdde.zip
    >---
    >Phil Weber
    >
    >



  5. #5
    MMFAN Guest

    Re: DDE in VB.NET


    Phil,

    I was told this by MS at a presentation in Bloomington MN a long time ago
    just before they handed out a .Net Beta to all attendees. I can't remember
    the actual quote, but it was something like "the playing field is equal for
    VB now. You no longer have to code the hacks that were needed in the past
    to do things only C++ could do" Sounded great at the time!

    Do you ever sleep

    "Phil Weber" <pweber@nospam.fawcette.com> wrote:
    > > I didn't think you needed to hack in .NET?

    >
    >MMFAN: Who told you that?
    >---
    >Phil Weber
    >
    >



  6. #6
    Phil Weber Guest

    Re: DDE in VB.NET

    > I didn't think you needed to hack in .NET?

    MMFAN: Who told you that?
    ---
    Phil Weber



  7. #7
    MMFAN Guest

    Re: DDE in VB.NET


    LOL, I suppose that's true. You can include Java in that list too.

    Have a good vacation, you've earned every second of it. DevX is an outstanding
    website.

    "Phil Weber" <pweber@nospam.fawcette.com> wrote:
    > > It was something like, "the playing field is equal for VB now.
    > > You no longer have to code the hacks that were needed in the
    > > past to do things only C++ could do."

    >
    >MMFAN: Well, that is true: It's not any more difficult to do, say, serial
    >communications or DDE in VB.NET than it is in C++ or C#. ;-)
    >
    > > Do you ever sleep

    >
    >Not much, unfortunately. But I'm on vacation next week, and plan to catch

    up
    >on my sleep!
    >---
    >Phil Weber
    >
    >



  8. #8
    Phil Weber Guest

    Re: DDE in VB.NET

    > It was something like, "the playing field is equal for VB now.
    > You no longer have to code the hacks that were needed in the
    > past to do things only C++ could do."


    MMFAN: Well, that is true: It's not any more difficult to do, say, serial
    communications or DDE in VB.NET than it is in C++ or C#. ;-)

    > Do you ever sleep


    Not much, unfortunately. But I'm on vacation next week, and plan to catch up
    on my sleep!
    ---
    Phil Weber



  9. #9
    John Proffitt Guest

    Re: DDE in VB.NET


    Dear FAN,

    Actually I was fascinated by some of the low level stuff that would be
    hard or impossible to do in VB6, such as a union to retrieve HIWORD/LOWORD
    from a DWORD. I'm still low on the learning curve for .NET (Didn't start
    until after version 1.0 showed up in MSDN.), so would have had no idea how
    to set up those marshalling attributes.

    I expect I'll probably roll my own using DDEML.

    JBP

    "MMFAN" <mmf@mmf.com> wrote:
    >
    >It's better than nothing but still a hack. I didn't think you needed to

    Hack
    >in .Net?
    >
    >



  10. #10
    Phil Weber Guest

    Re: DDE in VB.NET

    > Have a good vacation, you've earned every second of it.
    > DevX is an outstanding website.


    Uh, thanks, but I don't work for DevX. ;-) Take a look at fawcette.com if
    you'd like to see my handiwork.
    ---
    Phil Weber



  11. #11
    Mike Mitchell Guest

    Re: DDE in VB.NET

    On Wed, 14 Aug 2002 20:34:30 -0700, "Phil Weber"
    <pweber@nospam.fawcette.com> wrote:

    >Not much, unfortunately. But I'm on vacation next week, and plan to catch up
    >on my sleep!


    Don't make the mistake of sleeping too much throughout the day! This
    is known now to increase the risk of heart attacks. Have a brief
    snooze after lunch by all means, but don't overdo it! Try grabbing a
    copy of Michael Moore's Stupid White Men for a rollicking view of life
    in the US!

    MM

  12. #12
    MMFAN Guest

    Re: DDE in VB.NET


    Oh well in that case, DevX sucks For some reason I just associated DevX
    with Fawcette.

    "Phil Weber" <pweber@nospam.fawcette.com> wrote:
    > > Have a good vacation, you've earned every second of it.
    > > DevX is an outstanding website.

    >
    >Uh, thanks, but I don't work for DevX. ;-) Take a look at fawcette.com if
    >you'd like to see my handiwork.
    >---
    >Phil Weber
    >
    >



  13. #13
    Kunle Odutola Guest

    Re: DDE in VB.NET


    "MMFAN" <mmf@mmf.org> wrote in message news:3d5b1cda$1@10.1.10.29...
    >
    > LOL, I suppose that's true. You can include Java in that list too.


    No you can't. There's a couple of extra hoops to clear first. But it's not
    that far off...

    Kunle



  14. #14
    Mark Hurd Guest

    Re: DDE in VB.NET

    (Belated thanks to Phil Weber for pointing out my sample code.)

    "John Proffitt" <bogan16@mchsi.com> wrote in message
    news:3d5b27a8$1@10.1.10.29...
    >
    > Dear FAN,
    >
    > Actually I was fascinated by some of the low level stuff that would be
    > hard or impossible to do in VB6, such as a union to retrieve HIWORD/LOWORD


    I was quite pleased with the Structures. (People who have downloaded my code
    have reworked the DDE protocol algorithms into their -- probably better --
    OOD, but many have kept my Structures.)

    On Google you'll find my posts in microsoft.public.dotnet.* newsgroups
    confirming the "safety" of using the union-like layout first highlighted by
    Bill McCarthy.

    > from a DWORD. I'm still low on the learning curve for .NET (Didn't start
    > until after version 1.0 showed up in MSDN.), so would have had no idea how
    > to set up those marshalling attributes.
    >
    > I expect I'll probably roll my own using DDEML.


    A lot of people have said that, but noone's shown a public sample...

    >
    > JBP
    >
    > "MMFAN" <mmf@mmf.com> wrote:
    > >
    > >It's better than nothing but still a hack. I didn't think you needed to

    > Hack
    > >in .Net?


    Actually, in John's original post he mentions he's intending to support
    DDEExecute and my code covers that pretty completely.

    (And I shouldn't feed trolls, but what of my sample is a hack? The union-like
    stuff mentioned above is a bit of a hack when doing it for the HIWORD/LOWORD
    split, but I supply a more framework friendly way to do that.)

    Regards,
    Mark Hurd, B.Sc.(Ma.) (Hons.)



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center