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
T

Tormod Fjeldskaar

@Tormod Fjeldskaar
About
Posts
13
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Detect if control is hosted in the Visual Studio designer?
    T Tormod Fjeldskaar

    I forgot to mention that I'm working with .NET Compact Framework, but your answer helped me enough to find the solution. On Compact Framework I had to check for this.Site.DesignMode rather than just this.DesignMode. Thanks a lot :)

    Visual Studio csharp database visual-studio design question

  • Detect if control is hosted in the Visual Studio designer?
    T Tormod Fjeldskaar

    I'm creating an animated custom control using System.Windows.Forms.Timer as the animation trigger. I would like to freeze the animation during design time, however, as the animation may disturb the user. Is it possible to detect somehow that that the control is hosted in the Visual Studio designer?

    Visual Studio csharp database visual-studio design question

  • API & DLL
    T Tormod Fjeldskaar

    Quoting Wikipedias definition for each term: API[^]: "An application programming interface (API) is a source code interface that a computer application, operating system or library provides to support requests for services to be made of it by a computer program." DLL[^]: "Dynamic-link library (also written without the hyphen), or DLL, is Microsoft's implementation of the shared library concept in the Microsoft Windows and OS/2 operating systems." Hence, a DLL is one way to expose an API or parts of an API to the programmer. Another way to expose an API is through a Web Service[^]. So, to recap, the MS Office API is the specification of what functionality you as a programmer can use to interact with MS Office, while the MS Office DLL (DLLs actually, there are lots) is the binary code executed by the computer through you program if you use the API.

    C# question json

  • Default program of file.
    T Tormod Fjeldskaar

    I can't see that it does. The page you point to describes how the Default Programs API works, i.e. how to tell windows the capabilities of a certain application.

    C#

  • Default program of file.
    T Tormod Fjeldskaar

    To see how this information is stored in the registry, you may want to read what Microsoft has to say about file types[^].

    C#

  • ScrollBar on Form .NET 2005 C# Windows Form
    T Tormod Fjeldskaar

    Sorry, I have no project to point you to, but the documentation can be found here[^]. Adjust the properties Minimum and Maximum to determine the interval of the scroll bar. Respond to the ValueChanged event and read the Value property to reflect changes when the user scrolls (or optionally use data binding).

    C# csharp winforms tutorial

  • deserialization problem
    T Tormod Fjeldskaar

    You don't need a common arraylist to serialize several arraylists into one file. Just make several calls to formatter.Serialize passing the same stream:

    formatter.Serialize(myStream, arr1)
    formatter.Serialize(myStream, arr2)
    formatter.Serialize(myStream, arr3)

    To restore the arraylists, make the calls to formatter.Deserialize in the exact same order:

    arr1 = (ArrayList) formatter.Deserialize(myStream);
    arr2 = (ArrayList) formatter.Deserialize(myStream);
    arr3 = (ArrayList) formatter.Deserialize(myStream);

    C# question help

  • deserialization problem
    T Tormod Fjeldskaar

    If you serialize the lists into separate streams, just remember which list resides in which stream and you'll be fine. If you serialize the lists into one common stream, though, make sure you deserialize them in the exact same order they were serialized.

    C# question help

  • can i use optional parameters
    T Tormod Fjeldskaar

    One way to solve it is to use polymorphism method overloading:

    private void MyMethod(int x, int y, int z)
    {...}

    private void MyMethod(int x, int y)
    {
    MyMethod(x, y, 10); //gives z default value 10
    }

    private void MyMethod(int x)
    {
    MyMethod(x, 5); //gives y default value 5
    }

    -- modified at 2:56 Tuesday 7th August, 2007

    C# csharp question

  • Expiring app
    T Tormod Fjeldskaar

    The program needs a way to tell that it's the first time it runs, though... Otherwise, the user could just delete the file or registry key, and the program would create a new one, practically giving you 60 more days of testing.

    C# csharp sales help question

  • Double characters in regexp
    T Tormod Fjeldskaar

    This should do it: //\s*{\s*__(?.*(?=__))__\s*(?\x23[^}]*)*}

    C# regex tutorial question

  • How to safely Form.Invoke from another thread? [modified]
    T Tormod Fjeldskaar

    How about wrapping both your protected override void Dispose(bool disposing)-method and your invoke-procedure in a lock(...)-block? Ref.: http://msdn2.microsoft.com/en-us/library/c5kehkcz(vs.80).aspx

    C# tutorial question help

  • DataGridView
    T Tormod Fjeldskaar

    foreach(DataGridViewRow row in yourDataGridView.Rows) {   foreach(DataGridViewCell cell in row.Cells)   {     /* do your stuff */   } }

    C# tutorial question
  • Login

  • Don't have an account? Register

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