×

Loading...
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。

two different request:

1. convert a windows form to web form. This is partly doable but has lots of restritions. e.g. fancy functions like right-click menu or draw some pictures, not to mention DirectX.


2. Run a windows form in browser. If you can accept only run it in IE, it's doable, althrough also has its own problem. google "host windows form IE"

http://www.15seconds.com/issue/030610.htm

I acturally tried this kind of code and I can run a windows library dll in IE, but there was some other problem ( I don't remember detail, probably security issue.)

I used to write ActiveX control for my client by MFC++, After .Net is out, I tried to build C# windows form dll and run it in IE , but because of some problem I finally go back to VC++.NET to write ocx instead of dll.

So Another approach is write a ocx container to call your dll library. If you want it to be a product, you will have to buy a digital code signature.
Report

Replies, comments and Discussions:

  • 工作学习 / 学科技术讨论 / 有精通 C# web control library 的吗?想把一个C# window control library 转成C# web control library , 可行吗?求高手赐教。
    • No way. Windows controls are completed different from web controls.
    • it's "possible", but has too many restrictions; I know .Net can convert a windows form library into some kind of "light control" so IE browser can load it like a activeX control, but only IE.
      • acturally why don't you just google convert windows form web: http://suite4.net/products/form.suite4.net/win-web-forms/default.aspx http://www.codeproject.com/KB/cs/winforms2webforms.aspx
        • 写这种文章的人以为眼睛对眼睛,鼻子对鼻子这么简单,属于大脑缺氧。
          • this article in codeproject got 4.45 review and both authers are Silver members. So I would say they probably know more than you.
            • Simply, Can you(or they) convert a windows comboBox into a web control?
              • read the url http://suite4.net/products/form.suite4.net/win-web-forms/default.aspx
                Somehow I trust their statement.
                • 也别trust不trust. 你也google市场上有多少web combobox在卖。
                  • I have no idea what you are talking about. You asked it they can convet windows comboBox to web control, they say they can. why would I care people selling combobox?
                    • As my understanding of convertion, The minimum requirement should keep same functionalities. For .NET windows combobox, there is no such thing in asp.net (or html). So many companys develop asp.net combobox and put it on market.
                      • 加一句,楼主的windows GDI+的功能,转化成web是更不可能了。
                      • well, that really depend on how you say "same functionalities". a simple combobox is just a dropdownbox. Of course we all know web control is different than windows control, you can draw a flower in combobox on windows form.
                        • 说到点子上了,反向想一下,要能转化,就不需这么费劲用两套控件,用一套控件,编译时加个参数,爱生成windows爱生成windows,爱生成web爱生成web,多方便。也许将来行
            • 再说说我的水平,在微软newsgroup上晃的 .NET MVP,水平超过我的也就2--3位。其中有一位是我的偶像。
        • Thanks a lot for your information. Would you mind sending me your phone number so that I can ask you for the detailed question?
          • 中国要设计自己的大型飞机,到德国买一套高速列车的图纸,用软件一转换,飞机设计图纸就有了。
        • That is from winform to web form. Actually we have a .net control for graphics development.
          I wanted to ask whether or not we could put current control on server and make a front (web form) to call it and drawing in front ( sorry, i have little knowledge about web stuff). Anyone could give me a hint?
          • Web controls have totally different mechanism comparing to Windows controls.
            Windows controls ‘draw’ graph directly to screen. On the other hand, web controls render HTML + CSS codes for presentation on browsers.
          • two different request:
            1. convert a windows form to web form. This is partly doable but has lots of restritions. e.g. fancy functions like right-click menu or draw some pictures, not to mention DirectX.


            2. Run a windows form in browser. If you can accept only run it in IE, it's doable, althrough also has its own problem. google "host windows form IE"

            http://www.15seconds.com/issue/030610.htm

            I acturally tried this kind of code and I can run a windows library dll in IE, but there was some other problem ( I don't remember detail, probably security issue.)

            I used to write ActiveX control for my client by MFC++, After .Net is out, I tried to build C# windows form dll and run it in IE , but because of some problem I finally go back to VC++.NET to write ocx instead of dll.

            So Another approach is write a ocx container to call your dll library. If you want it to be a product, you will have to buy a digital code signature.
            • No doubt. If you tried to run managed codes in unmanaged environment.
            • very interesting! I will take a close look after I am done with my website. BTW, are you interested in 3D visualization application developmet with C#.net or Qt base C++? Thanks, holdon.
              • Not at all ;-)
                • Come on. Everybody knows you're interested in it.
    • yes or no, depending on what kind of control is
      • Please see http://vtp.dnnproject.com/. it is still under construction.
        The reason I am asking is that I would like to develop it as a product that could be used in web (such as game, visulization through internet). I am thinking If it is feasible to make it work in the back (on server) and design web form by calling functions from it and draw in the front, we would develop 3D chart, 3D table, and whatever we like based on current .net win control. If you have interest in 3D visulization development and have strong backgroud of .net and C++, You are very welcome to join us.
        • still yes or no, depending on what you want to represent in the front-end. i am very sure your current control should be able to export the generated drawings to mov or images. if you need to interaction, i guess SilverLight will be a better choice.
          apparently, u r not trying to "convert" your current control to a "webcontrol", but simply want to change from an exe file to a thin-client representation, is that correct?
          • 对你的说话艺术比较佩服,意思表达了而且让听者听的舒服。
            • 受宠若惊
          • Yes, I am not trying to convert it but hope it could interact with ASP.net so that generated images or movies could be viewed through internet.
            Then, could SilverLight work with win control? do you know anyone that is familier with such kind of interacting work? Thanks.!
            • from my understanding, silverlight should be able to accomplish what you need, but unfortunately, i don't know anyone can work on this immediately. maybe u wanna do some research first to see if it can really work for your case.
              • Thanks anyway!