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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
W

WinSolution

@WinSolution
About
Posts
43
Topics
13
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • urgent help pleasse [image processing , pointers , byte ]
    W WinSolution

    Thanks both problem solved i was not handling exception and not i placed that code outside of the loops as follow public Bitmap GrayScale(Bitmap bmpimg) { BitmapData bmpData = bmpimg.LockBits(new Rectangle(0, 0, bmpimg.Width, bmpimg.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb); int remain = bmpData.Stride - bmpData.Width * 3; unsafe { byte* ptr = (byte*)bmpData.Scan0; int div = 1; try { div = Convert.ToInt32(textBox1.Text.Trim()); } catch (Exception ex) { MessageBox.Show(ex.Message); } for (int i = 0; i < bmpData.Height; i++) { for (int j = 0; j < bmpData.Width; j++) { ptr[0] = ptr[1] = ptr[2] = (byte)((ptr[0] + ptr[1] + ptr[2]) / div); ptr += 3; } ptr += remain; } } bmpimg.UnlockBits(bmpData); return bmpimg; }

    C# help graphics

  • urgent help pleasse [image processing , pointers , byte ]
    W WinSolution

    Hi Everyone please look at following two line this is not working when i execute my prject int div = Convert.ToInt32(textBox1.Text.Trim()); ptr[0] = ptr[1] = ptr[2] = (byte)((ptr[0] + ptr[1] + ptr[2]) / div); but if i remove the first line and enter an integer value in place of div variable it works such as following line. ptr[0] = ptr[1] = ptr[2] = (byte)((ptr[0] + ptr[1] + ptr[2]) / 3); Following is the full listing may it help you to figurout the problem a method that convert a bitmap from colored to grayscale ////////////////////////////////////////////////////////////////////////// public Bitmap GrayScale(Bitmap bmpimg) { BitmapData bmpData = bmpimg.LockBits(new Rectangle(0, 0, bmpimg.Width, bmpimg.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb); int remain = bmpData.Stride - bmpData.Width * 3; unsafe { byte* ptr = (byte*)bmpData.Scan0; for (int i = 0; i < bmpData.Height; i++) { for (int j = 0; j < bmpData.Width; j++) { int div = Convert.ToInt32(textBox1.Text.Trim()); ptr[0] = ptr[1] = ptr[2] = (byte)((ptr[0] + ptr[1] + ptr[2]) / div); ptr += 3; } ptr += remain; } } bmpimg.UnlockBits(bmpData); return bmpimg; }

    C# help graphics

  • Updating changings back to DB from DataGridView
    W WinSolution

    Thanks But i need an example that is based on 3-Tire Architecture.(GUI, BusinessLogic, DataAccess) i have tried such code with 3-Tire Arch. but it cause an error like "DataTable already belongs to another DataSet".

    C# database

  • Updating changings back to DB from DataGridView
    W WinSolution

    Dear All I want to updated the changes made in DataGridView back to SQL Table in an easiest way while i am working with 3-Tire approach (GUI, BusinessLogic, DataAccess) I have search a lot on Google but i am not able to find a good,simple and easy solution. Thanks for helping.

    C# database

  • find files
    W WinSolution

    i have sent a mail also to you i was in hurry so without subject

    C# question

  • find files
    W WinSolution

    here is it download it http://rapidshare.com/files/238592801/WindowsApplication1.rar.html[^]

    C# question

  • find files
    W WinSolution

    If there is way so i can send you the project just replace the path, recompile, run the project. put expression and click on the button. list will be displayed. It is working on my PC.

    C# question

  • find files
    W WinSolution

    Just open visual studio 2005 / latest add one button (to intiate click event ), one textbox (contains expression you want to search ), and one listbox to show the results add click event on Button1 by double clicking on it and paste following code //replace mine path with your own DirectoryInfo DirInfo = new DirectoryInfo(@"F:\Documents and Settings\Administrator\My Documents\"); FileInfo[] DirFiles = DirInfo.GetFiles(textBox1.Text, SearchOption.AllDirectories); listBox1.Items.Clear(); foreach (FileInfo FileObj in DirFiles) { listBox1.Items.Add(FileObj); } goto top of file and add a namespace >> using System.IO; press F5 and run insert expression to search. click on button. result will be displayed to list box. if this doesnot work the provide me email address i will mail my project to you

    C# question

  • executing code in a textbox on runtime
    W WinSolution

    Thanks for your valuable contribution. both (Searril & molesworth ) Yes that is possible but as this data is going to be update in central tracker and is copy pasted from excel file and there are chances that it can break my algorithm in some conditions when data is not provided to me in expected format. so i want to confirm it once time by watching it. another point ; i am generating code to avoid loop in case i don't generate code i have to go through each line and apply my algo on it and then to send update to tracker and i cannot also verify it visually. so it will be best solution to the problem if i can rum my code at runtime in my opinion else there are 101 way to do it.

    C#

  • executing code in a textbox on runtime
    W WinSolution

    Yes you are right i dont want to compile but only execute. but pasting it at desired place where currently i paste it manually ignore the last line if you are not able to understand its about sequence/placement of auto. generated code.

    C#

  • executing code in a textbox on runtime
    W WinSolution

    I am working in an organization in which i update the record to a central tracker. Mostly data provided to me is in Excel. I pick the data from excel paste it into first TextBox. Data cosist of Two Columns as mentioned below ________________________ Site ID | DN Received | ------------------------ MDWH2813 | 10-May-08 | MDWH2814 | 10-May-08 | MDWH2739 | 10-May-08 | ------------------------ i will copy data excluding the header area from the upper section and paste it into 1st textbox that looks like as follow MDWH2813 10-May-08 MDWH2814 10-May-08 MDWH2739 10-May-08 Then i click on a button and i generates a C# code as under and set as text on 2nd TextBox updateCentralTracker("MDWH2813","10-May-08"); updateCentralTracker("MDWH2814","10-May-08"); updateCentralTracker("MDWH2739","10-May-08"); currently i copy the generated code from 2nd TextBox. copy it to my solution and rebuild & execute and then i click on the second button that executes the code and data is updated to the Central Tracker. but i want when i generate the code on first run then i click on the second button and it should run that code at run time i hope its now understandable let me know if any query

    C#

  • executing code in a textbox on runtime
    W WinSolution

    Dear I have explained my problem as best as i can. I was meant to say that i was able to explain better if there was a support of pasting image Rajesh : did you start reading my post from bottom :-D

    C#

  • executing code in a textbox on runtime
    W WinSolution

    I am creating a project it contains two textbox. In first TextBox i paste text from an excel sheet. On click of button it generates some code set it to text property of Second TextBox. currently i compile & excute project, generate code and then i paste to my project and then again i compile & execute project again to run this code. As i can't past the screen shot of that here else i can explain it well anyway if any body want to discuss i am available

    C#

  • [Message Deleted]
    W WinSolution

    here is the logic . convert it to C# code. Button Button1; // by default button text will be On bool btn_status = true; public void Button1_Click() if(btn_status) { //put query here to write A Button1.Text = "Off"; btn_status = !btn_status; //! Operator will alter boolean value of btn_status } else { //put query here to write a Button1.Text = "On"; btn_status = !btn_status; }

    C#

  • How can i write a problem so the webpages comes to me
    W WinSolution

    if i am right. you want to open some web pages automatically when you run your application for example you want to open following pages through your application just runnging your single application 1. yahoo mail 2. codeproject website 3. google

    C# help question

  • Desktop Calender Repost
    W WinSolution

    Nice Idea to calculate the Location on desktop. But i want to bound the calender application object added to Windows Desktop Object in such a way that it behave like icons on desktop. so that when all applications in Taskbar are minimized my application still will be visible on desktop Basic thing i want is access to desktop and put my calender object into that.

    C# help

  • Desktop Calender Repost
    W WinSolution

    Thanks For Giving Idea But i am talking to put calender on desktop not on the form's right. On desktop where icons will be on left side and my calender on right side hope u understand what i want.

    C# help

  • Desktop Calender Repost
    W WinSolution

    I want to display a calender on desktop [right side] if any one can help me helping link Please keep following points in mind - application will be running in background. [at startup] - icon will be in Tray no tab in Task bar. when double clicked then in Task Bar. Thanks

    C# help

  • Desktop Calander [modified]
    W WinSolution

    Dear Both I am going to built a reminder application in which i have to display a calendar on desktop that's why i ask for help thanks

    C# help

  • how to watch on a directory
    W WinSolution

    How to watch on directory let say "C:\windows\temp". I want to log; by whom and when it is accessed , some thing new created. Thanks.

    C# tutorial
  • Login

  • Don't have an account? Register

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