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
F

fjlv2005

@fjlv2005
About
Posts
47
Topics
27
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • C# Excel Chart Series Option (Change Second Plot value)
    F fjlv2005

    I finally got the solution :

                ChartGroup gp = (ChartGroup)obj.Chart.ChartGroups(1);
                gp.SplitValue = 3;
    

    I replied to my mail so that this may serve as help also to others. Thanks for the effort of those who tried to response.

    C# csharp com help tutorial question

  • C# Excel Chart Series Option (Change Second Plot value)
    F fjlv2005

    Hi, How can we change the Excel Chart Series Option (Second Plot last value) in C#? Here is the picture in Excel http://www.flickr.com/photos/31464532@N02/2948659930/ Here is my code..

                ChartObjects chartObjects = (ChartObjects)activeSheet.ChartObjects(Type.Missing);
                Range range = activeSheet.get\_Range(cellStart, cellEnd);
                ChartObject obj = null;
                obj = chartObjects.Add(leftLocation, topLocation, chartWidth, chartHeight);
                obj.Chart.SetSourceData(range, XlRowCol.xlColumns);
                obj.Chart.HasTitle = true;
                obj.Chart.ChartTitle.Text = title;
                obj.Chart.ChartTitle.Font.Bold = true;
                
                
                obj.Chart.ChartType = XlChartType.xlBarOfPie;
                Series series = (Series)obj.Chart.SeriesCollection(1);
                **// Here Dont know how to access the Formatting Option - Second Pot Last Value :confused:**
    
                obj.Chart.ApplyDataLabels(XlDataLabelsType.xlDataLabelsShowLabelAndPercent, //XlDataLabelsType Type, 
                                                    Type.Missing,        //LegendKey, 
                                                    Type.Missing,        //AutoText, 
                                                    Type.Missing,        //HasLeaderLines, 
                                                    Type.Missing,        //ShowSeriesName, 
                                                    Type.Missing,        //ShowCategoryName,
                                                    Type.Missing,           //ShowValue, 
                                                    Type.Missing,        //ShowPercentage, 
                                                    Type.Missing,        //ShowBubbleSize, 
                                                    Type.Missing);
    

    It seems not easy to find article for this one, so if somebody can help i would really appreciate it. Thanks

    C# csharp com help tutorial question

  • C# ListBox Justify Text
    F fjlv2005

    Good day, I want to justify the text in my listbox. I've try to insert items in which both have the same length however the amount area won't align considering both items have the same length. How can I make the listbox justify its items so that both amount are on the right edge? Here is the code that i've tried but items arent justified: private void Form1_Load(object sender, EventArgs e) { string stramount1 = "900.00"; string stramount2 = "3400.00"; string description1 = "Basic Salary......................"+stramount1; string description2 = "Basic Salary....................."+stramount2; listBox1.Items.Add(description1); listBox1.Items.Add(description2); } thanks.

    C# question csharp career

  • UserControl
    F fjlv2005

    Good day, I have a form, i've set the BackColor to Black and also the transparency to Black. then on the form a UserControl which has a gradient backcolor. Inside the UserControl i've put two basic controls(Label1 and Button1). I've set the BackColor of Label1 and Button1 to Transparent. What happened is that the Label1 and Button1 transparency goes through the form itself. See Link Below: http://www.geocities.com/fritzjeran/Sample.JPG What I really wanted is that when i set the BackColor of the Label1 and Button1 to transparent, I goes through ONLY up to the UserControl (i.e what should appear is the gradient color of usercontrol on the area that is overlapped by label1 and Button1). How should I fix this?:(( Here is the code of my Usercontrol:

    public partial class BaseControl : UserControl
    {
        public BaseControl()
        {
            InitializeComponent();
            SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.EnableNotifyMessage, true);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            if (this.BackgroundImage == null)
            {
                Rectangle rect = new Rectangle(0, 0, Width, Height);
                LinearGradientBrush b = new LinearGradientBrush(rect, Color.White, Color.Blue, 90);
                GraphicsPath path = GraphicsPathUtility.GetRoundRectPath(rect, 10);
                e.Graphics.FillPath(b, path);
            }
            base.OnPaint(e);
         }
    }
    
    #region Utility Classes
    public class GraphicsPathUtility
    {
        private GraphicsPathUtility()
        {
        }
        public static GraphicsPath GetRoundRectPath(RectangleF rect, float radius)
        {
            return GetRoundRectPath(rect.X, rect.Y, rect.Width, rect.Height, radius);
        }
        public static GraphicsPath GetRoundRectPath(float X, float Y, float width, float height, float radius)
        {
            GraphicsPath gp = new GraphicsPath();
            gp.AddLine(X + radius, Y, X + width - (radius \* 2), Y); //
            gp.AddArc(X + width - (radius \* 2), Y, radius \* 2, radius \* 2, 270, 90);//
            gp.AddLine(X + width, Y + radius, X + width, Y + height - (radius \* 2));
            gp.AddArc(X + width - (radius \* 2), Y + height - (radius \* 2), radius \* 2, radius \* 2, 0, 90);
            gp.AddLine
    
    C# com graphics tools help question

  • User Control [modified]
    F fjlv2005

    The reasoN why i want to create a usercontrol that is derived from a form because i want to create customable panel, that can be minimize or maximize. i've made a usercontrol which is derived from Panel but the problem is when the backcolor of the control is transparent and that control is placed inside my usercontrolpanel, the transparency goes through all the way to the form, that is why i thought i should derived my usercontrol from a form. Please refer to the image linke below for sample output of my usercontrol: http://www.geocities.com/fritzjeran/SAMPLEOUTPUT.JPG Any suggestion is appreciated. Thanks.

    C# question

  • User Control [modified]
    F fjlv2005

    Good day, How can I make a UserControl inherits from a Form? I've tried to do this:

    public partial class UserControl1 : Form
    {
    ..
    }

    But when I add a the dll to my test program, I could not find UserControl1 from the listed control and a message appears indicating the no control exist. Thanks. -- modified at 5:09 Tuesday 27th February, 2007

    C# question

  • GDI and User Control related
    F fjlv2005

    Hi SNews Thanks for your feedback, however, I already tried to add a handler to my panel. so that in the forms code : mypanel.SetParentControl(myparentcontrolorparentform); and on my panel code: private Control m_parentcontrol=null; public void SetParentControl(Control e) { m_parentcontrol=e; } [Browsable(true)] [TypeConverter(typeof(boolValueConverter))] [DisplayName("Collapse"), Category("Panel Information"), Description("Minimize/Maximize Panel")] public bool Collapse { get { return m_isminimized; } set { m_isminimized = value; if(m_parent!=null) m_parentcontrol.Refresh(); Refresh(); } } However the when my panel is minimized, the area that was left behind displays the transparent color. If its okay with you, can i ask for your email address so that I could email you the output sample of my program. Perhaps I'll to follow your second suggestion, however how can my user control aware or get the area only that it has overlapped? Thanks

    C# question graphics design

  • GDI and User Control related
    F fjlv2005

    Good day, I have a user control. My user control is customize Panel which can be minimize or maximize. I use Transparent as background of my control. I tried to test my new control under a form that has a background picture. When I run my test program, i've tried to minimize my user control Panel but the area that was left behind by my panel is NOT the background image picture of the form where i put my user control instead the trasparent color appear. Is there a way that we could get the background of the Area what was overlapped by my user control ? How can I make my user control aware of the background area that it overlapped at design time so that I could restore that area when my control is minimize? Any suggestions would be appreciated. Thanks,

    C# question graphics design

  • Disabled some items in ListView
    F fjlv2005

    Hi, thanks for the additional info. I really Appreciate it. Thanks to all of you guys who helped me. More power to you!

    C# question

  • Disabled some items in ListView
    F fjlv2005

    Thanks for your ideas. its good. it work.

    C# question

  • Help with Win XP task manager
    F fjlv2005

    Hi, Just a suggestion, if you dont want users to kill the process, then you may disable your task manager so that in the first place users cannot kill any process. There are two ways that i know, one is through registry (but still users can access taskmanager through ctrl+alt+delete however it is disabled when users right click on the system tray, so perhaps you should add your own control for ctrl+alt+del. Here is the registry path for disabling taskmanager for system tray: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System under System create a DWORD Value DisableTaskMgr and set the value to 1. second Active Directory.. then you create a policy, you run the Group Policy Object Editor, Go to User Configuration->Administrative templates->System->Ctrl+Alt+Del Options then enabled Remove Task Manager policy. then apply that policy to the specific pc/user you want that policy to apply. Hope this helps a bit.

    C# question business help

  • Disabled some items in ListView
    F fjlv2005

    Good day to all, I have a Listview that contains a list of connected/disconnected computers. I want to disables those items in the listview which are disconnected so that users wount be able to select or perform right click on this disconnected items. How can we disable some items in listview? Thanks a lot.

    C# question

  • Remote Shutdown and Processes
    F fjlv2005

    Hi Jijo, Thanks for your reply. I guess i will just have to use shutdown.exe and continue using Process and ProcessStartInfo. More power to you!

    C# csharp help workspace

  • Remote Shutdown and Processes
    F fjlv2005

    Good day to all, Currently im developing an administrative tool that allows me to monitor all workstation under my domain. I want to do remote shutdown/restart/log-off using C#. At first I was thinking of executing the ff: shutdown -r -f -m \\pcname -t 0 for restart.. shutdown -s -f -m \\pcname -t 0 for shutdown.. I planned to execute it under C# Process & ProcessStartInfo however i feel i doesnt much have control because whenever i shutdown/restart an offline pc, if it is on command line, then it will just hang-up or just a cursor blinking and will not exit the command (maybe it would take too long..). I hope somebody could help me find a way to execute shutdown/restart/log-off remotely which we have better control and more reliable way. Also also want to get remotely,the processes that runs under the client machine/workstation, i hope this is feasible in C#. Im using .NET 2003 environment, thanks a lot, -- modified at 2:39 Friday 17th March, 2006

    C# csharp help workspace

  • Network Connection
    F fjlv2005

    Good day, I have a server and several workstations connected to the server. I wanted to make an application that monitors the computers(workstations). There are two ideas that i know but i still dont know the details of those two ideas. First idea is to create an application on server computer that when there is a workstation connected to the LAN, it updates the application. Is there a way in C# to communicate with Windows that there is a computer(workstation) connected?? as we know windows explorer can see all connected computers and does not show the disconnected ones. So basically windows knows what computer are connected, and my problem is how can we get those connected computers that windows knows? Second Idea is to use sockets but i would not prefer this one because what if there are 100 workstations, it would mean i have to install client-side application on each computer, so it would be a stressful task, and every time there is an update on client-side code, i have to update all workstations w/c is again stressful. I really hope i can get an answer from my first idea because i only need to install and if there an update, i would only update the server and nothing to install on client computers(workstations). I hope somebody can share there knowledge, Thanks a lot,

    C# sysadmin csharp help question announcement

  • MessageBox in OnInitDialog
    F fjlv2005

    Good day, I have on my OnInitDialog an initialization and if there the returncode of the initilization is error then I display Error using Messagebox. However After I press Ok button, I got an access violation. Is there a proper way to have MessageBox in OnInitDialog? Thanks.

    C / C++ / MFC help question

  • CBitmap
    F fjlv2005

    Hello Prakash, I have declared CBitmap in this, CMyBitmap mybitmap; mybitmap.LoadBitmap(IDB_MYBMP); mybitmap.DrawTransparent(GetDC(),20,50,RGB(255,0,255)); Sorry I was not clear enough in the first place. CMyBitmap is derrived from CBitmap, I have to subclass because i need to make the bitmap transparent. Please help me How I could bring this on top of other controls. Anyway here is the detail of DrawTransparentFunction.(Just research this detail from other articles but it didnt bring the bitmap on top. Its weakness is when there are other control because it is overlapped.) void CMyBitmap::DrawTransparent(CDC *pDC, int x, int y, COLORREF clrTransparency) { BITMAP bm; GetBitmap (&bm); CPoint size (bm.bmWidth, bm.bmHeight); pDC->DPtoLP (&size); CPoint org (0, 0); pDC->DPtoLP (&org); // // Create a memory DC (dcImage) and select the bitmap into it. // CDC dcImage; dcImage.CreateCompatibleDC (pDC); CBitmap* pOldBitmapImage = dcImage.SelectObject (this); //dcImage.SetMapMode (pDC->GetMapMode ()); // // Create a second memory DC (dcAnd) and in it create an AND mask. // CDC dcAnd; dcAnd.CreateCompatibleDC (pDC); //dcAnd.SetMapMode (pDC->GetMapMode ()); CBitmap bitmapAnd; bitmapAnd.CreateBitmap (bm.bmWidth, bm.bmHeight, 1, 1, NULL); CBitmap* pOldBitmapAnd = dcAnd.SelectObject (&bitmapAnd); dcImage.SetBkColor (clrTransparency); dcAnd.BitBlt (org.x, org.y, size.x, size.y, &dcImage, org.x, org.y, SRCCOPY); // // Create a third memory DC (dcXor) and in it create an XOR mask. // CDC dcXor; dcXor.CreateCompatibleDC (pDC); //dcXor.SetMapMode (pDC->GetMapMode ()); CBitmap bitmapXor; bitmapXor.CreateCompatibleBitmap (&dcImage, bm.bmWidth, bm.bmHeight); CBitmap* pOldBitmapXor = dcXor.SelectObject (&bitmapXor); dcXor.BitBlt (org.x, org.y, size.x, size.y, &dcImage, org.x, org.y, SRCCOPY); dcXor.BitBlt (org.x, org.y, size.x, size.y, &dcAnd, org.x, org.y, 0x220326); // // Copy the pixels in the destination rectangle to a temporary // memory DC (dcTemp). // CDC dcTemp; dcTemp.CreateCompatibleDC (pDC); //dcTemp.SetMapMode (pDC->GetMapMode ()); CBitmap bitmapTemp; bitmapTemp.CreateCompatibleBitmap (&dcImage, bm.bmWidth, bm.bmHeight); CBitmap* pOldBitmapTemp = dcTemp.SelectObject (&bitmapTemp); dcTemp.BitBlt (org.x, org.y, size.x, size.y, pDC, x, y, SRCCOPY); // // Genera

    C / C++ / MFC question

  • CBitmap
    F fjlv2005

    I have a CBitmap derrived class, and have my own Draw function. However, When it is displayed, it its overlapped by other controls. Is there a way to make a CBitmap on top of all controls? thanks..

    C / C++ / MFC question

  • Transparent CBitmapButton
    F fjlv2005

    Hello, Can somebody help me. I have a CBitmapButton and I want to hide parts or area with magenta color RGB(255,0,255). I think I have to create a class that derrives CBitmapButton some functions.. But am not familiar with graphics in EVC. Please help me how to do it.:confused: Thanks and Good day..

    C / C++ / MFC graphics help tutorial

  • Modeless dialog communicating with parent dialog
    F fjlv2005

    Hello, I found another way to solve my problem though it may be not a solution to CStatic problem but this can be a work-around of displaying a progress text status. Though i have solve my own problem still I want to share info so that if someone encounter this problem, He/She may try our solutions (By No Redraw Sol., or By Thread Sol , or By Drawing Text Solution.).. Here is how I display the status to the child modeless dialog. void child::UpdateStatusMessage(char* pmessage) { CString strmsg; strmsg=pmessage; CDC* cDC=GetDC(); CFont HeaderTitle; RECT r; HeaderTitle.CreateFont(12,0,0,0,FW_BOLD,FALSE,FALSE,0,ANSI_CHARSET, OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH | FF_SWISS, _T("Arial")); r.top=120; r.bottom=140; r.left=30; r.right=100; cDC->SelectObject(HeaderTitle); cDC->DrawText(strmsg,&r,DT_NOCLIP); ReleaseDC(cDC); } Thanks.

    C / C++ / MFC 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