Author Topic: Showing Slides in a .NET Form  (Read 9252 times)

0 Members and 1 Guest are viewing this topic.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8796
  • AKA Daniel
Showing Slides in a .NET Form
« on: November 19, 2008, 02:21:38 AM »
Step 1, register Slide.ocx on your computer.
Step 2, in VS choose Tools->Choose Toolbox Items and select the slide control ..pic 1
Step 3, add the control to a form .. pic 2
Step 4, add code

Code: [Select]
  public partial class FormSlide : Form
  {
    public FormSlide()
    {
      InitializeComponent();
      this.axSlide1.FileName = "b2d2d.sld"; //<<----------------------
    }

    private void buttonClose_Click(object sender, EventArgs e)
    {
      this.Close();
    }
  }
Step 5, look at pic 3



It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8796
  • AKA Daniel
Re: Showing Slides in a .NET Form
« Reply #1 on: November 19, 2008, 02:34:47 AM »
Some other classes in Slide.ocx


Glenn R

  • Guest
Re: Showing Slides in a .NET Form
« Reply #2 on: November 19, 2008, 04:56:47 AM »
Nice find Daniel.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Showing Slides in a .NET Form
« Reply #3 on: November 19, 2008, 06:11:31 AM »
Thanks Daniel .. that was on my list.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

MickD

  • King Gator
  • Posts: 3651
  • (x-in)->[process]->(y-out) ... simples!
Re: Showing Slides in a .NET Form
« Reply #4 on: November 19, 2008, 03:40:15 PM »
Thanks Daniel, that was also on my list as well, will put it to good use.
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien

cadpro

  • Guest
Re: Showing Slides in a .NET Form
« Reply #5 on: January 13, 2009, 05:41:58 AM »
How do I access the width property of the slide?
Sld.Width and Sld.Height

gile

  • Gator
  • Posts: 2520
  • Marseille, France
Re: Showing Slides in a .NET Form
« Reply #6 on: January 21, 2009, 03:33:35 PM »
Hi,

Thanks Daniel, it seems to be very nice but I have some very newby's questions:
where do I find the slide.ocx file ?
how do I register it ?
have I to load and register it on each computer ?
Speaking English as a French Frog

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8796
  • AKA Daniel
Re: Showing Slides in a .NET Form
« Reply #7 on: January 21, 2009, 09:44:19 PM »
I found the slide.ocx here
http://discussion.autodesk.com/forums/thread.jspa?messageID=3919905&#3919905
its in the SldMgr.zip, Let me know if you have trouble getting it.

I registered mine like
regsvr32 C:\Program Files\SldMgr\Slide.ocx

I do believe it must be registered on each computer


gile

  • Gator
  • Posts: 2520
  • Marseille, France
Re: Showing Slides in a .NET Form
« Reply #8 on: January 22, 2009, 01:18:52 AM »
Thank you very much Daniel.
Speaking English as a French Frog

jgr

  • Guest
Re: Showing Slides in a .NET Form
« Reply #9 on: August 28, 2010, 10:20:17 AM »



example of how to read and show autocad slides (and slide libraries) with .Net

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8796
  • AKA Daniel
Re: Showing Slides in a .NET Form
« Reply #10 on: August 28, 2010, 10:44:21 AM »
Nice  8-)

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Showing Slides in a .NET Form
« Reply #11 on: August 28, 2010, 10:18:08 PM »
the ocx is no longer available .. either that or I just can't find it
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

jgr

  • Guest
Re: Showing Slides in a .NET Form
« Reply #12 on: August 29, 2010, 05:23:38 PM »
Keith, if you need the ocx, i can send it.

I tried to convert my code to C# (with a translator: Tangible Instant C# and sharpdevelop). but... Can anyone help me?. Not with private messages.

Thanks.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Showing Slides in a .NET Form
« Reply #13 on: August 29, 2010, 05:56:38 PM »

From an old archive ..
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

jgr

  • Guest
Re: Showing Slides in a .NET Form
« Reply #14 on: August 29, 2010, 06:40:25 PM »
Nice. I do not need it but thanks.  :lol:
I do not speak English and might not have explained well

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8796
  • AKA Daniel
Re: Showing Slides in a .NET Form
« Reply #15 on: August 29, 2010, 06:44:25 PM »
Nice. I do not need it but thanks.  :lol:
I do not speak English and might not have explained well


