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
A

Adam Turner

@Adam Turner
About
Posts
26
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Setup Questionn
    A Adam Turner

    I was wondering if you figured this out as i have the same problem :)

    C# question workspace

  • Run installed application
    A Adam Turner

    thanks.... Do you know of any examples for "Windows Form application launch using touchless deployment"? I did read something about Click Once deployment from MS but that is coming in Whidbey.

    ASP.NET help question

  • Run installed application
    A Adam Turner

    If i know that there is an application installed on a PC, that is viewing my web page, is there a way in which i can run that application (outside of the browser)? If not, then if a user selects a link (or button or something) to download a winform application (and cache it) and run it on the client outside of IE? thanks for any help

    ASP.NET help question

  • Converting an Image to an Icon
    A Adam Turner

    Basically, i want to know if there is a way to convert an Image to an Icon in C#. I tried the Icon constructor which accepts a Stream object and a Memory stream accepts a byte[], but i wasnt sure how to convert an Image to a byte[]. I am loading a .png file into memory to show a status, but i also have to show the same image in the form's icon and i dont want to have a .ico and a .png file for every status. Thanks for the help.

    C# csharp performance help tutorial

  • Trial version
    A Adam Turner

    Hi, I was wondering if you ever got to write the article about this? I am very interested and it sounds exactly like what i want. Even some sample code would be great --Adam Turner

    .NET (Core and Framework) windows-admin tutorial question announcement

  • Unique numbers in SQL
    A Adam Turner

    You could also setup in the DataSet that the column is auto-increment. So whenever you insert a new record, it will create a new ID for you. There is a problem with this though, as the ID always starts at 1 (or if populated from the Db, the last ID). So if your DB has 5 records in it with IDs of 1 though 5. And you retrieve ID 3 into your DataSet and add a new record, the ID will be 4. Now if you try to save it back to the database, it will error. Hope this helps

    C# database question

  • Only exposing interfaces from the server
    A Adam Turner

    You might be able to use internal on all other classes except your facades/interfaces. That should 'hide' those classes from all outside calls.

    C# database design sysadmin windows-admin question

  • Reducing the size of an Array
    A Adam Turner

    If i create an array that is a specific size

    int[] myInts = new int[10]

    but only fill the first 5 values, how can i reduce the length of the array to 5? so the following will happen

    myInts[0] = 5;
    myInts[1] = 4;
    myInts[2] = 3;
    myInts[3] = 2;
    myInts[4] = 1;
    for (int i = 0; i < myInts.Length; i++)
    {
    Console.WriteLine(myInts[i].ToString());
    }

    and the output would only be 5, 4, 3, 2, 1 and not throw an exception since myInts[5] is null

    C# question data-structures

  • Firing an event from outside the class
    A Adam Turner

    Is there a way to fire an event from a class, from outside that class? I mean, if i have something like the following, can ClassA fire ClassB's Click event?

    public class ClassA
    {
    ClassB myB;
    }
    public class ClassB
    {
    public event EventHandler Click;
    }

    I tried

    myB.BeginInvoke(myB.Click, new object[] {null, null});

    but it didnt compile Thanks Adam

    C# question

  • Windows.forms application
    A Adam Turner

    Instead of using MDI, you could create all of your "forms" as user controls and just handle their loading/unloading on the same form

    C# csharp help question

  • Remoting and Finalize
    A Adam Turner

    MarshalByRefObject doesnt derive from Componnet so doesnt have Dispose, and you need to derive a remoted object from MarshalByRefObject.

    C# database question workspace

  • Remoting and Finalize
    A Adam Turner

    I know that. I am using it as a base for some work that i am doing. But i dont know when the remoted object is destroyed, so i wanted to know about Finalize, since MarshalByRefObject doesnt derive from Componnet so doesnt have Dispose.

    C# database question workspace

  • Remoting and Finalize
    A Adam Turner

    I want to setup a remote singleton that keeps a sequence (and increments it). I get the last sequence number from a database and before the object is garbage collected i want to save the value back to the database. Should/Can i implement this in the singleton's finalize method or is there someway to use ILease and when Sponsorship times out, then save to the database?

    C# database question workspace

  • Argument-substitution vs Concatenation
    A Adam Turner

    The first way (using String.Format essentially) is a little more useful i think under a scenario like the following

    Console.WriteLine("a = {0} and a = {0} and b = {1}", a, b);

    vs

    Console.WriteLine("a = " + a + " and a = " + a + " and b = " + b);

    C# debugging question csharp java html

  • Correct way to abort a Suspended thread?
    A Adam Turner

    try Give Your .NET-based Application a Fast and Responsive UI with Multiple Threads by Ian Griffits

    C# winforms windows-admin help question

  • Maximizing Event (Or Not)
    A Adam Turner

    Thanks but i have never overriden this method before. Where do i get the values of WM_XXX and other message constants?

    C# question help

  • Maximizing Event (Or Not)
    A Adam Turner

    What is the event that is fired when maximizing a form? or minimizing for that matter. I currently have put a delegate on the Resize event and checking for FormWindowState.Maximized. Is this the only way of doing it? or even the correct way? Basically i dont want to actually maximize my form. I want to change its height to a certain value while not changing the top and left of the form. But the WindowsState is only changed to FormWindowState.Maximized when the form is actually maximized and not before when it starts. Any help is appreciated. --ABT

    C# question help

  • Powering through statements
    A Adam Turner

    HA. :-D That is extactly the work around that i am using.

    C# question

  • Powering through statements
    A Adam Turner

    Basically, i dont care if a set of statements throws an exception but i dont want the program flow to be interupted. How can i do this? Something like the following: int[] manyInts = new int[4]; manyInts[0] = 1; manyInts[1] = 1; manyInts[2] = 1; manyInts[3] = 1; manyInts[4] = 1; manyInts[5] = 1; So basically it executes every statement whether it thows an exception or not. -- ABT

    C# question

  • Sharing data between forms???
    A Adam Turner

    You can do it a couple of ways depending on the relationship between Form1 and Form2. (e.g. Form1 creates Form2, Form2 creates Form1 or Form3 creates both). For "Form1 creates Form2", you can pass an instance of Form1 to Form2 public Form2 { public Form2(Form1 f) { } } ... and then when Form1 is constructing Form2: Form2 f = new Form2(this); if "Form2 creates Form1", then you can just setup a public property in Form1 that gets the text from the label but you must keep an instance of Form1 as a field in Form2 so that your function can access it. And the "Form3 creates both", then construct Form1 first, and then pass its instance to Form2. --Adam Turner

    C# com 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