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 Arlen1

@John Arlen1
About
Posts
14
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Getting returns from a messagebox
    J John Arlen1

    When all else fails, study the documentation. http://msdn2.microsoft.com/en-us/library/0x49kd7z.aspx[^] Their sample code answers your question.

    C# question

  • Anyone know how to set the listview forecolor and backgroundcolor?
    J John Arlen1

    I do not have access to a dev system at the moment, but MSDN indicates that ListView.ForeColor and ListView.BackColor are supported by the Compact Framework. If this is true, then... myListView.ForeColor = Color.Red; myListView.BackColor = Color.Blue; ListViewItem item = myListView.Items.Add("Item1"); item.ForeColor = Color.Green; item.BackColor = Color.Cyan;

    .NET (Core and Framework) csharp help tutorial question

  • differently colored strings
    J John Arlen1

    ListViewItem item1 = myListView.Items.Add( "Item1" ); ListViewItem item2 = myListView.Items.Add( "Item1" ); item1.ForeColor = Color.Red; item2.ForeColor = Color.Blue;

    .NET (Core and Framework) question csharp

  • Determine if .NET Framework is installed
    J John Arlen1

    If you are using Windows Installer, it can detect and automatically install the framework if needed, (as David mentioned). You'll need the upgraded bootstrapper for it to work properly: http://support.microsoft.com/default.aspx?scid=kb;en-us;888469[^] If you are talking about something else, then you're probably talking about a non-.NET program to determine what exists: http://astebner.sts.winisp.net/Tools/detectFX.cpp[^]

    .NET (Core and Framework) csharp dotnet question announcement

  • Docking ToolBar
    J John Arlen1

    Here is an article describing one way to do it: http://www.codeproject.com/cs/menu/ToolBarDock.asp[^]

    C# tutorial question

  • how to intercet ondraw event?
    J John Arlen1

    Yes, deriving a class from TextBox will let you handle the OnPaint and OnPaintBackground events yourself. However, creating a transparant textbox is a much more difficult endeavor than that. Two articles that offer solutions to this are: http://www.codeproject.com/cs/miscctrl/alphablendtextbox.asp[^] and http://www.codeproject.com/cs/miscctrl/TransparentTextBox.asp[^]

    C# tutorial question

  • Transferring image from webservice to PPC
    J John Arlen1

    Make sure to extract the bytes of the image to transfer. (And base64 that array) public Image GetImageFromBytes( byte[] bytes ) { MemoryStream stream = new MemoryStream(bytes); Image image = Image.FromStream( stream ); return image; } public byte[] GetImageBytes(Bitmap bitmap) { MemoryStream stream = new System.IO.MemoryStream(); bitmap.Save( stream, System.Drawing.Imaging.ImageFormat.Jpeg ); stream.Position = 0L; System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); byte[] bytes = reader.ReadBytes( (int)stream.Length ); stream.Close(); return bytes; }

    C# graphics help question

  • Zooming Using Matrices....
    J John Arlen1

    You are not zooming the image itself. Instead, you are telling the view (Graphics) how to render the image. This is the advantage of using Transforms... drawing code does not change. Just the parameters of the rendering. Derive a class from PictureBox (or control type of choice...) and modify the OnPaint routine appropriately. public class ZoomPictureBox : PictureBox { private float m_zoom = 1.0F; public float Zoom { get{ return m_zoom; } set{ m_zoom = value; if( this.Image != null ) Invalidate(); } protected override void OnPaint(PaintEventArgs e) { Matrix matrix = new Matrix(); matrix.Scale( m_zoom, m_zoom ); e.Graphics.Transform = matrix; e.Graphics.DrawImageUnscaled( this.Image, 0, 0 ); // base.OnPaint (e); } }

    C# graphics csharp winforms question

  • XmlNodes in a ListBox and junk...
    J John Arlen1

    For any item added to a ListBox, the text returned by .ToString() is displayed. The simplest solution is to create a wrapper class that overrides ToString() public class NodeItem { private XmlNode m_node; public XmlNode Node {...} public NodeItem(XmlNode node) { m_node = node; } public override string ToString() { return m_node.InnerText; } } myListBox.Items.Add( new NodeItem(myNode) );

    C# xml help question

  • Custom toolbar control in .Net framework
    J John Arlen1

    It is indeed a much-desired and discussed functionality. However, free solutions are not as common. https://secure.codeproject.com/cs/menu/ToolBarDock.asp and http://www.vbaccelerator.com/home/VB/Code/Controls/Toolbar/vbAccelerator_Office_Docking_Bar/article.asp offer source code for some. Additionally, you will find many 3rd party controls for purchase. Do a google search for "Office Toolbar Docking" and you'll see just how many.

    .NET (Core and Framework) csharp dotnet help tutorial discussion

  • Problem with GetTextExtentPoint32
    J John Arlen1

    GetTextExtents tells you the physical dimensions a string will require when graphically rendered on the specified DC using the specified font. .NET offers a similar method in Graphics.MeasureString(). The most obvious question is "What are you trying to do? Under what environments?" I'm not sure what value this API offers in a web application.

    .NET (Core and Framework) help csharp graphics json

  • Need A help
    J John Arlen1

    That error happens when you are trying to perform an action like assigning an Int32 to an Int16 type. Check the code for areas where you are not using the right variable type. Without the exact code, however, I can't be much more specific.

    IT & Infrastructure help question

  • Auto Update on Control
    J John Arlen1

    Look at System.IO.FileSystemWatcher. This class exposes events that will let you know when certain file system changes have happened. This is exactly what Folder Browser Dialog uses (under the covers).

    C# announcement

  • my application in system tray on windows startup
    J John Arlen1

    Two different questions: 1) Icon in system tray: System.Windows.Forms.NotifyIcon is the class (and sample) you want. 2) Running on windows start: I don't know of any API for this but adding a registry key for your application will do: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run String Key: AppName Value: Full Path to Exe

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