Search Results

Search found 19846 results on 794 pages for 'congestion control'.

Page 12/794 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • DataList Control in vb.net windows application forms

    - by KoolKabin
    Hi guys, I am upgrading my application from vb6 to vb.net. I used to populate my data in datalist control in vb6 forms. I am not finding it in vb.net windows form application. Which one control is the equivalent to it? How can i list my data in that control? just like: I had a table with data like id, name I want the name should be the displayed column and id the bound column? how can i do that

    Read the article

  • Design Time Attribute For CSS Class in ASP.net Custom Server Control

    - by Jon P
    Hopefully some Custom Control Designers/Builders can help I'm attempting to build my first custom control that is essential a client detail collection form. There are to be a series of elements to this form that require various styles applied to them. Ideally I'd like the VS 2005/2008 properties interface to be able to apply the CSSClass as it does at the control level, i.e. with a dropdown list of available CSS Clases. Take for example the Class to be applied to the legend tag /// <summary>Css Class for Legend</summary> [Category("Appearance")] [Browsable(true)] [DefaultValue("")] //I am at a loss as to what goes in [Editor] [Editor(System.Web.UI.CssStyleCollection), typeof(System.Drawing.Design.UITypeEditor))] public string LegendCSSClass { get { return _LegendCSSClass; } set { _LegendCSSClass = value; } } I have tried a couple of options, as you can see from above, without much luck. Hopefully there is something simple I am missing. I'd also be happy for references pertaining to the [Editor] attribute

    Read the article

  • In search of opinions on web based version control systems

    - by tom smith
    Hi. Researching various open source, web-based document management/version control systems. I've checked google/questions here, etc... I'm looking for a lightweight web-based (apache) document mgmt/version control app that runs on top of SVN. I need to have the ability to: have multiple users checkin/checkout have a workflow (when userA checks the file in, and finishes the app passes it to the next person, etc... the app needs to allow me to have a structure where the files can be moved as a group. the files will be changed on a monthly basis app needs to have a access/premission control system. some people can see certain files, and perform certain actions on the files I imagine that I'm going to have 40-50 people dealing with the different files. I imagine that I'm going to have 2000-3000 files that have to be massaged. I'd prefer that the app be php based if possible, as opposed to a straight java app. Thanks

    Read the article

  • How to fit page to Silverlight WebBrowser control?

    - by Igor V Savchenko
    Hello. I use WebBrowser Silverlight 4 control to load some page: <WebBrowser Height="350" Name="webBrowser" Width="400" /> ... webBrowser.Navigate(new Uri("http://mail.live.com")); But page loads with horizontal and vertical scroll bars. So I'm trying to find some ways to get actual size of loaded page (then I can change Height/Width of control) OR change scale of loaded page (to fit it to the actual WebControl control). Is it possible to do with standard WebControl methods?

    Read the article

  • Selecting contents of Label Control

    - by j-t-s
    Hi All I have what I consider to be a pretty unique problem here, and no idea how to implement. From what I've seen, there is no documentation, tutorials, samples and/or articles on this. I've spent weeks researching, with nothing to show. The problem: I need the user to be able to select the contents of a Label Control at runtime, and edit it. If this can be done by extending the existing Label control, great! Or, if this requires a whole new Label Control to be created, fine. So be it. Using a TextBox is not an option I'm afraid. Any help at all is greatly appreciated! Thank you, jase

    Read the article

  • c# use custom control directly in c# project

    - by PEEK
    hi ...hope someone can help me now: i want to use the listview flicker"less" control found here :http://geekswithblogs.net/CPound/archive/2006/02/27/70834.aspx directly in my c# Project.. i dont want to make a custom user control project, build it to dll and then import it in my project ..i just want this all in my c# Programm iam making.. i think i have to add in my project a class, and add the code, but how can i use the control now directly in my project? hope my problem is clear .. thanks for help

    Read the article

  • How to use a control like the one in Visual Studio's Class Details window

    - by Chapso
    There is a control in Visual Studio's Class Details window (accessed via Class Diagram) which combines a ListView with a TreeView. The result looks something like this: TreeViewNode1 Column 1 Column 2 Column 3 Column 1 Column 2 Column 3 TreeViewNode2 Column 1 Column 2 Column 3 Column 1 Column 2 Column 3 All of the TreeView Nodes are collapsable so that you can view only the nodes you want to. I am looking to implement this, but it doesn't seem to be a .net control. Does anyone know of a control which already exists that allows this? It has to be free (as in beer).

    Read the article

  • Version control of Mathematica notebooks

    - by Etaoin
    Mathematica notebooks are, of course, plaintext files -- it seems reasonable to expect that they should play nice with a version-control system (git in my case, although I doubt the specific system matters). But the fact is that any .nb file is full of cache information, timestamps, and other assorted metadata. Scads of it. Which means that limited version control is possible -- commits and rollbacks work fine. Merging, though, is a disaster. Mathematica won't open a file with merge markers in it, and a text editor is no way to go through a .nb file. Has anyone had any luck putting a notebook under version control? How?

    Read the article

  • Add version control to existing SQL Server database

    - by ederbf
    I am part of a development team currently working with a database that does not have any kind of source control. We work with SQL Server 2008 R2 and have always managed the DB directly with SSMS. It now has ~340 tables and ~1600 stored procedures, plus a few triggers and views, so it is not a small DB. My goal is to have the DB under version control, so I have been reading articles, like Scott Allen's series (http://bitly.com/9cJmGR) and many old SO related questions. But I am still unable to decide on how to proceed. What I'm thinking of is to script the database schema in one file, then procedures, triggers and views in one file each. Then keep everything versioned under Mercurial. But of course, every member of the team can access SSMS and directly change the schema and procedures, with the possibility that any of us can forget to replicate those changes in the versioned files. What better options are there? And, did I forget any element worth having source control of?

    Read the article

  • Working with version control on a Drupal/CMS project

    - by Jens Ljungblad
    I was wondering how teams that develop sites using Drupal (or any other CMS) integrate version control, subversion, git or similar, into their workflow. You'd obviously want your custom code and theme files under version control but when you use a CMS such as Drupal a lot of the work consists of configuring modules and settings all of which is stored in the database. So when you are a team of developers, how do you collaborate on a project like this? Dumping the database into a file and putting that file under version control might work I guess, but when the site is live the client is constantly adding content which makes syncing a bit problematic. I'd love to know how others are doing this.

    Read the article

  • How to register a VB.Net User Control with jQuery

    - by BornReady
    Greetings and thank you in advance for the help. I created a user control in VB.NET that uses a jQuery datepicker. I am at an impasse. The code I have works for one datepicker control on the page but because I can only register the client script once, it will not work for multiple instances/datepickers on the same page. What is the best way to go about initiating the jQuery script for this control so I can use it multiple times on one page? Can I append to ClientScript.RegisterStartupScript? Thanks again.

    Read the article

  • Version control PHP Web Project

    - by Adam Lerman
    We have a php project that we would like to version control. Right now there are three of us working on a "Dev" version of the project that all have our Eclipse linked to it with just an external folder, and thus no version control. What is the right way, and what is the best way, to version control this (not necessarily the same I dont think) We have a SVN set up but just need to find a good way to check in and check out that lets us test on the dev server. Any ideas?

    Read the article

  • ASP.NET 2.0 control is not shown up un VS 2010 toolbox

    - by user353653
    Hi, I have developed some ASP.NET controls in .NET 2.0 with VS 2008. Now, I upgraded my project to VS 2010 but did not change the target framework to .NET 4.0 yet. But, surprisingly, I found that, the toolbox is not showing the bitmaps for the control added to the toolbox in VS 2010. Moreover, when I dragged and dropped a control (.NET 2.0) from the toolbox to my Web Form, I see some junk xml code added to my web form. I dont know if I need to recompile the .NET 2.0 controls with VS 2010 ? or what should I do in order to make the controls compatible for both in VS 2008 and VS 2010 ? I found that, there is no problem with Windows Forms control, rather it is just with ASP.NET Controls.

    Read the article

  • Getting Started with Chart control in ASP.Net 4.0

    - by sreejukg
    In this article I am going to demonstrate the Chart control available in ASP.Net 4 and Visual Studio 2010. Most of the web applications need to generate reports for business users. The business users are happy to view the results in a graphical format more that seeing it in numbers. For the purpose of this demonstration, I have created a sales table. I am going to create charts from this sale data. The sale table looks as follows I have created an ASP.Net web application project in Visual Studio 2010. I have a default.aspx page that I am going to use for the demonstration. First I am going to add a chart control to the page. Visual Studio 2010 has a chart control. The Chart Control comes under the Data Tab in the toolbox. Drag and drop the Chart control to the default.aspx page. Visual Studio adds the below markup to the page. <asp:Chart ID="Chart1" runat="server"></asp:Chart> In the designer view, the Chart controls gives the following output. As you can see this is exactly similar to other server controls in ASP.Net, and similar to other controls under the data tab, Chart control is also a data bound control. So I am going to bind this with my sales data. From the design view, right click the chart control and select “show smart tag” Here you need so choose the Data source property and the chart type. From the choose data source drop down, select new data source. In the data source configuration wizard, select the SQL data base and write the query to retrieve the data. At first I am going to show the chart for amount of sales done by each sales person. I am going to use the following query inside sqldatasource select command. “SELECT SUM(SaleAmount) AS Expr1, salesperson FROM SalesData GROUP BY SalesPerson” This query will give me the amount of sales achieved by each sales person. The mark up of SQLDataSource is as follows. <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SampleConnectionString %>" SelectCommand="SELECT SUM(SaleAmount) as amount, SalesPerson FROM SalesData GROUP BY SalesPerson"></asp:SqlDataSource> Once you selected the data source for the chart control, you need to select the X and Y values for the columns. I have entered salesperson in the X Value member and amount in the Y value member. After modifications, the Chart control looks as follows Click F5 to run the application. The output of the page is as follows. Using ASP.Net it is much easier to represent your data in graphical format. To show this chart, I didn’t even write any single line of code. The chart control is a great tool that helps the developer to show the business intelligence in their applications without using third party products. I will write another blog that explore further possibilities that shows more reports by using the same sales data. If you want to get the Project in zipped format, post your email below.

    Read the article

  • Java Mission Control for SE Embedded 8

    - by kshimizu-Oracle
    ????????????Java???·????????????Java Mission Control????Java SE 8 Embedded???????????Java????????????????Java Mission Control?????????JVM?Java????????? CPU?????????? ???????? ?????????? ???????UI???????????????? ????????????????????????????????????????????????????????????(Java Mission Control????????????????????????????????) 1. Java Mission Control??????? Java?????????????? JMX?????(MBean????) ? Java SE Embedded 8?Compact 3?Full JRE?????(???Minimal?VM??????) ????·???? ? Java SE Embedded 8?Full JRE??????(???Minimal?VM??????) ? ???????Java ME 8??????????????? 2. ???????JVM?????     2.1. JMX?????(MBeans???)????? >java -Dcom.sun.management.jmxremote=true               -Dcom.sun.management.jmxremote.port=7091                # ????????              -Dcom.sun.management.jmxremote.authenticate=false   # ????              -Dcom.sun.management.jmxremote.ssl=false                  # SSL??              -jar appliation.jar ? ??????????????????????JVM??????????????????? "-Djava.rmi.server.hostname=192.168.0.20"                     # ?????????IP????/???? ???????????(http://docs.oracle.com/javase/7/docs/technotes/guides/management/faq.html)?5???????????????????????     2.2. ????·????????? JVM????????????????????? "-XX:+UnlockCommercialFeatures -XX:+FlightRecorder" 3. Java Mission Control?????? JDK????????jmc??????????? >"JDK_HOME"/bin/jmc 4. Java Mission Control??JVM??????  Java Mission Control?????????????????????????????????????? - ????????????IP????·??????????????????JVM????????????????????? - ??????????(????·?????)?????????? - ??????????OK??? ????????????????????????????????????????????????????????????Java?????Java Mission Control???????? ??URL) http://www.oracle.com/technetwork/jp/java/javaseproducts/mission-control/index.html http://www.oracle.com/technetwork/jp/java/javaseproducts-old/mission-control/java-mission-control-wp-2008279-ja.pdf http://www.oracle.com/technetwork/java/embedded/resources/tech/java-flight-rec-on-java-se-emb-8-2158734.html

    Read the article

  • When should I make the first commit to source control?

    - by Kendall Frey
    I'm never sure when a project is far enough along to first commit to source control. I tend to put off committing until the project is 'framework-complete' and primarily commit features from then on. (I haven't done any personal projects large enough to have a core framework too big for this.) I have a feeling this isn't best practice, though I'm not sure what all could go wrong. Let's say, for example, I have a project which consists of a single code file. It will take about 10 lines of boilerplate code, and 100 lines to get the project working with extremely basic functionality (1 or 2 features). Should I first check in: The empty file? The boilerplate code? The first features? At some other point? Also, what are the reasons to check in at a specific point?

    Read the article

  • Should my colleagues review each others code from source control system?

    - by Daniel Excinsky
    Hi everybody. So that's my story: one of my colleagues uses to review all the code, hosted to revision system. I'm not speaking about adequate review of changes in parts that he belongs to. He watches the code file to file, line to line. Every new file and every modified. I feel just like being spied on! My guess is that if code was already hosted to control system, you should trust it as workable at least. My question is, maybe I'm just too paranoiac and practice of reviewing each others code is good? P.S: We're team of only three developers, and I fear that if there will be more of us, colleague just won't have time to review all the the code we'll write.

    Read the article

  • Are there serious companies that don't use version-control and continuous integration? Why?

    - by daramarak
    A colleague of mine was under the impression that our software department was highly advanced, as we used both a build server with continuous integration, and version control software. This did not match my point of view, as I only know of one company I which made serious software and didn't have either. However, my experience is limited to only a handful of companies. Does anyone know of any real company (larger than 3 programmers), which is in the software business and doesn't use these tools? If such a company exists, are there any good reason for them not doing so?

    Read the article

  • Are there serious companies that don't use version-control and continuous integration? Why?

    - by daramarak
    A colleague of mine was under the impression that our software department was highly advanced, as we used both a build server with continuous integration, and version control software. This did not match my point of view, as I only know of one company I which made serious software and didn't have either. However, my experience is limited to only a handful of companies. Does anyone know of any real company (larger than 3 programmers), which is in the software business and doesn't use these tools? If such a company exists, are there any good reason for them not doing so?

    Read the article

  • How do I know if a particular build has a particular version control change in it?

    - by carleeto
    Let's say I have a build. I need to know if a particular changelist/commit is present in that build. How would I solve this problem? I can think of a couple of possible approaches: 1) Add the changelist number into the binary so that I can look somewhere in the GUI and know what the changelist number is. I can then use this information to determine if the change I'm interested in is within that build. 2) Tag version control using some string that uniquely identifies that build. What unique string would I use? Is either of these two better? Are there any other better approaches? The solution would have to work for both Mac and Windows builds.

    Read the article

  • The need for source control software - Team Foundation Server? or something different?

    - by l0Ft
    Recently, Here at the company, more than one programmer was appointed in charge for a LightSwitch(C#) software development project and immediately there was a need of some sort of source control/sync. We have never used Team Foundation Server but we'd gladly use it if it's worth it. Is it the right tool to use for synchronising code between programmers? Does it have the needed features? Do you have any other tool in mind? (I have used TortoiseSVN but it was too simple and 'texty' if you know what I mean, we need a professional tool) What other features does Team Foundation has that we can use? (if you did not understand any of the above please ask me to clarify further)

    Read the article

  • WPF creating custom control - creating control like SpinBox extending TextBox

    - by veedoo
    Hi, What is the best way to extend a control? Lets choose for example SpinBox - we want to extend TextBox to SpinBox - just to add two buttons on the right side, which each one on click checks if Text property is a valid number and if it is increases or decreases the value by 1. Suposse that we have a lot of code using TextBox (Text, IsReadOnly properties and bindings etc.) so we want to replace TextBox by SpinBox without touching rest of the code. 1) we can inherit TextBox - so we have exactly the same interface, but how to add the buttons ?? 2) we can inherit from some layout control - eg. DockPanel - we can add buttons, but we lose TextBox interface. 3) after quick read about ControlTemplates I'm not sure, but I believe that we can add buttons and their logic using ControlTemplates 4) like about templates I'm not sure, but I hope we can inherit decorator class to create decorator with the buttons - we lose interface, but can add TextBox as a child I think that the best solutions is to combine 3) and 4) - create a decorator class and use it in a control template for TextBox. I would be grateful for your ideas and simple code how to implement 3 and 4, especially with code (c#), not xaml. Regards

    Read the article

  • DataBinding the AJAX Control Toolkit's Rating Control

    - by Nevada
    I'm attempting to use the AJAX Control Toolkit's Rating control in a DataBinding scenario. I have a ReuseRating column in my database that is a tinyint. It can hold values 1 through 5. Every record in the table has the value set to 1 currently. If I do this in my ItemTemplate everything works fine. I get 1 star filled in on my rating control. <act:Rating ID="ReuseRatingRating" runat="server" CurrentRating='<%# Convert.ToInt16(Eval("ReuseRating")) %>' MaxRating="5" StarCssClass="ratingStar" WaitingStarCssClass="savedRatingStar" FilledStarCssClass="filledRatingStar" EmptyStarCssClass="emptyRatingStar" /> Now I want to DataBind this in my EditTemplate like so. <act:Rating ID="ReuseRatingRating" runat="server" CurrentRating='<%# Convert.ToInt16(Bind("ReuseRating")) %>' MaxRating="5" StarCssClass="ratingStar" WaitingStarCssClass="savedRatingStar" FilledStarCssClass="filledRatingStar" EmptyStarCssClass="emptyRatingStar" /> Note, that I changed my Eval to a Bind in the CurrentRating property. This throws the following error. CS0103: The name 'Bind' does not exist in the current context Can anyone help me out on this one? I've been knocking my head against the wall for a couple of hours now.

    Read the article

  • Adding an ASP.NET Web User Control to a Control Dynamically

    - by RandomBen
    I have a simple ASP.NET Web User Control. It looks like this: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="NewsArticle.ascx.cs" Inherits="Website.Controls.NewsArticle" %> <div> <asp:Literal ID="ltlBody" runat="server" /> </div> My code behind looks like this: namespace Website.Controls { public partial class NewsArticle : System.Web.UI.UserControl { public String bodyText { //get { return ltlBody.Text; } set { ltlBody.Text = value; } } } } On a .aspx page I have <asp:Panel ID="pNews" runat="server" /> In the code behind I have: foreach (vwNews news in newsQuery) { NewsArticle article = new NewsArticle(); aticle.bodyText = news.Body; pNews.Controls.Add(article); } Every time I run this code the newsQuery is populated correctly and I get to the line aticle.bodyText = news.Body; and then I received the error article.bodyText threw an exception of type 'System.NullReferenceException' I am not sure what is causing this error message or how to fix it. I would think that there should not be an issue. I tried creating a constructor for my Web User Control so that it would give default values to my properties but that didn't work. Any idea how to make this work? It doesn't seem like it should be that

    Read the article

  • Web Browser Control &ndash; Specifying the IE Version

    - by Rick Strahl
    I use the Internet Explorer Web Browser Control in a lot of my applications to display document type layout. HTML happens to be one of the most common document formats and displaying data in this format – even in desktop applications, is often way easier than using normal desktop technologies. One issue the Web Browser Control has that it’s perpetually stuck in IE 7 rendering mode by default. Even though IE 8 and now 9 have significantly upgraded the IE rendering engine to be more CSS and HTML compliant by default the Web Browser control will have none of it. IE 9 in particular – with its much improved CSS support and basic HTML 5 support is a big improvement and even though the IE control uses some of IE’s internal rendering technology it’s still stuck in the old IE 7 rendering by default. This applies whether you’re using the Web Browser control in a WPF application, a WinForms app, a FoxPro or VB classic application using the ActiveX control. Behind the scenes all these UI platforms use the COM interfaces and so you’re stuck by those same rules. Rendering Challenged To see what I’m talking about here are two screen shots rendering an HTML 5 doctype page that includes some CSS 3 functionality – rounded corners and border shadows - from an earlier post. One uses IE 9 as a standalone browser, and one uses a simple WPF form that includes the Web Browser control. IE 9 Browser:   Web Browser control in a WPF form: The IE 9 page displays this HTML correctly – you see the rounded corners and shadow displayed. Obviously the latter rendering using the Web Browser control in a WPF application is a bit lacking. Not only are the new CSS features missing but the page also renders in Internet Explorer’s quirks mode so all the margins, padding etc. behave differently by default, even though there’s a CSS reset applied on this page. If you’re building an application that intends to use the Web Browser control for a live preview of some HTML this is clearly undesirable. Feature Delegation via Registry Hacks Fortunately starting with Internet Explore 8 and later there’s a fix for this problem via a registry setting. You can specify a registry key to specify which rendering mode and version of IE should be used by that application. These are not global mind you – they have to be enabled for each application individually. There are two different sets of keys for 32 bit and 64 bit applications. 32 bit: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION Value Key: yourapplication.exe 64 bit: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION Value Key: yourapplication.exe The value to set this key to is (taken from MSDN here) as decimal values: 9999 (0x270F) Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the !DOCTYPE directive. 9000 (0x2328) Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode. 8888 (0x22B8) Webpages are displayed in IE8 Standards mode, regardless of the !DOCTYPE directive. 8000 (0x1F40) Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode. 7000 (0x1B58) Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode.   The added key looks something like this in the Registry Editor: With this in place my Html Html Help Builder application which has wwhelp.exe as its main executable now works with HTML 5 and CSS 3 documents in the same way that Internet Explorer 9 does. Incidentally I accidentally added an ‘empty’ DWORD value of 0 to my EXE name and that worked as well giving me IE 9 rendering. Although not documented I suspect 0 (or an invalid value) will default to the installed browser. Don’t have a good way to test this but if somebody could try this with IE 8 installed that would be great: What happens when setting 9000 with IE 8 installed? What happens when setting 0 with IE 8 installed? Don’t forget to add Keys for Host Environments If you’re developing your application in Visual Studio and you run the debugger you may find that your application is still not rendering right, but if you run the actual generated EXE from Explorer or the OS command prompt it works. That’s because when you run the debugger in Visual Studio it wraps your application into a debugging host container. For this reason you might want to also add another registry key for yourapp.vshost.exe on your development machine. If you’re developing in Visual FoxPro make sure you add a key for vfp9.exe to see the rendering adjustments in the Visual FoxPro development environment. Cleaner HTML - no more HTML mangling! There are a number of additional benefits to setting up rendering of the Web Browser control to the IE 9 engine (or even the IE 8 engine) beyond the obvious rendering functionality. IE 9 actually returns your HTML in something that resembles the original HTML formatting, as opposed to the IE 7 default format which mangled the original HTML content. If you do the following in the WPF application: private void button2_Click(object sender, RoutedEventArgs e) { dynamic doc = this.webBrowser.Document; MessageBox.Show(doc.body.outerHtml); } you get different output depending on the rendering mode active. With the default IE 7 rendering you get: <BODY><DIV> <H1>Rounded Corners and Shadows - Creating Dialogs in CSS</H1> <DIV class=toolbarcontainer><A class=hoverbutton href="./"><IMG src="../../css/images/home.gif"> Home</A> <A class=hoverbutton href="RoundedCornersAndShadows.htm"><IMG src="../../css/images/refresh.gif"> Refresh</A> </DIV> <DIV class=containercontent> <FIELDSET><LEGEND>Plain Box</LEGEND><!-- Simple Box with rounded corners and shadow --> <DIV style="BORDER-BOTTOM: steelblue 2px solid; BORDER-LEFT: steelblue 2px solid; WIDTH: 550px; BORDER-TOP: steelblue 2px solid; BORDER-RIGHT: steelblue 2px solid" class="roundbox boxshadow"> <DIV style="BACKGROUND: khaki" class="boxcontenttext roundbox">Simple Rounded Corner Box. </DIV></DIV></FIELDSET> <FIELDSET><LEGEND>Box with Header</LEGEND> <DIV style="BORDER-BOTTOM: steelblue 2px solid; BORDER-LEFT: steelblue 2px solid; WIDTH: 550px; BORDER-TOP: steelblue 2px solid; BORDER-RIGHT: steelblue 2px solid" class="roundbox boxshadow"> <DIV class="gridheaderleft roundbox-top">Box with a Header</DIV> <DIV style="BACKGROUND: khaki" class="boxcontenttext roundbox-bottom">Simple Rounded Corner Box. </DIV></DIV></FIELDSET> <FIELDSET><LEGEND>Dialog Style Window</LEGEND> <DIV style="POSITION: relative; WIDTH: 450px" id=divDialog class="dialog boxshadow" jQuery16107208195684204002="2"> <DIV style="POSITION: relative" class=dialog-header> <DIV class=closebox></DIV>User Sign-in <DIV class=closebox jQuery16107208195684204002="3"></DIV></DIV> <DIV class=descriptionheader>This dialog is draggable and closable</DIV> <DIV class=dialog-content><LABEL>Username:</LABEL> <INPUT name=txtUsername value=" "> <LABEL>Password</LABEL> <INPUT name=txtPassword value=" "> <HR> <INPUT id=btnLogin value=Login type=button> </DIV> <DIV class=dialog-statusbar>Ready</DIV></DIV></FIELDSET> </DIV> <SCRIPT type=text/javascript>     $(document).ready(function () {         $("#divDialog")             .draggable({ handle: ".dialog-header" })             .closable({ handle: ".dialog-header",                 closeHandler: function () {                     alert("Window about to be closed.");                     return true;  // true closes - false leaves open                 }             });     }); </SCRIPT> </DIV></BODY> Now lest you think I’m out of my mind and create complete whacky HTML rooted in the last century, here’s the IE 9 rendering mode output which looks a heck of a lot cleaner and a lot closer to my original HTML of the page I’m accessing: <body> <div>         <h1>Rounded Corners and Shadows - Creating Dialogs in CSS</h1>     <div class="toolbarcontainer">         <a class="hoverbutton" href="./"> <img src="../../css/images/home.gif"> Home</a>         <a class="hoverbutton" href="RoundedCornersAndShadows.htm"> <img src="../../css/images/refresh.gif"> Refresh</a>     </div>         <div class="containercontent">     <fieldset>         <legend>Plain Box</legend>                <!-- Simple Box with rounded corners and shadow -->             <div style="border: 2px solid steelblue; width: 550px;" class="roundbox boxshadow">                              <div style="background: khaki;" class="boxcontenttext roundbox">                     Simple Rounded Corner Box.                 </div>             </div>     </fieldset>     <fieldset>         <legend>Box with Header</legend>         <div style="border: 2px solid steelblue; width: 550px;" class="roundbox boxshadow">                          <div class="gridheaderleft roundbox-top">Box with a Header</div>             <div style="background: khaki;" class="boxcontenttext roundbox-bottom">                 Simple Rounded Corner Box.             </div>         </div>     </fieldset>       <fieldset>         <legend>Dialog Style Window</legend>         <div style="width: 450px; position: relative;" id="divDialog" class="dialog boxshadow">             <div style="position: relative;" class="dialog-header">                 <div class="closebox"></div>                 User Sign-in             <div class="closebox"></div></div>             <div class="descriptionheader">This dialog is draggable and closable</div>                    <div class="dialog-content">                             <label>Username:</label>                 <input name="txtUsername" value=" " type="text">                 <label>Password</label>                 <input name="txtPassword" value=" " type="text">                                 <hr/>                                 <input id="btnLogin" value="Login" type="button">                        </div>             <div class="dialog-statusbar">Ready</div>         </div>     </fieldset>     </div> <script type="text/javascript">     $(document).ready(function () {         $("#divDialog")             .draggable({ handle: ".dialog-header" })             .closable({ handle: ".dialog-header",                 closeHandler: function () {                     alert("Window about to be closed.");                     return true;  // true closes - false leaves open                 }             });     }); </script>        </div> </body> IOW, in IE9 rendering mode IE9 is much closer (but not identical) to the original HTML from the page on the Web that we’re reading from. As a side note: Unfortunately, the browser feature emulation can't be applied against the Html Help (CHM) Engine in Windows which uses the Web Browser control (or COM interfaces anyway) to render Html Help content. I tried setting up hh.exe which is the help viewer, to use IE 9 rendering but a help file generated with CSS3 features will simply show in IE 7 mode. Bummer - this would have been a nice quick fix to allow help content served from CHM files to look better. HTML Editing leaves HTML formatting intact In the same vane, if you do any inline HTML editing in the control by setting content to be editable, IE 9’s control does a much more reasonable job of creating usable and somewhat valid HTML. It also leaves the original content alone other than the text your are editing or adding. No longer is the HTML output stripped of excess spaces and reformatted in IEs format. So if I do: private void button3_Click(object sender, RoutedEventArgs e) { dynamic doc = this.webBrowser.Document; doc.body.contentEditable = true; } and then make some changes to the document by typing into it using IE 9 mode, the document formatting stays intact and only the affected content is modified. The created HTML is reasonably clean (although it does lack proper XHTML formatting for things like <br/> <hr/>). This is very different from IE 7 mode which mangled the HTML as soon as the page was loaded into the control. Any editing you did stripped out all white space and lost all of your existing XHTML formatting. In IE 9 mode at least *most* of your original formatting stays intact. This is huge! In Html Help Builder I have supported HTML editing for a long time but the HTML mangling by the Web Browser control made it very difficult to edit the HTML later. Previously IE would mangle the HTML by stripping out spaces, upper casing all tags and converting many XHTML safe tags to its HTML 3 tags. Now IE leaves most of my document alone while editing, and creates cleaner and more compliant markup (with exception of self-closing elements like BR/HR). The end result is that I now have HTML editing in place that's much cleaner and actually capable of being manually edited. Caveats, Caveats, Caveats It wouldn't be Internet Explorer if there weren't some major compatibility issues involved in using this various browser version interaction. The biggest thing I ran into is that there are odd differences in some of the COM interfaces and what they return. I specifically ran into a problem with the document.selection.createRange() function which with IE 7 compatibility returns an expected text range object. When running in IE 8 or IE 9 mode however. I could not retrieve a valid text range with this code where loEdit is the WebBrowser control: loRange = loEdit.document.selection.CreateRange() The loRange object returned (here in FoxPro) had a length property of 0 but none of the other properties of the TextRange or TextRangeCollection objects were available. I figured this was due to some changed security settings but even after elevating the Intranet Security Zone and mucking with the other browser feature flags pertaining to security I had no luck. In the end I relented and used a JavaScript function in my editor document that returns a selection range object: function getselectionrange() { var range = document.selection.createRange(); return range; } and call that JavaScript function from my host applications code: *** Use a function in the document to get around HTML Editing issues loRange = loEdit.document.parentWindow.getselectionrange(.f.) and that does work correctly. This wasn't a big deal as I'm already loading a support script file into the editor page so all I had to do is add the function to this existing script file. You can find out more how to call script code in the Web Browser control from a host application in a previous post of mine. IE 8 and 9 also clamp down the security environment a little more than the default IE 7 control, so there may be other issues you run into. Other than the createRange() problem above I haven't seen anything else that is breaking in my code so far though and that's encouraging at least since it uses a lot of HTML document manipulation for the custom editor I've created (and would love to replace - any PROFESSIONAL alternatives anybody?) Registry Key Installation for your Application It’s important to remember that this registry setting is made per application, so most likely this is something you want to set up with your installer. Also remember that 32 and 64 bit settings require separate settings in the registry so if you’re creating your installer you most likely will want to set both keys in the registry preemptively for your application. I use Tarma Installer for all of my application installs and in Tarma I configure registry keys for both and set a flag to only install the latter key group in the 64 bit version: Because this setting is application specific you have to do this for every application you install unfortunately, but this also means that you can safely configure this setting in the registry because it is after only applied to your application. Another problem with install based installation is version detection. If IE 8 is installed I’d want 8000 for the value, if IE 9 is installed I want 9000. I can do this easily in code but in the installer this is much more difficult. I don’t have a good solution for this at the moment, but given that the app works with IE 7 mode now, IE 9 mode is just a bonus for the moment. If IE 9 is not installed and 9000 is used the default rendering will remain in use.   It sure would be nice if we could specify the IE rendering mode as a property, but I suspect the ActiveX container has to know before it loads what actual version to load up and once loaded can only load a single version of IE. This would account for this annoying application level configuration… Summary The registry feature emulation has been available for quite some time, but I just found out about it today and started experimenting around with it. I’m stoked to see that this is available as I’d pretty much given up in ever seeing any better rendering in the Web Browser control. Now at least my apps can take advantage of newer HTML features. Now if we could only get better HTML Editing support somehow <snicker>… ah can’t have everything.© Rick Strahl, West Wind Technologies, 2005-2011Posted in .NET  FoxPro  Windows  

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >