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
C

c guy3811

@c guy3811
About
Posts
13
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Crystal Report Redistributable - Not
    C c guy3811

    The CR Engine is a managed library that is referenced in your project. Most client computers that dont have the .NET SDK will lack these .dll's, which is why you need the merge module. 26mb sounds about right. You can create an installer just to install the merge module, then have your end users download it only if they experience problems. To do that, just create a setup project, then in the solution panel right click and select add merge module. Browse to the CR_2005 merge module and select it. This will install the merge module only. Note, as I said before, your clients will need to have admin access to install. If you need anything else, just let me know. Aaron

    C# question announcement

  • Outlook object model Guard
    C c guy3811

    The security is pretty tight. Without Redemption you have to write the bypasses yourself. Check the Redemption info to see what protocol they use for their "SafeMailItems". I used to know what it was, but I know its not MAPI. It is a big undertaking and you may well be better off just getting the Redemption redistributable. I seriously doubt it will be a simple solution to bypass SP2 security. C#Guy

    C# csharp

  • Network problem
    C c guy3811

    First, make sure that your server isnt listening on "127.0.0.1". While this will work for your computer (localhost), no one else will be able to connect to it. Next, try getting an IPAddress from Dns.Resolve(Environment.MachineName).AddressList[0]. This will enable your server to listen on the correct address for any computer you place it on. Then you just have to give whoever else the IP Address of your server so they connect, and it SHOULD fix your problem. If it still doesnt, try checking your Windows Firewall. C#Guy

    C# sysadmin question help lounge

  • EM_SETCHARFORMAT Question
    C c guy3811

    I posted this once before, but it is about 20 pages back now. I am using EM_SETCHARFORMAT to try and set the background color of charachters in a RichTextBox, but it wont work. I have tried everything I can think of, and nothing. When I try and set the forecolor, that works, and I can paste in charachters with a set backcolor and it works fine, the code just isnt working how I want it to... I tried dwEffects=0, dwEffects=CFE_PROTECTED, not setting dwEffects, etc. Nothing has worked. The call to DefWndProc is returning a non zero value, so it is working, just not how I want it to. There has to be something I am missing somewhere... I am going to list all my constants, structure, etc, and perhaps someone can figure out what is going on. FYI, I have also tried the API call and it does the same thing. [StructLayout(LayoutKind.Sequential)] private struct CHARFORMAT2 { public int cbSize; public int dwMask; public int dwEffects; public int yHeight; public int yOffset; public int crTextColor; public byte bCharSet; public byte bPitchAndFamily; [MarshalAs(UnmanagedType.ByValTStr, SizeConst=32)] public string szFaceName; public int wWeight; public int sSpacing; public int crBackColor; public int lcid; public int dwReserved; public int sStyle; public int wKerning; public byte bUnderlineType; public byte bAnimation; public byte bRevAuthor; public byte bReserved1; }//struct charformat2 //constants EM_SETCHARFORMAT=0x444; CFM_BACKCOLOR=0x4000000; CFM_COLOR=0x40000000; SCF_SELECTION=0x1; //Call to format, tried CFM_BACKCOLOR and CFM_BACKCOLOR|CFM_COLOR, etc, // only forecolor changes CHARFORMAT2 cf2=new CHARFORMAT2(); cf2.dwMask=CFM_BACKCOLOR; cf2.cbSize=Marshal.SizeOf(cf2); cf2.crBackColor=ColorTranslator.ToWin32(Color.Red); IntPtr lParam=Marshal.AllocCoTaskMem(Marshal.SizeOf(cf2)); Marshal.StructureToPtr(cf2, lParam, false); Message msg=Message.Create(this.Handle, EM_SETCHARFORMAT, (IntPtr)SCF_SELECTION, lParam); DefWndProc(ref msg); Marshal.FreeCoTaskMem(lParam);

    C# question json

  • EM_SETCHARFORMAT problem
    C c guy3811

    I tried all of that before I posted, and tried it again after you posted, and still, nothing. I tried dwEffects=0, dwEffects=CFE_PROTECTED, not setting dwEffects, etc. Nothing has worked. Like I said, the call to DefWndProc is returning a non zero value, so it is working, just not how I want it to. There has to be something I am missing somewhere... I am going to list all my constants, structure, etc, and perhaps someone can figure out what is going on. FYI, I have also tried the API call and it does the same thing. [StructLayout(LayoutKind.Sequential)] private struct CHARFORMAT2 { public int cbSize; public int dwMask; public int dwEffects; public int yHeight; public int yOffset; public int crTextColor; public byte bCharSet; public byte bPitchAndFamily; [MarshalAs(UnmanagedType.ByValTStr, SizeConst=32)] public string szFaceName; public int wWeight; public int sSpacing; public int crBackColor; public int lcid; public int dwReserved; public int sStyle; public int wKerning; public byte bUnderlineType; public byte bAnimation; public byte bRevAuthor; public byte bReserved1; }//struct charformat2 //constants EM_SETCHARFORMAT=0x444; CFM_BACKCOLOR=0x4000000; CFM_COLOR=0x40000000; SCF_SELECTION=0x1; //Call to format, tried CFM_BACKCOLOR and CFM_BACKCOLOR|CFM_COLOR, etc, // only forecolor changes CHARFORMAT2 cf2=new CHARFORMAT2(); cf2.dwMask=CFM_BACKCOLOR; cf2.cbSize=Marshal.SizeOf(cf2); cf2.crBackColor=ColorTranslator.ToWin32(Color.Red); IntPtr lParam=Marshal.AllocCoTaskMem(Marshal.SizeOf(cf2)); Marshal.StructureToPtr(cf2, lParam, false); Message msg=Message.Create(this.Handle, EM_SETCHARFORMAT, (IntPtr)SCF_SELECTION, lParam); DefWndProc(ref msg); Marshal.FreeCoTaskMem(lParam);

    C# json help announcement

  • EM_SETCHARFORMAT problem
    C c guy3811

    Do you mean to set dwEffects=0? I tried that before I posted and nothing. If that isnt what you meant could you elaborate? Thanks!

    C# json help announcement

  • EM_SETCHARFORMAT problem
    C c guy3811

    I am trying to set the back color of indavidual charachters in a RichTextBox by using SendMessage() and the charformat2 structure. This works setting the forecolor of the charachters, but the back color will not work. I know that my version of RichEdit supports backcolors because they will show up if I paste, just not with the code. I thought that maybe it was assigning the wrong size to cbSize, but I dont know why it would do that. I am missing something very simple here im sure. I have tried this with the API call and have the same result. The message returns a non zero value, meaning it was successful, but the RichTextBox doesnt reflect that. ... private const int CFM_BACKCOLOR=0x4000000; ..... CHARFORMAT2 cf2=new CHARFORMAT2(); cf2.dwMask=CFM_BACKCOLOR; cf2.cbSize=Marshal.SizeOf(cf2); cf2.crBackColor=ColorTranslator.ToWin32(Color.Red); IntPtr lParam=Marshal.AllocCoTaskMem(Marshal.SizeOf(cf2)); Marshal.StructureToPtr(cf2, lParam, false); Message msg=Message.Create(this.Handle, EM_SETCHARFORMAT, (IntPtr)SCF_SELECTION, lParam); DefWndProc(ref msg); Marshal.FreeCoTaskMem(lParam); Thanks!

    C# json help announcement

  • What protocol i have to adopt for reliable transmission?
    C c guy3811

    The protocol probably isnt the problem. You may be overloading the receive buffer of the client so that it stops accepting data, or any number of other problems. You may want to send black and white only with your remote management, especially if you are currently using 24 or 32 bit colors. With black and white 1 byte can represent 8 pixels and will go MUCH faster than having to transmit 4 bytes for each pixel. There is a HUGE number of things that could be happening, but I doubt the protocol you are using is a large part of it. C#Guy

    C# sysadmin data-structures performance help question

  • .NET 2.0 Serial Ports
    C c guy3811

    my bet would be more on your code design with the Async calls than a flaw in the framework. Make sure you arent starting multiple async receives for the same operation and you are accepting all your callbacks. c#guy

    C# csharp performance help question

  • Time out BeginReceive() operation
    C c guy3811

    Really? I set the receiveTimeout option for 100ms, and after about 5 minutes the client was still connected. Are you sure?

    C# csharp design sysadmin help question

  • Time out BeginReceive() operation
    C c guy3811

    In my server, I am using Asynchronous socket connections. After a client connects, the server Asynchronously waits for the login credentials using Socket.BeginReceive. I have not had this issue yet, but in the what ifs.... Suppose a client connects, is sent a promt from the server to enter login credentials, then just sits there sending nothing. The server holds that asynchronous operation indefinately until something is sent or the client disconnects. How would I time out that operation? I dont think SetSocketOption works on asynchronous operations. The server would not stop accepting connections by design, but it would keep that socket open, and I dont want that. Any ideas? Thanks c#guy

    C# csharp design sysadmin help question

  • TCP Socket Problems
    C c guy3811

    The clients and servers both use a .dll for connection/send/rcv data. The server assigns the new socket to an ArrayList when a client connects, and gives the client an associated number. When a client disconnects, the server removes the client at the ClientNumber position in the ArrayList, then updates all necessary ClientNumbers to the correct position. While the update is going on, the server is suspended, IE, it can not accept new connections until the update is complete. The client dll backend catches an error, performs cleanup procedures, then trys to reconnect at a random interval. The connect/disconnect portion of the program isnt the problem. Even when the server hangs it still accepts/disconnects. IP Addresses are static. That shouldnt be a problem. Im beginning to think that it may be some of the other software running on the actual server with my server program. I think the backup software is locking the database when the server tries to update file listings. When I came in this morning, the ListView telling me what the current files were was empty, suggesting it failed contacting the database. If that is the case, then when it tries sending files, it wont have any references in the DataSets, and will simply return from the function without sending anything. Ill keep everyone informed incase the problem may come up with someone else.

    C# help sysadmin announcement

  • TCP Socket Problems
    C c guy3811

    I have a client/server relationship which I use to update files on connected users' computers. It uses Asynchronous Socket operations and sends binary data over TCP sockets. The connections are maintained indefinately until the client or server disconnects, or a client encounters an error and closes the connection. The problem I am having is that after a few days, the server stops sending messages to its clients. The number of clients right now is about 20-25, which are connected at all times. I see from the message logs that it is receiveing client requests, but it is not sending a response to those clients. The server is set to send updates at 12:30 AM every day, but after about 4 days it stops sending anything. I know it would be helpful to have the code, but not knowing where exactly the problem is, it is hard to post code, and there is A LOT of it. Any ideas on what the problem may be are appreciated. Thanks in advance!

    C# help sysadmin 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