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
J

John Arlen

@John Arlen
About
Posts
18
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Using a HWND from another application.
    J John Arlen

    An HWND is not global but specific for an application's domain. (It's essentially a pointer). It is therefore not possible to use an HWND outside of that application.

    C# help csharp c++ database security

  • How can you enumerate "keys" of an Application object
    J John Arlen

    For Each key As String In Application.Contents.AllKeys Trace.WriteLine(Application.Contents(key)) Next

    Web Development tools question

  • databind checkedlistbox to arraylist
    J John Arlen

    To be honest, i'm a bit surprised that CheckedListbox doesn't expose DataSource and others. I'm sure there's a better answer, but at the least you can use it's base class' methods: ArrayList list = new ArrayList(); list.Add("Hello"); ListBox box = (ListBox)checkedListBox1; box.DataSource = list;

    C# question tutorial

  • Database communication
    J John Arlen

    If you are going to have to *learn* either C++ or C#, i'd suggest C#. However C# can very easily handle this with the .NET data provider classes. The link below is to an article on using the Oracle Data Provider for .NET. Should give enough examples to help your decision out. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/manprooracperf.asp

    C# csharp c++ database oracle com

  • About Get Data from Clipboard
    J John Arlen

    (Not saying this is your problem, but...) As written, the code you supplied will not work as you expect. You declare "System.Object obj;" inside the if() statement. Therefore as soon as you exit the block (next line) - obj is no longer a valid object. To correct this (if it isn't just a typo in your sample), move the System.Object obj; declaration before the if( Data.Get....) statement.

    .NET (Core and Framework) css graphics debugging question

  • Placing my .DLL into Reference List
    J John Arlen

    An assembly must be registered with the Global Assembly Cache to be accessible outside the application directory. Further, an assembly must be strong named to be added to the GAC. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfglobalassemblycacheutilitygacutilexe.asp

    .NET (Core and Framework) csharp

  • Reference Application MainForm or ApplicationContext
    J John Arlen

    I'm not sure I understand exactly what you want to do, but the default Main() code looks like: [STAThread] static void Main() { Form1 form = new Form1(); Application.Run(form); } So the reference exists at that point. Obviously from within Form1, you have a reference with "this". The main questions would be - (1) where do you want to reference it? and (2) what specifically do you want to do with it?

    .NET (Core and Framework) question csharp winforms

  • Storing data in Clipboard to past into Microsoft Excel
    J John Arlen

    The Comma-Delimited Value isn't a string - which is the confusing part. The following code will do what you want. // Place comma-delimited on clipboard string commaText = "1,2,3,4,5,6,7,8,9"; byte[] bytes = System.Text.Encoding.UTF8.GetBytes(commaText); MemoryStream stream = new MemoryStream(bytes); DataObject dataObject = new DataObject(); dataObject.SetData(DataFormats.CommaSeparatedValue, stream); Clipboard.SetDataObject(dataObject, true); // Read comma-delimited from clipboard string values=string.Empty; IDataObject dataObject = Clipboard.GetDataObject(); if(dataObject.GetDataPresent(DataFormats.CommaSeparatedValue)) { StreamReader streamReader = new StreamReader((Stream) dataObject.GetData(DataFormats.CommaSeparatedValue)); values = streamReader.ReadToEnd(); streamReader.Close(); } Console.WriteLine( values );

    C# com question

  • It won't update the last modified date in VS.Net 2003!!
    J John Arlen

    The text is misleading. It states: "Open an Existing Project". However it is referring to the solution files (*.sln). This date will only be updated when the solution is modified - such as adding/removing a project, changing Configuration Manager or Build Order. The date will *not* be changed, however, when the code for a project is changed, or even new classes added to an existing project.

    Visual Studio help tutorial announcement csharp visual-studio

  • Extracting path from URL?
    J John Arlen

    System.IO.Path class offers several static functions that work on both file system paths as well as URLs. The one that addresses your question is: "http://samplesite.com/account" == Path.GetDirectoryName("http://samplesite.com/account/myaccount.aspx");

    ASP.NET csharp asp-net database sql-server

  • Another Bug in the .net datagrid ???
    J John Arlen

    More specifically, the .Leave event is fired when the currently selected cell is scrolled out of view (up or down). Curiously, no Enter event is fired when it is scrolled back in view but a Leave *will* be fired again if you continue scrolling. And in neither case is Got/LostFocus() fired. I don't usually like to call things bugs in frameworks like this as I usually find the reason or solution as soon as I do. Depending on what you want to do when focus is lost and gained, I think you can find a pattern of events to identify this situation. For example, clicking between cells causes: GotFocus, CurrentCellChanged, LostFocus However in the scrolling scenario: Leave, Validating, Validated

    .NET (Core and Framework) csharp visual-studio graphics docker help

  • Dynamically determine server to use Web Service
    J John Arlen

    There is a Url property to a Web Service. localhost.Service1 tService = new localhost.Service1(); tService.Url = "http://www.GoThere.com/Service1/";

    .NET (Core and Framework) csharp sysadmin windows-admin question

  • How do I remove a class or anything from the .NET ide?
    J John Arlen

    To be honest, I never use the Class Viewer - working directly in Solution Explorer. From Solution Explorer, you can delete files, and assuming you follow standard practice of 1 class per file, this should do the same thing.

    .NET (Core and Framework) question csharp visual-studio announcement

  • C# Class Library and VS.NET standard
    J John Arlen
    1. Create a new Windows Application Project 2) Right-click the project in Solution Explorer 3) Select Properties 4) In General -> Change Output Type from Web Application to Class Library This will build a DLL. Now you can remove the Form1.cs if desired, and add classes. Edit: Hmm... didn't see the dozen responses before I replied. Oh well.
    C# csharp visual-studio help tutorial question

  • DoubleClick in TreeView
    J John Arlen

    Solution de Uberness: ----------------------------------------------- using System; namespace UberControls { public class TreeViewNonExpanding : System.Windows.Forms.TreeView { private bool incomingDoubleClick = false; protected override void WndProc(ref System.Windows.Forms.Message m) { switch( m.Msg ) { case 0x0203: // WM_LBUTTONDBLCLK this.incomingDoubleClick = true; break; case 0x0202: // WM_LBUTTONUP this.incomingDoubleClick = false; break; default: break; } base.WndProc (ref m); } protected override void OnBeforeExpand(System.Windows.Forms.TreeViewCancelEventArgs e) { if( incomingDoubleClick == true ) e.Cancel = true; base.OnBeforeExpand (e); } } }

    .NET (Core and Framework) tutorial question

  • Get Version Number.
    J John Arlen

    The code you have should work perfectly. AssemblyVersion("*") isn't valid however. I actually got a compiler error when I tried to use it. The asterisk in the default tells the compiler to automatically increment the version as you build.. 1.0.4.3333 1.0.4.3334 ...etc... Use AssemblyVersion("1.0.*") or specify the full version ("1.0.0.0") If you debug your web service, do you also see 0.0.0.0 returned to string sValue?

    .NET (Core and Framework) csharp com help question announcement

  • Simple XPath Question
    J John Arlen

    You have the right idea, but it depends on your actual XML. I suggest getting the node directly and looking at it. This will help answer your question. DogCat XmlNode node = doc.SelectSingleNode("//Prenom"); node.Value == null node.InnerText == "Dog"

    C# xml question help tutorial

  • Type.GetType("System.Drawing.Color") returns null?!
    J John Arlen

    You don't need to iterate... you know it belongs in System.Drawing. Assembly a = Assembly.LoadWithPartialName("System.Drawing"); Type t = a.GetType("System.Drawing.Color"); ...will do the job

    C# graphics help 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