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
H

HexaDeveloper

@HexaDeveloper
About
Posts
52
Topics
19
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • saving image from screen
    H HexaDeveloper

    hi Bitmap workSpaceBitmap = new Bitmap(tabctrlMain.SelectedTab.Width, tabctrlMain.SelectedTab.Height); tabctrlMain.SelectedTab.DrawToBitmap(workSpaceBitmap, tabctrlMain.SelectedTab.Bounds); workSpaceBitmap.Save("c:\\image.jpeg", ImageFormat.Jpeg); i write this code and thanx very much for ur help(DrawToBitmap u told me about it) thanx alot but one question if there is a scroll bar is this code will draw disappeared parts of screen to image or not Generator

    C# graphics question

  • saving image from screen
    H HexaDeveloper

    sorry, but can i have some explanation i want to draw some objects in image then save this image in disk the save is not a problem thanx Generator

    C# graphics question

  • saving image from screen
    H HexaDeveloper

    ok what about if i want to draw in empty image by my self dawing some images and some shapes thanx Generator

    C# graphics question

  • saving image from screen
    H HexaDeveloper

    hi all how can i use the graphics object of the form to store its contents as an image thanks Generator

    C# graphics question

  • icon
    H HexaDeveloper

    hi all i save a file in my program in an extension that i made so i wanna this file to have the icon of my program how can i make it thanx Generator

    C# question

  • MultiThreading
    H HexaDeveloper

    led mike wrote:

    If "simulate()" is painting you can't do that from a worker thread

    hi can u explain this statement , in simulate i called movePacket() and this method returns new points for the packet and i draw it in onPaint() and actually i want to ask what is the meaning of not safe to use simulationIndex thanx Generator

    C# help

  • MultiThreading
    H HexaDeveloper

    hi all, i made this code to make multithreads for one method and every thread take one packet to move but it didnot work, Is there any error in this code private void btn_simulate_Click(object sender, EventArgs e) { for (int i = 0; i < lineArray.LineList.Count; i++) { /// Assign a method to thread to execute packetsMovingThreadArray.Add(new Thread(threadProcedure)); dataPacketsArray.Add(new Packet()); } this.btn_simulate.Enabled = false; this.btn_stop.Enabled = true; movingPacketThreadFlag = true; for (int i = 0; i < lineArray.LineList.Count; i++) { ((Thread)packetsMovingThreadArray[i]).Start(); } } int simulationIndex = -1; private void threadProcedure() { simulationIndex++; Packet pack = ((Packet)dataPacketsArray[simulationIndex]); AdHocMobility.simulate(ref pack,((Line)lineArray.LineList[simulationIndex]), this); } /// /// Abort the Thread of painting /// private void btn_stop_Click(object sender, EventArgs e) { try { this.btn_stop.Enabled = false; this.btn_simulate.Enabled = true; packetsMovingThreadArray.Clear(); foreach (Thread Th in packetsMovingThreadArray ) { Th.Abort(); } simulationIndex = -1; movingPacketThreadFlag = false; Invalidate(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } thanks Generator

    C# help

  • Export data to excel sheet
    H HexaDeveloper

    Hi, thanx for ur help ur information make me make it successfully thanx alot Generator

    C#

  • Export data to excel sheet
    H HexaDeveloper

    hi all, l made a class and i want to export its values stored in members data to an excel file can any one give me a beginning my class like static class Export { private static ArrayList arrivalRate = new ArrayList(); private static ArrayList customersNo = new ArrayList(); } and i wanna to make member data is the header of the row and the values in the arraylist are in squence in the adjacent cells. also i wanna to ask about automatic documentation, i used SandCastle but i cannot deal correctly with it, so can any one give me a program that only executable file i give it the file path only like what happened in javadoc.exe thanx Generator

    C#

  • Export data [modified]
    H HexaDeveloper

    hi all, l made a class and i want to export its values stored in members data to an excel file can any one give me a beginning my class like static class Export { private static ArrayList arrivalRate = new ArrayList(); private static ArrayList customersNo = new ArrayList(); } and i wanna to make member data is the header of the row and the values in the arraylist are in squence in the adjacent cells. thanx Generator

    C#

  • .NET documentor
    H HexaDeveloper

    hi all , i have an open source program from microsoft corporation (called .Net documentor)this program is an automatic documentor but it have alot of files and i cant use it can any one tell me how to use it and if there is another program that is easier or best or both together Generator

    C# csharp tutorial

  • Drawing line in running time [modified]
    H HexaDeveloper

    hi , my problem is that i donot know how to use XOR mode in drawing line Generator

    C# graphics tutorial

  • Drawing line in running time [modified]
    H HexaDeveloper

    hi all, i write this code to draw line by mouse and the drawline method is in the onPaint() method,this code is working properly but has two problems so is there any other idea to code it private void mainScreen_MouseMove(object sender, MouseEventArgs e) { /// Determine the End point of the line if (lineFlag == 1 && !(mLineBeginPnt.IsEmpty) && nextLineFlag == 1) { Graphics grfx = this.CreateGraphics(); Pen pen = new Pen(mainScreen.DefaultBackColor, 2); userInterface.handleMouseMove(grfx, ref lastPntOfLine, ref lastPntCounter, pen, ref mLineEndPnt, mLineBeginPnt, e.Location); pen.Dispose(); grfx.Dispose(); Invalidate(drawingFrame); } } ---------------------------------------- public void handleMouseMove(Graphics grfx,ref Point lastPntOfLine, ref int lastPntCounter, Pen pen, ref Point mLineEndPnt, Point mLineBeginPnt, Point location) { if (lastPntCounter == 0) { lastPntOfLine = location; lastPntCounter++; } else grfx.DrawLine(pen, mLineBeginPnt, lastPntOfLine); mLineEndPnt = location; Pen p = new Pen(Color.Black, 2); grfx.DrawLine(p, mLineBeginPnt, mLineEndPnt); lastPntOfLine = location; grfx.Dispose(); pen.Dispose(); p.Dispose(); } what i made in this code is that i determine the last line drawen by nouse by getting its begin and end points from line object that i have then draw this line by background color to hide it and draw new line with black color to seen by user (this code is an alternative for using XOR mode, if any one know how to use it with drawing lines please tell me) thanks Generator -- modified at 4:12 Tuesday 8th May, 2007

    C# graphics tutorial

  • custom double buffering [modified]
    H HexaDeveloper

    hi all, first thanx for ur help second a friend to me solve our problem of double buffered as follows class customTabPage : TabPage { customTabPage():base() { this.DoubleBuffered = true; } } Generator

    C# graphics

  • custom double buffering [modified]
    H HexaDeveloper

    hi , ok i looked at the generated code but i use setstyle before and no change on tab just change on form so what can i do explain please "Iam sorry but i didnot get the point" Generator -- modified at 3:35 Saturday 5th May, 2007 Generator

    C# graphics

  • custom double buffering [modified]
    H HexaDeveloper

    hi , i can not find a method called LoadControl() thanx Generator

    C# graphics

  • custom double buffering [modified]
    H HexaDeveloper

    public void tab_Paint(object sender, PaintEventArgs e) { TabPage tab = (TabPage)sender; BufferedGraphicsContext context; BufferedGraphics buffer; // context = BufferedGraphicsManager.Current; /// Dedicated context /// used when highly animated graphics context = new BufferedGraphicsContext(); Graphics grfx = e.Graphics; buffer = context.Allocate(grfx, tab.ClientRectangle); // draw to the buffer drawSurfaceToBuffer(buffer.Graphics); // draw the buffer to the screen buffer.Render(grfx); buffer.Dispose(); grfx.Dispose(); } public void drawSurfaceToBuffer(Graphics bufferGrfx) { /// some processing that used the buffer grfxs } this code i understand it from MSDN and write it to reduce Graphics Flicker but it does not make any thing at all also it make my background of tabpage black and the original is white is there any suggestions please Generator -- modified at 10:59 Tuesday 1st May, 2007

    C# graphics

  • new Double Buffering
    H HexaDeveloper

    public void tab_Paint(object sender, PaintEventArgs e) { TabPage tab = (TabPage)sender; BufferedGraphicsContext context; BufferedGraphics buffer; // context = BufferedGraphicsManager.Current; /// Dedicated context /// used when highly animated graphics context = new BufferedGraphicsContext(); Graphics grfx = tab.CreateGraphics(); buffer = context.Allocate(grfx, tab.ClientRectangle); drawSurfaceToBuffer(buffer.Graphics); buffer.Render(grfx); buffer.Dispose(); grfx.Dispose(); } public void drawSurfaceToBuffer(Graphics bufferGrfx) { /// some processing that used the buffer grfxs } this code i understand it from MSDN and write it to reduce Graphics Flicker but it does not make any thing at all also it make my background of tabpage black and the original is white is there any suggestions please Generator

    C# graphics performance tutorial

  • new Double Buffering
    H HexaDeveloper

    hi, i tried this but the tabPage doesnot contain method setStyle iam making a method now to use BufferedGraphics, BufferedContext,BufferedManager to draw to buffer then draw to TabPage but iam still trying this and also if there is any method easier thanx Generator

    C# graphics performance tutorial

  • new Double Buffering
    H HexaDeveloper

    hi all i made double buffering in a form with this.DoubleBuffering = true; but this is not working in the tab so i wanna to know how to make double buffering by using Bitmap to enhance performance by drawing in memory as bitmap and then draw my background in the bitmap and draw bitmap again to the screen can any one tell me how to begin search how to use this technique thanx Generator

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