Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
D

danielk_

@danielk_
About
Posts
13
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • &lt; symbols in <xsl:text xmlns:xsl="#unknown"></xsl:text>
    D danielk_

    How do I generate a < symbol using xsl:text? I have the following:

    <xsl:text disable-output-escaping="yes">
    a < b
    </xsl:text>

    but this would generate an error, (unexpected token) If I use:

    <xsl:text disable-output-escaping="yes">
    a < b
    </xsl:text>

    the text that is generated is a < b what would I need to do to have a < b to be generated? thanks

    XML / XSL question xml help

  • Updating a Progress Form
    D danielk_

    I have a windows forms app which goes and does some processing. While this processing is being done I have created a progress form which I want to show the current progress (this is not working correctly). The code is:

    ProgressForm frm = new ProgressForm();   //this is just a simple Form
    
    frm.ProgressText = "Do step 1...";                  //this sets some text on a label
    DoStep1();
    
    frm.ProgressText = "Do step 2...";
    DoStep2();
    
    frm.ProgressText = "Do step 3...";
    DoStep3();
    
    frm.ProgressText = "Completed";
    

    This code will show the progress form, but it will not update the label text until all the steps have completed, then the progress form show "Completed", while the processing is still happening it shows nothing. Anyone know a solution? thanks

    C# winforms question announcement

  • Visual Studio Setup and Deployment projects
    D danielk_

    I have a Visual Studio Setup and Deployment project that associates a file type with my app. I have setup the file type in my Setup and Deployment project and ran the installer, however in windows explorer when you right click a file of that particular type and select "open with" it will show just the app's icon but no text is displayed next to the icon (usually the name of the application is shown here). Does anyone know what I'm doing wrong? Note: if you double click the file it will successfuly launch the app correclty. It's just the application name in the windows explorer "open with" menu that doesn't show. thanks

    C# csharp visual-studio sysadmin question workspace

  • Getting path of executing assembly
    D danielk_

    thanks guys, I've got it working

    C# tutorial question

  • Getting path of executing assembly
    D danielk_

    I am trying to get the path of the executing .exe, but so far with no luck. I have tried Assembly.GetExecutingAssembly().CodeBase but this just returns the path to the .dll does anyone know how to get the path of the .exe? thanks

    C# tutorial question

  • Setting focus to a Button
    D danielk_

    I have a windows form with some buttons and I am having problems setting focus on the buttons. Basically an array of buttons gets passed in to the the form along with a default button as follows: public void Show (Button defaultSelectedButton, Buttons[] btns) { foreach (Button btn in btns) pnlButtons.Controls.Add (btn); //pnlButtons is a Panel defaultSelectedButton.Focus(); } however defaultSelectedButton.Focus(); does not seem to have any effect and the button with focus is always the first button that was added to pnlButtons. Does anyone know how to apply focus to a particular button? thanks

    C# data-structures tutorial question

  • Label / Form Resizing
    D danielk_

    I have built a custom message box form (Windows form), on this form I have a label which displays a message that gets passed in to the message box. My question is how can I resize the label and form based on the text passed in? if a large block of text is passed in, the form and label need to resize to be able to show all the text and not just cut it off. thanks for help

    C# question help

  • PreFilterProperties
    D danielk_

    I have built a custom gradient form as part of a windows control library. What I would like to do is to hide the BackColor property from the forms designer (since it has now been replaced by BackColor1 and BackColor2). Currently when I create a new inherited form which inherits from my GradientForm in the designer pane I can see BackColor, BackColor1, and BackColor2. With a windows control I would use something like the following to remove BackColor:

    internal class GradientPanelDesigner : ScrollableControlDesigner
        {
            public GradientPanelDesigner()
            {
            }
    	
            protected override void PreFilterProperties(System.Collections.IDictionary properties)
            {
                properties.Remove("BackColor");
                properties.Remove("BackgroundImage");
            }
        }
    

    Is there an equivalent for a Windows Form? thanks for help

    C# help question

  • CodeDom
    D danielk_

    looks good. IsInstanceOfType should do the job thanks

    C# question

  • CodeDom
    D danielk_

    Hi I'm using CodeDom and I want it to generate code such as the following:

    if (var is MyClass)
    {            
        //Do stuff
    }
    

    The code I am currently using to perform the generation is

    CodeConditionStatement ifStatement = new CodeConditionStatement();
    ifStatement.Condition = new CodeBinaryOperatorExpression(lhs,
                    CodeBinaryOperatorType.IdentityEquality, rhs);
    

    this code will generate the below statement

    if (var == MyClass)
    {            
        //Do stuff
    }
    

    All that needs to change is the ==, which needs to change to 'is'. Is this possible to do in CodeDom? Also note that 'var' can also be a child class of MyClass (which is why I did not use var.GetType() == typeof(MyClass)) thanks

    C# question

  • Licensing in .NET
    D danielk_

    Hi, I have an SDK written in C# which I would like to license out to other developers. Basically the SDK will check if the current machine running it has a license (this will be based on the machine key), if there is no license it will dislay a nag popup message, etc. However if an application has been built using this SDK on a licensed development machine, when the application is run (on any machine) the nag popup should not display (ie it will be royalty free). Is this at all possible to do using the .NET framework's licensing classes? If so can anyone suggest where I should start? Or if it is not possible, can anyone suggest some alternatives? thanks

    C# csharp dotnet question

  • Crystal reports navigation
    D danielk_

    Hi, I have a crystal report that displays a listing of company names, when a company name is clicked in the report, a new report should display showing details for the company that was clicked. This would involve loading a new report in the crystal report viewer and passing in the CompanyID of the company which was clicked. I have been able to do this for web reports by setting a hyperlink with the CompanyID set in the query string, eg "ReportRedirector.aspx?CompanyID=3" which gets called when the company is clicked. But I was just wondering if anybody knows of any other ways to achieve this, in particular a solution that would also work for a windows forms application? thanks

    IT & Infrastructure database winforms question

  • Auto generating .sln .csproj files
    D danielk_

    Does anybody know of any API or SDK which I can use to programatically generate visual studio project files and solution files? Also is there a way to programatically generate a strongly typed dataset or xml schema by passing in a database name, and table name to some API, SDK or .exe? thanks

    .NET (Core and Framework) database xml csharp visual-studio json
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups