Custom Control
Custom Control
Custom Control
Custom Control
Custom Control
Custom Control Custom Control Custom Control Custom Control Custom Control Custom Control Custom Control Custom Control
Custom Control Custom Control
Custom Control
Go Back  Xtreme Visual Basic Talk > > > Custom Control


Reply
 
Thread Tools Display Modes
  #1  
Old 12-09-2014, 09:18 AM
holtzy holtzy is offline
Senior Contributor
 
Join Date: Jul 2002
Location: USA
Posts: 1,054
Talking Custom Control


I have a custom drawing user control I've created in a windows form app that I need to enable use for in an asp.net application. It uses System.Drawing extensively. It also uses/imports another custom class. The control takes input from the user with the arrow keys, numbers, etc. It has many public properties and subs that I need to interact with using the server side code in my asp.net application.

I was hoping for some direction on how to proceed. Can I somehow just reference the dll? Can I convert it to an activeX control? I am hoping to avoid re-writing the control.

Thanks for any advice you can give.
__________________
God is good!!!
Reply With Quote
  #2  
Old 12-09-2014, 10:56 AM
PlausiblyDamp's Avatar
PlausiblyDampCustom Control PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,056
Default

You can create an ActiveX component in VB.Net - IIRC one of the items you can add to a VB project is a COM Class (another name for an ActiveX component) so this is certainly possible.

In reality this might be a lot more difficult and restrictive though, you would probably have no luck with any browser that wasn't Internet Explorer and even IE might not support this on all versions. If support does exist it might be blocked for security reasons anyway. Also be aware that if it does work then it is effectively running on the client browser and will not have any direct access to server side functionality and neither will server have any direct access to this component.

Out of interest what does this component do? There might be a better and more web friendly way of achieving you aims.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags

Last edited by PlausiblyDamp; 12-10-2014 at 09:50 AM.
Reply With Quote
  #3  
Old 12-09-2014, 11:04 AM
holtzy holtzy is offline
Senior Contributor
 
Join Date: Jul 2002
Location: USA
Posts: 1,054
Default

It is a floor layout tool where you can draw rectangles one line at a time, arcs, angles, etc. It runs various calculations along the way.

I have to keep the code server side for security reasons, so I am limited on what I can send to the client. I'm concerned that if I turn this into a com component, I won't get the interaction I need between the client/server.
__________________
God is good!!!
Reply With Quote
  #4  
Old 12-10-2014, 09:54 AM
PlausiblyDamp's Avatar
PlausiblyDampCustom Control PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,056
Default

Unfortunately I can't think of an easy way of just taking that component and making it work in such way it can communicate with server side code, not without an awful lot of effort and re-engineering anyway.

One possibility might be to rewrite it as a Silverlight app, although Silverlight itself is a bit of a dead technology and would involve a lot of work anyway.

Another possibility is to write the client portion in Javascript and have it communicate with the server using a standard mechanism (e.g. WebAPI). This is also going to be a lot of work though.

Do you have any particular client side requirements? e.g. do you know if the client will have a specific browser installed?
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #5  
Old 12-10-2014, 10:37 AM
holtzy holtzy is offline
Senior Contributor
 
Join Date: Jul 2002
Location: USA
Posts: 1,054
Default

I can dictate what browser the client uses at least. I'm not sure I'm proficient enough in JavaScript to write something this complex. However, it doesn't sound like I have much of a choice since it has to communicate from the client side.
__________________
God is good!!!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Custom Control
Custom Control
Custom Control Custom Control
Custom Control
Custom Control
Custom Control Custom Control Custom Control Custom Control Custom Control Custom Control Custom Control
Custom Control
Custom Control
 
Custom Control
Custom Control
 
-->