You're reading it directly from the file, it's a good job!

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Showing Slides in a .NET Form
« Reply #16 on: August 30, 2010, 11:17:33 AM »
Nice. I do not need it but thanks.  :lol:
I do not speak English and might not have explained well


You're reading it directly from the file, it's a good job!

I was thinking the same thing.

The only think left would be to take your code and move it to its own class. then it could be used in a variety of different applications.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Showing Slides in a .NET Form
« Reply #17 on: August 31, 2010, 03:59:46 AM »
Ok, I have taken the initiative and ported the VB code to C# and built a dll that will create a bitmap from the slide. This bitmap can be assigned to a picture control or any other object that accepts a bitmap image.

The default resolution of the bitmap is 1600x1200 but it can be set by the user as desired, since any zoom or stretch of the bitmap will cause it to look bad.

You can set the bitmap to retain the aspect ratio if desired, otherwise it will fill the bitmap to its extents causing it to be distorted if the aspect ratio isn't the same as the slide.

There are other things that could be done ... and probably will ... in the meantime, the managed code will be a better addition to the toolbox than a COM object.

Source code is included, (VB code complements of jgr)
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

jgr

  • Guest
Re: Showing Slides in a .NET Form
« Reply #18 on: September 01, 2010, 12:08:08 PM »
Ok, I have taken the initiative and ported the VB code to C# and built a dll that will create a bitmap from the slide. This bitmap can be assigned to a picture control or any other object that accepts a bitmap image.

Thank you very much.

jgr

  • Guest
Re: Showing Slides in a .NET Form
« Reply #19 on: May 27, 2011, 11:05:36 AM »
New (C#) code for playing with slides/slide libraries

- Correctly displays slides created with Motorola 68000-family CPUs (in acad.slb: MEDIT_OT, MEDIT_OC,
MEDIT_MT, MEDIT_MC, MEDIT_CT, MEDIT_CJ,MEDIT_CC, 15W100, 14W100, 13W100, 12W100,
11W100, 10W100, 09W100, 08W100, 07W100, 06W100,05W100, 04W100, 03W100, 02W100)
- Keeps the aspect ratio.
- other code improvements and minor bug fixes

Compile before opening the form designer.

qjchen

  • Bull Frog
  • Posts: 285
  • Best wishes to all
Re: Showing Slides in a .NET Form
« Reply #20 on: March 21, 2012, 06:36:39 AM »
New (C#) code for playing with slides/slide libraries

- Correctly displays slides created with Motorola 68000-family CPUs (in acad.slb: MEDIT_OT, MEDIT_OC,
MEDIT_MT, MEDIT_MC, MEDIT_CT, MEDIT_CJ,MEDIT_CC, 15W100, 14W100, 13W100, 12W100,
11W100, 10W100, 09W100, 08W100, 07W100, 06W100,05W100, 04W100, 03W100, 02W100)
- Keeps the aspect ratio.
- other code improvements and minor bug fixes

Compile before opening the form designer.

Thank you, Jgr, it is a rather good program.~
http://qjchen.mjtd.com
My blog http://chenqj.blogspot.com (Chinese, can be translate into English)

neyton

  • Newt
  • Posts: 68
Re: Showing Slides in a .NET Form
« Reply #21 on: April 01, 2012, 08:44:06 PM »
Uns tempos atraz eu fiz um visualizador de slides em VB.NET, o fonte e o programa estão aqui:

google translate
I did some time behind a slideshow viewer in VB.NET, the source and the program are here:

http://tbn2.blogspot.com/2009/08/slideviewer-source-code.html

Visit my website: http://tbn2.blogspot.com

exmachina

  • Guest
Re: Showing Slides in a .NET Form
« Reply #22 on: April 02, 2012, 11:37:20 AM »
Uns tempos atraz eu fiz um visualizador de slides em VB.NET, o fonte e o programa estão aqui:

google translate
I did some time behind a slideshow viewer in VB.NET, the source and the program are here:

http://tbn2.blogspot.com/2009/08/slideviewer-source-code.html


Thanks for your contribution, but has many errors. Look here:
http://www.theswamp.org/index.php?topic=34954.0

neyton

  • Newt
  • Posts: 68
Re: Showing Slides in a .NET Form
« Reply #23 on: April 03, 2012, 09:53:43 AM »
o meu programa é outro, não tem nada a ver com este que você indicou

google translate:
my program is different, has nothing to do with this you indicated

see:
http://tbn2.blogspot.com.br/search?q=slideviewer
Visit my website: http://tbn2.blogspot.com