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

Aviv Halperin

@Aviv Halperin
About
Posts
55
Topics
38
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • large font and tabcontrol issue
    A Aviv Halperin

    The system font is set to large before the application is running. This causes the tabs not to appear. If the font is set to small the problem is gone and all tabs are shown. I have actually only seen this behavior on windows 2000 systems. On XP the problem does not exist. Does this make any difference? Could it be a .NET CLR issue? Thanks. avivhal

    C# help question

  • large font and tabcontrol issue
    A Aviv Halperin

    Hi, I have a tabcontrol with 4 tabpages. Each tabpage contains a richtextbox. I do not have anyproblem running my application and viewing all the tabs when the system font is set to small font. When the font is set to large font, all the tab pages become gray and the richtextboxes are not shown at all! Does anyone know of a solution to this problem? (setting the AutoSize property of the RichTextBoxes to true does not help ) Thanks. avivhal

    C# help question

  • gray tabs in a TabControl
    A Aviv Halperin

    Hi, I have a tab with 4 tab pages. Each page contains a RichTextBox. I have no problems with the tab pages in the application when running on XP system. on most windows 2000 systems it is fine as well but on some windows 2000 systems only the first tab is active and the other 3 are gray with no RichTextBox open on them! Does anyone know what could be the reason for it? I tried everything I could (including trying .NET framework 2.0) but found no solution for this. Please help. Thanks. avivhal

    C# csharp dotnet help question

  • copy database to server
    A Aviv Halperin

    Hi, I created a database (sql) and added tables and stored procedures to it using the .NET server explorer. Now I want to use the database created in a real server (thus move it from my development PC to a real web server). What is the way to do it? Do I need to create a database project to do that? Why does the .NET have databse projects if all can be done in the server explorer? If anyone knows any article about the subject please let me know. Thanks. avivhal

    Database question database csharp sysadmin

  • adding attachments to an email
    A Aviv Halperin

    Hi, I found an article that shows a simple way to open the default email client with some parameters set. http://www.codeproject.com/dotnet/Default_mail_client.asp[^] Only thing is: the attachment does not work. (MsgBuilder.Append("&Attach=c:\mailattach.txt")) Is there any way to open the default email with an attachment? Thanks. avivhal

    C# csharp com question

  • bitmap background issue and resources
    A Aviv Halperin

    Thanks. I changed the code a bit since it did not work properly. My code is: public static Bitmap GetImageFromResources(string name) { // get a reference to the current assembly System.Reflection.Assembly a = Assembly.GetExecutingAssembly(); string my_namespace = a.GetName().Name.ToString();//not needed since return assembly name string[] ResourceNames = a.GetManifestResourceNames(); string ImageFullName=""; for(int i=0 ; i < ResourceNames.Length ; i++) if(ResourceNames[i].ToUpper().IndexOf(name.ToUpper()) != -1) { ImageFullName = ResourceNames[i]; break; } Bitmap image = new Bitmap(a.GetManifestResourceStream(/*my_namespace + "." +*/ ImageFullName)); return image; } Problem was that a.GetName().Name.ToString(); does not return the name space in which the code is running but rather the assembly name. Thanks again. avivhal

    C# csharp graphics help question

  • bitmap background issue and resources
    A Aviv Halperin

    Thanks, but I tried gray before and got same result. avivhal

    C# csharp graphics help question

  • bitmap background issue and resources
    A Aviv Halperin

    Hi, I have 2 questions regarding bitmaps: 1)I have a small bitmap (16/16 pixels) that I'm using in my application. I need to set its background to transparent. When I use the code MyBitmap.MakeTransparent(Color.White); all the white pixels become blue instead of transparent!!! Does anyone know whats going on here? 2) Is it possible to save a bitmap as part of the C# project and open it this way instead of installing the bitmap file and opening in the file way: string bmpPath = @"c:\MyBitmap"; Bitmap MyBitmap= new Bitmap(bmpPath); Thanks. avivhal

    C# csharp graphics help question

  • calling COM from 2 threads
    A Aviv Halperin

    Hi, I have an ATL COM that is initialized with CoInitializeEx(NULL,COINIT_MULTITHREADED) thus its multiple apartment COM and calls can be made simultaneously from different clients. When I initialize and call it from an application, no problem. When I initialize and call from 2 different applications- no problem as well. But when I initialize it in one application and then try to initialize or call it from another thread in the same application, I get the following error: "the application called an interface that was marshaled for a different thread" What can I do to solve it? Should I change the way I call it? Thanks. avivhal

    COM help c++ com question

  • Session sharing
    A Aviv Halperin

    Hi, I have an ASP.NET server application, which has both Forms and Web services in the same application. I need to share session information between the forms and the services. I noticed that the Forms have a different session id then the service functions, therefore I can not share info! Is there any way to share variables/objects information between Forms and Web service in the same application? (Preferably not cookies) Thanks, avivhal

    ASP.NET csharp asp-net wcf sysadmin question

  • SendMessage issue
    A Aviv Halperin

    They were static members of the my TextBoxEx class before. All I did was build a new class and pass the methods to be static members of the new class. then call them as the new class methods. e.g. if my old class was Aclass and the new Bclass then in Aclass I call: Bclass.SendMessage(...); I have a few overloads such as [DllImport("coredll")] public static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, String lParam); [DllImport("coredll")] public static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, byte[] lParam); that take addresses (pointers). I only use : [DllImport("coredll")] public static extern IntPtr SendMessage(IntPtr hWnd, int msg, int wParam, int lParam); to call with 0 lparam and wparam thus: Bclass.SendMessage(this.Handle, (int)ClipboardMessage.WM_UNDO, 0, 0); I probably should use 2 pointers (IntPtr) instead and lock the IntPtr for the GC before calling this method? Thanks, Aviv. avivhal

    C# help csharp json

  • visual studio 2005 beta / visual studio.net 2003
    A Aviv Halperin

    Thanks for the reply. I dug a bit info from the msdn, and didn’t find any significant changes ( apart from when the new window OS version will be released...) I think I'll wait for the release. Thanks again. Aviv. avivhal

    .NET (Core and Framework) csharp c++ visual-studio question announcement

  • SendMessage issue
    A Aviv Halperin

    Neither DllImportAttribute.CharSet nor SendMessageW worked. I did get it to work though (somehow)... I took the declarations I have of SendMessage(I have a few overloads) : [DllImport("coredll")] public static extern IntPtr SendMessage(IntPtr hWnd, int msg, int wParam, int lParam); and wrapped them in a separate class. Then I called them as this class's static members and it works! I do not understand why would this solve the problem though...? Maybe the problem was that they were members of a TextBox (Form) derived class and this caused congestion problems with the Form’s own messages? I wish I had the OS source code so I could check this;) avivhal

    C# help csharp json

  • SendMessage issue
    A Aviv Halperin

    Thanks for the answer. I tried PostMessage as well. It does not work. I do not do it in an event handler of a menu. My goal is to create a more robust editor then TextBox(that’s all there is in the .net CF, no RichTextBox). Therefore I build an extended TextBox with cut,copy,paste and more. My other problem is that when I try to add text programmatically: int len = textBoxTerminal.Text.Length; textBoxTerminal.SelectionStart = len; textBoxTerminal.SelectionLength = len; textBoxTerminal.SelectedText = (string)StringToAdd; the caret always positions itself in the beginning of the TextBox's Text. I can reposition it to the end and scroll, but this causes the TextBox to flicker. I thought PostMessage will help solving this, but I cannot test it for the Since PostMesage does not work for me. Hope you have an answer for this... Thanks. avivhal

    C# help csharp json

  • SendMessage issue
    A Aviv Halperin

    Maybe I wasnt clear enough in my last thread: I want to use the API function SendMessage in my .NET CF apllication. I use the following code to get the handle of my TextBox window: [DllImport("coredll.dll")] internal extern static IntPtr GetCapture(); this.Capture = true; hwnd = GetCapture(); this.Capture = false; I want to send messages in order to extend the functionality of my TextBox. I use: [DllImport("coredll.dll")] internal extern static int SendMessage(IntPtr Hwnd, int Msg, int WParam, int LParam); SendMessage(this.hwnd, (int)0x0300/*WM_CUT*/, 0, 0); This does not cut the text in my TextBox. I have read all through the .NET CF and could not find the reason for this. Any other p/invoke I use works fine (like GetCapture) but the SendMessage doesnt. Please help... Thanks. avivhal

    C# help csharp json

  • .NET CF and SendMessage
    A Aviv Halperin

    I'm trying to use p/invoke in the .NET CF in order to create copy,paste and other operations. I use the following code: [DllImport("coredll.dll")] internal extern static int SendMessage(IntPtr Hwnd, int Msg, int WParam, int LParam); SendMessage(this.hwnd, (int)ClipboardMessage.WM_CUT, 0, 0); I noticed that the desired operation never happens! All other p/invoke I use work fine. Only the SendMessage does not work (I tried many other like WM_CHAR,WM_VSCROLL and more, nothing works) Thanks. avivhal

    C# csharp

  • TextBox
    A Aviv Halperin

    I want to insert the text programaticaly. I am developing for a PDA using the .NET compact framwork. Everytiem I add data programaticaly as follows: textBoxTerminal.Text += (string)str; textBoxTerminal.SelectionStart = textBoxTerminal.Text.Length; textBoxTerminal.ScrollToCaret(); the cursor jumps to the beginning of the text and then jumps to the end. How can I avoid this jump to the beginning of the text before I set the caret position? Thanks. avivhal

    C# tutorial question

  • TextBox
    A Aviv Halperin

    Does anyone know how to add text to a TextBox programaticaly without the cursor jumping to the beginning of the text? Thanks. avivhal

    C# tutorial question

  • TextBox caret jump
    A Aviv Halperin

    Hi, I'm writing a smart device application for a pocket PC using C#. I need to make a terminal for the outside communication and I'm using a TextBox for this terminal. Problem is: every time I try to add text to the terminal I do the following: textBoxTerminal.Text += (string)TextToAdd; //1 textBoxTerminal.Select(textBoxTerminal.Text.Length,0); //2 textBoxTerminal.ScrollToCaret(); //3 I have to do 2 and 3 since after 1 the caret jumps to the beginning of the text. Is there anyway to stop the caret from jumping to the beginning of the text every time text is added? Thanks. avivhal

    C# csharp help question

  • visual studio 2005 beta / visual studio.net 2003
    A Aviv Halperin

    Hi, I am currently working with VS .NET 2003 Enterprise. I got the new CD's from Microsoft containing VS 2005 BETA a couple of months ago and would like to start using them (I develop using ADO .NET,C# .NET,VC++,MFC,VB .NET ,pocket pc, and ASP .NET so these are the ones I'm most interested in my questions). I have a few questions regarding the VS 2005 beta: 1.Is it possible to install it on the same PC with VS .NET 2003 or should I uninstall VS .NET 2003 first? 2.Can I open and compile all C#,VB,C++ MFC projects that where created and used with VS .NET 2003 on the VS 2005 BETA with no problems? 3.Why is it called VS 2005 and not VS .NET 2005? 4.when is the VS 2005 release version expected? 5.What are the general improvements to VS 2005 BETA compare to VS .NET 2003? 6.What is the download from the Microsoft MSDN Subscriber Downloads site for the VS 2005 BETA, which is equivalent to VS .NET 2003 Enterprise developer? Thanks in advance for the response. Aviv. avivhal

    .NET (Core and Framework) csharp c++ visual-studio question announcement
  • Login

  • Don't have an account? Register

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