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

ABean

@ABean
About
Posts
23
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • using System.Runtime.Serialization.Formatters.Soap;
    A ABean

    I get the following message: The type or namespace name 'Soap' does not exist in the class or namespace 'System.Runtime.Serialization.Formatters' (are you missing an assembly reference?) On this line here: using System.Runtime.Serialization.Formatters.Soap; What am I missing or has something chnaged in .NET 1.1? (I'm trying to use the BaseSerializable class in this article: http://codeproject.com/soap/soapseraialize.asp )

    C# csharp wcf com xml json

  • Pretty Weird Request Here...
    A ABean

    Sorry, chief. I reread it and I still don't see where I went wrong; I did what the guy asked. I hope your solution below is what he needs.

    C# visual-studio csharp com debugging question

  • Pretty Weird Request Here...
    A ABean

    I just downloaded it and it compiles without any errors for me (VS.NET 2003) in both debug and release.

    C# visual-studio csharp com debugging question

  • form load and Resize event
    A ABean

    I have a Resize method that I want called only when the user changes the size of the form. But when I Load that form for the first time I notice that the resize event gets called. Is there some way to prevent this?

    C# question

  • releasing PictureBox's Image file handle
    A ABean

    Got it. Thanks. ------------------ pictureBox1.Image= Image.FromFile(MyFile); pictureBox1.Image.Dispose(); pictureBox1.Image = Image.FromFile(AnotherFile); System.IO.File.Delete(MyFile);

    C# question announcement

  • releasing PictureBox's Image file handle
    A ABean

    In the code below I load an image into a PictureBox using the Image.FromFile method. When I am done with that image I would like to release it so that I can delete it from the hard drive. However, even after I set the PictureBox's Image property to another image I still can not delete it. Obviously my process still has a handle to the file but I can't find a way to release that handle. I tried looking through the methods and properties of pictureBox1.Image but I did not see anything that looked useful. Any ideas? ------------------ pictureBox1.Image= Image.FromFile(MyFile); pictureBox1.Image = Image.FromFile(AnotherFile); System.IO.File.Delete(MyFile); //This fails becuase MyFile is "in use by another process"

    C# question announcement

  • how to scrolling through "stacked" images?
    A ABean

    Does a control exist where I can load it with any number of images (one on top of the other) and then vertically scroll through them for viewing? My images will all be the same width but not the same height. I was thinking to host a webpage in my app and have local tags for the images but I don’t want the overhead. Any other ideas you would be great to have. Thanks!

    C# tutorial question

  • Inserting SQLSever rows
    A ABean

    What is the easiest what to load 4000 rows into a SQLSever db from a C# program? The C# rows are in an ArrayList. And the "scheme" is very simple [string, date, decimal, decimal, integer]. I’m looping threw the array, right now, and doing an insert for each row but I’m wondering if there is some way I can do this in bulk? I think BCP would be overkill in this case, so, I'm just wondering if there is something in ADO.NET that might handle a "large" number if inserts.

    C# csharp question database data-structures

  • Unsubscribing from an event
    A ABean

    I have an instance of class A that publishes an event and several instances of class B that subscribe to it. How can I get a B instance to UNsubscribe from the event?

    C# question

  • DataGrid "logical" row from HitTest
    A ABean

    I did some more reading and it looks like I need to put a primary key column on my table - and then I guess I will hide it. But even if I add the primary key column how do I resolve the HitTest Row number from the DataGrid into a DataTable row number?

    C# css question

  • DataGrid "logical" row from HitTest
    A ABean

    Thanks Heath, I'm binding to a DataTable. I've looked at the DefaultView property as well as the other properties of the DataTable but I am unsure how to translate the HitTest Row number from the DataGrid into a row number of the DataTable. I need to get the DataTable row number integer not to update the actual row in the control but to update an associated array. (DataTable row number is the index into the array.) I looked at the Find property but the rows displayed in the table are not unique. It this translation possible?

    C# css question

  • DataGrid "logical" row from HitTest
    A ABean

    Guys, On the datagrid when you do a HitTest you get the "physical" row that the mouse is over. If the user has sorted the grid (by clicking on one of the column headers) and changed the order of the rows is there a way to get the "logical" row from the "physical" row? Thanks

    C# css question

  • DataGrid, Generic GDI+ errors, and a Big Red X
    A ABean

    I ran into a similar problem before. I understood that I had to update the control on the thread that created it and I wrote a queue mechanism to do this. However, I was surprised to see that the asynchronous callback from the event ran on different thread. (Now its obvious but it was unclear to me then.) Try setting the thread name property on the form where you create your datagrid. Then do a simple debug assert against this thread name property in the asynchronous callback to ensure that you are updating your datagrid on the correct thread. This will at least tell you whether or not your async callback is on the same thread. (My guess is that it isn’t but I’m still new to this .Net stuff) //Place this in the form init Thread.CurrentThread.Name ="UI thread"; //Place this in the async callback Debug.Assert(Thread.CurrentThread.Name =="UI thread"); Heath’s recommendation about Invoke is sound advice.

    C# help question winforms graphics data-structures

  • C#'s sprintf
    A ABean

    Heath, I just read your article; thanks for posting it. It brings together all the MSDN articles that I had read and the ones that I missed and it cuts straight to the point. Thanks again.

    C# question csharp

  • C#'s sprintf
    A ABean

    Thanks Heath, You beat me to my post below. :)

    C# question csharp

  • C#'s sprintf
    A ABean

    I think I got it. . . Its done by passing args to the ToString() method.

    C# question csharp

  • C#'s sprintf
    A ABean

    Is there an equivalent to sprintf in C#? Basically I have some C# "value types" (floats, decimals) that I would like to format into a string variable. Also, I have a DateTime variable that I would like to format into a string variable. What is the best way to do this? Thanks.

    C# question csharp

  • Determining app close by User or Windows
    A ABean

    I have a C# Windows Form that contains the logic to display an icon in the systray. I have that form hidden (visible = false). When the user clicks the systray icon I unhide the form (visible = true) to allow the user to change some settings. When the user finishes changing the settings he can click the close button (the X in the top right corner). In the frm.closing event I have this: this.Visible = false; e.Cancel = true; That code will hide the form for later use and it keeps the application from exiting. Life is good UNTIL the user goes to shutdown the computer. During the shutdown process Windows goes to close my application; but my app sends Windows the Cancel signal and so Windows never shuts down. I’m about ready to hack something up with WndProc but I was hoping there might be some way to tell if whether my app is being closed by Windows or by a click of the close button (the X in the top right corner). Thanks.

    C# csharp

  • adding a C file to a CPP proj
    A ABean

    Is it possible to do that for a single file in VC7? MSDN seems to indicate that the only way to do this would be to stick it in its own sub-project. In any case I would rather not change ANY environment settings because this is for inclusion into an open source project that can be compiled on many platforms/compilers. Renaming it to CPP seems to be the easy way out. It’s just a collection of functions so I really can’t see how it would hurt. But thought it would be good to check with you guys first.

    C / C++ / MFC c++ help

  • adding a C file to a CPP proj
    A ABean

    I added a C file to a CPP proj and got an error complaing about the precompiled header thing. MSDN says I should create a subproject and stick the file in that. However, I would rather not create a new sub project for a number of reasons. As a solution, I found that I could rename the .c to .cpp and get it to compile file. Everything works but I'm wondering if there is a ticking time bomb just waiting to happen after this program goes into production. Thanks, Al

    C / C++ / MFC c++ help
  • Login

  • Don't have an account? Register

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