|
Hi members.
This is the preview, for what i was trying to achieve the effect.
Thanks for your attention.
Greets Balkoth
|
|
|
|
|
Hi all,
I have a tabcontrol with a lot of tabs which may be added and removed dynamically. I'm using a multiline tab control due to the amount of tabs involved, and I would like to simple be able to add a tab to either the top or bottom row of tabs programatically. Is that at all possible?
Thanks..
|
|
|
|
|
ruanr wrote: Is that at all possible?
Yup. Did you run into a non-working insert method? If yes, then there's a workaround[^].
IntPtr h = tabControl.Handle;
tabControl.TabPages.Insert(0, "test");
Alternatively, you could move pages around as shown below
var tabControl = new TabControl();
tabControl.Parent = this;
tabControl.Dock = DockStyle.Fill;
tabControl.Multiline = true;
Controls.Add(tabControl);
tabControl.TabPages.Add("bla");
tabControl.TabPages.Add("bla2");
tabControl.TabPages.Add("bla3");
var temp = tabControl.TabPages[1];
tabControl.TabPages[1] = tabControl.TabPages[0];
tabControl.TabPages[0] = temp;
I are Troll
|
|
|
|
|
I work alone, and I have developed a huge desktop app, probably a quarter million lines of code, that has evolved for well over 10 years.
I keep thinking it would be nice to convert it to a browser UI, but have watched many technologies go by, like asp, ajax, and now there's webmatrix, and sometimes I wonder whether I should take the leap, or whether it may cost me another 10 years to rewrite it for the web.
It uses .NET remoting, and is multithreaded, so wcf and parallel programming come to mind as well.
Fear promotes a lack of action, but knowledge defeats fear, so I thought I'd submit this general question to the "big team" out there in the code project universe.
____________________________________________________________________________________
The Vulcan Science Directorate has determined that time travel is impossible.
|
|
|
|
|
BobishKindaGuy wrote: probably a quarter million lines of code, that has evolved for well over 10 year
Converting this to a browser based application is not going to be easy.
It could take ages.....
There are a few plugins [^] that display winforms within browsers and you could consider them.
|
|
|
|
|
Thanks Abhinav.
The plugins reference you cited has a posted date of 2003, so I only spent a moment looking at it, since so many current ideas are very different from what was available at that time.
____________________________________________________________________________________
The Vulcan Science Directorate has determined that time travel is impossible.
modified on Wednesday, July 21, 2010 1:43 PM
|
|
|
|
|
I'm a winforms person by preference and have avoided working with the web, thankfully. However we have just made the decision to move to web delivered UI for all new development. To reverse a 10yo, still evolving app, thats going to be tough for a 1 man show.
A lot would depend on your customers, do you work in a company or do you sell the app as a commercial product? Who is going to foot the bill?
Mind you a total rebuild improves any application. I know any app I built 10 years ago would benifit from it.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks for your thoughts.
I guess a core of basic necessary functions would have to go together on a web UI, and leave less-used functionality as a desktop app. They could use RDC to go in and change some of that. (It's a commercial product.)
____________________________________________________________________________________
The Vulcan Science Directorate has determined that time travel is impossible.
|
|
|
|
|
It was the same with me. I avoided web development for a good long time. I'm only just now really getting into it with a new application I'm developing. It's cool - but it ain't the same as WinForms development - not by a long shot. You had better be ready to edit HTML even with .Net 3.5 or 4.0 to get your forms working. It ain't WYSIWYG - and you have to think completely different. Instead of event-driven, you're talking page lifecycle. Smokes the brain for awhile until you get it.
-Max
|
|
|
|
|
Thanks, Max,
Yeah, I can see that some of the friends suggesting an approach such as is provided with visualwebgui would take some of the pain out of the events versus page lifecycle paradigm. Either way, it's a total change of thinking, which all comes from the issue of sending bytes along a wire asynchrounously instead of counting on resources (code) being instantly available to "answer" some event.
Actually, I think the whole asynch paradigm is what we will all need to do within the next few years. It might be good practice to use delegates for everything within some sub-project just to get used to it. In fact, (philosophising here) I believe asynch thinking is probably more real-world than what we do now, which is like tugging a string and expecting the other end to move. It's like you have a message, so you put it in a bottle, throw it in the ocean, and then you need 100 people to watch the beach for "if and when" an answer comes back in a bottle. The real world works like that - when you order some product by phone or on a website, it's only when the product arrives at your door that you know you have it. Some truck 1,000 miles away brought it, but you weren't pulling the truck along a wire to make it arrive. Things are inherently disconnected in the real world. The days of quickbasic are gone ha ha ha.
____________________________________________________________________________________
The Vulcan Science Directorate has determined that time travel is impossible.
|
|
|
|
|
I'd say that the best way would be to avoid rewriting the entire application. I imagine that your application consists of multiple, smaller modules that interact?
How about adding functionality that allows interaction over the web, without ditching the desktop-application? What starts with writing a webpage to retrieve/modify configuration-settings could very well grow into a separate interface over time
I are Troll
|
|
|
|
|
Right, continue the evolution.
Any ideas what may be the best technologies to use? This WebMatrix looks promising.
____________________________________________________________________________________
The Vulcan Science Directorate has determined that time travel is impossible.
|
|
|
|
|
Where are you storing your data in the desktop-application? If you already have Sql Server, you'd only need a webserver that's capable of running ASP.NET. I'd go this classic route, but only because I'm familiar with it. I haven't tried the WebMatrix package (yet), but does look like a good place to start.
It contains a webserver, and Sql Compact. That setup might not support stored procedures, and other Sql Compact limitations would apply.
I are Troll
|
|
|
|
|
Thanks again Eddy!
The back end is sql server, mostly express, and has some stored procs.
The whole webserver thing is a big black hole to me, which is part of why I posted the question. I haven't been following all the best practices, etc. But one big concern is that I want my customers to be able to use it with whatever system they currently have. E.g. if they're not running IIS, I don't my app to be eliminated on that basis.
I see what you mean about WebMatrix. It may not be suitable. But I get the impression we may see more of this kind of "grouping" of products to hopefully "simplify" the whole issue of "making your windows desktop app work on the web".
I think from the answers I have received so far, we are not "there" yet.
____________________________________________________________________________________
The Vulcan Science Directorate has determined that time travel is impossible.
|
|
|
|
|
BobishKindaGuy wrote: I haven't been following all the best practices, etc.
That means that you're talking about a business-application, not something that specifically designed to be used in a text-book for a cs-class. Code grows, and usually the amount of best-practices used therin do so to.
BobishKindaGuy wrote: But one big concern is that I want my customers to be able to use it with whatever system they currently have. E.g. if they're not running IIS, I don't my app to be eliminated on that basis.
Good point. I'm running an Apache webserver, with Mono. Serves ASP.NET code quite nicely, at no cost. A nice extra is that you can brag on being compatible with Linux
BobishKindaGuy wrote: But I get the impression we may see more of this kind of "grouping" of products to hopefully "simplify" the whole issue of "making your windows desktop app work on the web".
Ever heard people complain on the price of Office? A grouping of products is often perceived as a single product that happens to consist of different parts.
I'm looking forward to meet a decent follow-up for Microsoft Access. WebMatrix sounds like it may come close to that
I are Troll
|
|
|
|
|
Eddy Vluggen wrote: I'm running an Apache webserver, with Mono. Serves ASP.NET code quite nicely, at no cost. A nice extra is that you can brag on being compatible with Linux
YES!
Thanks for that. I didn't know about that.
One more piece of the puzzle is in place.
____________________________________________________________________________________
The Vulcan Science Directorate has determined that time travel is impossible.
|
|
|
|
|
When the app is well-structured into several layers (UI/presentation, business logic, data access), you could reuse most layers unmodified, and simply modify/add another presentation layer. If it isn't well-structured yet, now is the time to spend the effort.
|
|
|
|
|
Perfect answer
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.(Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
Thanks, Dave.
Your signature line urges folks to accept an answer. I do want to acknowledge any contribution, but here's a question: Do you feel that "accepting" too quickly might cause some people who may have a valuable contribution to ignore the topic since it appears to have been "dealt with"?
(My question stems from not being aware of how people tend to judge whether to visit topics when trolling CodeProject.)
____________________________________________________________________________________
The Vulcan Science Directorate has determined that time travel is impossible.
|
|
|
|
|
In quick answers quite possibly, but not in the forums (IMO).
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.(Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
Thanks for your comments, Luc.
Yes, I actually had browser UI in the back of my mind from the very start, but laziness and incompatible coding practices have probably produced a wrinkly outcome.
Every time we open a quote, for example, we should have the discipline to put the string in some sort of a localization module, but our mind is on the logic required to solve the problem.
So let's say I decided to implement your idea. I still wonder what framework would be "sufficient" to go forward with. WebMatrix? Even a year ago, there were tutorials surrounding Silverlight that have now been superceded by concepts available directly in VS2010. E.g. xaml coding is reduced now. Maybe waiting one more year would allow all these ideas to mature and be "stable" enough to adopt. I hesitate to invest hundreds of hours into something that will prove to be defunct in a few months. One MS rep told me a little over a year ago that LINQ was not too great for many-to-many type of data relationships, and my app has quite a bit of that.
____________________________________________________________________________________
The Vulcan Science Directorate has determined that time travel is impossible.
|
|
|
|
|
If you don't want to choose some technology that may fade away in a matter of months or years, why not use something that has been around somewhat longer already? Start by looking at ASP.NET plain and simple. Once you have restructured your app, that is.
|
|
|
|
|
Luc Pattyn wrote: why not use something that has been around somewhat longer already?
I haven't been following all the discussions, webinars, training etc, but my impression is that newer technologies eliminate a lot of plumbing type of code that I would prefer not to have to teach myself. E.g. when ajax first came out.
Also, I want whatever I do to look way cool, so I'm afraid that if I go with the older stuff, it might look like some windows 3.1 thing. To compensate for that, I've considered 3rd party tools like the really nice devexpress controls, etc. I haven't gone there either, here's my reason: If my app were in-house, rather than commercially marketed (my "team of one" includes wearing the marketing hat as well), it would probably be okay. But I avoid 3rd party dlls as much as possible, so my version updates are not driven by 3rd party compatibility issues/bugs.
I really appreciate all the feedback I'm getting! When you work alone, you need other voices and someone to bounce ideas off.
____________________________________________________________________________________
The Vulcan Science Directorate has determined that time travel is impossible.
|
|
|
|
|
BobishKindaGuy wrote: Also, I want whatever I do to look way cool
No, you don't. You want whatever you do, done right.
A working Windows 3.1-application will always beat an exception in Silverlight 6 in terms of usability. Make sure you produce a car that can be used for driving, before you start pimpin' it.
I are Troll
|
|
|
|
|
Eddy Vluggen wrote: No, you don't. You want whatever you do, done right.
I hear you. The first priority is to produce a stable working model, then shine it up afterwards. But the shine must come before you show it to the world, at least in some environments, wouldn't you agree?
____________________________________________________________________________________
The Vulcan Science Directorate has determined that time travel is impossible.
|
|
|
|
|