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
P

Pablo Hernandez Valdes

@Pablo Hernandez Valdes
About
Posts
9
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • CodeDom question
    P Pablo Hernandez Valdes

    Hi: I'm using codedom to generate source code and I need to generate something like the ternary operator in C# ( ? : ) but I don't know how to do it, I can't find any class in the System.CodeDom namespace to do this. Thanks Pablo Hernandez Valdes

    C# question csharp tutorial

  • CodeDom question
    P Pablo Hernandez Valdes

    hello: I'm trying to generate code using the CodeDom, and I need to know how to get an expression from an assign statement. I'm using CodeBinaryOperatorExpression but I get the generated code within parenthesis, for example: ( a = 0 ); I'd like to know if I can get the code without parenthesis using the previous class or someone else. Thanks Pablo Hernandez Valdes

    C# tutorial question

  • Hovering Mouse
    P Pablo Hernandez Valdes

    Try to use the api function WindowFromPoint: [System.Runtime.InteropServices.DllImport("user32.dll")] static extern int WindowFromPoint(int x,int y); Then you can get the handle of the window that is just below the (x,y) point in absolutes coordinates (relative to the top-left corner of the screen). Pablo Hernandez Valdes

    C#

  • building a Binary Tree Class
    P Pablo Hernandez Valdes

    The code used in the book doesn't work because they are making a generic class, and it only works in C# 2.0 that comes with Visual Studio 2005. The class can be modified so it can compile with VS 2003, but you will need to change all the code that uses the class. Hope this helps :) Pablo Hernandez Valdes

    C# csharp visual-studio data-structures tutorial question

  • Non Rectangular Form
    P Pablo Hernandez Valdes

    Maybe it didn't work because the BackColor must be set to the color you want to make transparent, if not it does nothing at all. In my computer it works fine with this. If it still doesn't work please tell me and I'll try to send you my full code. If you want to do something like this using regions, for example, if you want a triangular window you can do System.Drawing.Drawing2D.GraphicsPath gp=new System.Drawing.Drawing2D.GraphicsPath(new Point[]{new Point(0,0),new Point(200,0),new Point(100,200)},new byte[]{(byte)PathPointType.Start,(byte)PathPointType.Line,(byte)PathPointType.Line}); this.Region=new Region(gp); Now you get a triangular window. You can intersect, join, complement different regions to obtain more complex shapes and even use non polygonal regions with bezier curves (PathPointType.Bezier). With a litte effort you can make a region that conform to your bitmap and use it for the form. Any problems please let me know. Pablo Hernandez Valdes

    C# graphics csharp

  • Non Rectangular Form
    P Pablo Hernandez Valdes

    The problem is that you may be using a 24bit image and it has some problems (I don't know why?) with 32bit color quality. Anyway there is a solution for this problem: 1) Load the image manually in the Load event(or wherever you want): Bitmap bg; bg=(Bitmap)Bitmap.FromFile(@"Your image.bmp"); bg.MakeTransparent(Color.White); Instead of this you can use an ImageList and don't forget to set the TransparentColor property 2) Draw the image in the Paint event: private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { e.Graphics.DrawImage(bg,0,0,this.Width,this.Height); //If you used an ImageList //e.Graphics.DrawImage(imageList1.Images[backgroundIndex],0,0,this.Width,this.Height); } Another approach to this could be using regions, but it is more complicated, if you want to learn more about this please let me know and I'll try to show you an example Pablo Hernandez Valdes

    C# graphics csharp

  • Statusbar Icon - Display Issue
    P Pablo Hernandez Valdes

    The only thing you need to do is to set the ShowPanels property of the StatusBar to true. Hope this works!:) Pablo Hernandez Valdes

    C# csharp help question

  • Using a flash ActiveX control in Win32
    P Pablo Hernandez Valdes

    I'm having problems when I try to use a flash ActiveX control in a Win32 application (non-MFC) I don't know why this exception is thrown: First-chance exception at 0x10058561 in MM.exe: 0xC0000005: Access violation reading location 0x00000000. Unhandled exception at 0x10058561 in MM.exe: 0xC0000005: Access violation reading location 0x00000000.:confused: Is something wrong with the code? #import "c:\winxp\system32\macromed\flash\flash.ocx" named_guids ........................... CoInitialize(0); IShockwaveFlash* pFlash; HRESULT hr=CoCreateInstance(CLSID_ShockwaveFlash,NULL,CLSCTX_INPROC_SERVER,IID_IShockwaveFlash,(void**)&pFlash); pFlash->LoadMovie(0,L"test.swf"); Thanks:) Pablo Hernandez Valdes

    COM c++ com adobe question

  • NEW AT FUNCTIONS, PLEASE HELP, URGETNT
    P Pablo Hernandez Valdes

    The problem is that the int C++ type is used, and it isn't a struct/class. You should use the System::Int32 type if you want to use the .ToString method.:) #include "stdafx.h" #using using namespace System; System::Int32 D,DD,MM,YY; void separateDate(System::Int32 *temp,System::Int32 *DD,System::Int32 *MM,System::Int32 *YY) { *DD=*temp/10000; *MM=(*temp%10000)/100; *YY=(*temp%10000)%100; do { Console::WriteLine(S"\nEnter a Valid Date: "); } while (*DD<1 || *DD>31); do { Console::WriteLine(S"\nEnter a Valid Date: "); } while (*MM<1 || *MM>12); if (*YY<=36) { Console::WriteLine(S"\nTHE DATE IS: {0}/{1}/20{2}",(*DD).ToString(),(*MM).ToString(),(*YY).ToString()); } else if (*YY>36) { Console::WriteLine(S"\nTHE DATE IS: {0}/{1}/19{2}",(*DD).ToString(),(*MM).ToString(),(*YY).ToString()); } } int _tmain() { Console::WriteLine(S"*******************************************************************"); Console::WriteLine(S"\t\tDATE FORMAT"); Console::WriteLine(S"*******************************************************************"); void separateDate(System::Int32 *temp, System::Int32 *DD, System::Int32 *MM, System::Int32 *YY); Console::Write(S"\nENTER THE DATE (SIX DIGIT POSITIVE INTEGER): "); D=D.Parse(Console::ReadLine()); separateDate(&D,&DD,&MM,&YY); Console::ReadLine(); return 0; } Pablo Hernandez Valdes

    C / C++ / MFC help csharp c++ visual-studio design
  • Login

  • Don't have an account? Register

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