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

Anh_Tuan

@Anh_Tuan
About
Posts
13
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to restrict the user entering some invalide keys in TestBox
    A Anh_Tuan

    Try MaskedTextBox! But filtering using KeyDown is still my preference. -K Jup

    C# tutorial

  • Webbrowser control - opening link in new window
    A Anh_Tuan

    That's the variable name. The activeX browser could be found on your system. With .NET 1.1 the simplest way is that you should import that COM component from system32/shdocvw.dll. .NET 2.0 already have a web browser control for you by default from the toolbox. -Good Luck Jup

    C# help

  • Assembly language
    A Anh_Tuan

    Largely used in embedded systems. Sometimes pure C could be a good choice for to save development's time, however it could not replace ASM completely. Have you ever heard of "SMALL IS BEAUTIFUL" phrase, its very nice to describe ASM. Jup

    Hardware & Devices csharp c++ tutorial question

  • Marshaling Object
    A Anh_Tuan

    Thanks, you're right. I forgot about address space. Should I access other's process address space to read/write data? Jup

    C# question

  • Disabling "X" button in WinForm
    A Anh_Tuan

    Depend on how you would like for it to behave 1. Handle form closing event, set e.Cancel to true Or 2. Use Win32 API // constants for menu manipulation const int SC_CLOSE = 0xF060; const int MF_BYCOMMAND = 0x0; [System.Runtime.InteropServices.DllImport("user32.dll")] public static extern IntPtr RemoveMenu(IntPtr menuHwnd, int position, int flags ); public static void EnableApplicationClose( System.Windows.Forms.Form form, bool val ) { IntPtr menu = GetSystemMenu( form.Handle, val ? 1 : 0 ); if ( !val && menu != IntPtr.Zero ) RemoveMenu( menu, SC_CLOSE, MF_BYCOMMAND ); else { // needed when enabling the app close box to force it to redraw. form.Enabled = false; form.Enabled = true; } } [System.Runtime.InteropServices.DllImport("user32.dll")] public static extern IntPtr GetSystemMenu(IntPtr hwnd, int bRevert); Jup -- modified at 9:03 Friday 7th July, 2006

    C# tutorial question

  • string problem ? help please ¿
    A Anh_Tuan

    Try to see Globalization on this site like these: http://www.codeproject.com/dotnet/globitfrmwk.asp[^] http://www.codeproject.com/csharp/multilanguageapplications.asp[^] Jup

    C# help tutorial question

  • FOP it [modified]
    A Anh_Tuan

    Use to iterate thru each entry and use to find out if the node exist then dump the data as you want Jup -- modified at 11:03 Friday 7th July, 2006

    XML / XSL xml question

  • Webbrowser control - opening link in new window
    A Anh_Tuan

    You need to add event handlers to handle "NewWindow" event when the user clicks on a link with the target not on the current webbrowser 1. For Pre Windows XP SP2 axWebBrowser.NewWindow2 2. For Windows XP2 and later there is another event named axWebBrowser.NewWindow3 The whole code for this would look axWebBrowser.NewWindow2 += new AxSHDocVw.DWebBrowserEvents2_NewWindow2EventHandler(axWebBrowser_NewWindow2); try { axWebBrowser.NewWindow3 += new AxSHDocVw.DWebBrowserEvents2_NewWindow3EventHandler(axWebBrowser_NewWindow3); } catch ( Exception ) { // Not XP SP2 - just ignore } Now in the event handlers all you have to do is block the new window from opening by putting e.Cancel = true; and redirect the current webbrowser to the new URL sent by the event. See more at NewWindow3[^] Jup

    C# help

  • running a function in a thread
    A Anh_Tuan

    Create a new thread to process time-consuming tasks. Here is a simple example using System.Threading; ... ThreadStart ts = new ThreadStart(DoWork); Thread t = new Thread(ts); t.Start(); ... void DoWork() { // do my work here } Check out more at at Threading articles on here or MSDN Lib.[^] Jup

    C# mobile design question

  • Marshaling Object
    A Anh_Tuan

    Hi, I have applications that need to communicate with each other using HWND_BROADCAST Here is the prototype for unmanged code function SendMessage [DllImport("user32.dll")] extern static IntPtr SendMessage(IntPtr hWnd, int msg, MyClass myClass, IntPtr lParam); where WParam is passed as an object reference. In the overriden WndProc method on the other application, the WParam variable is marshaled back to the original object like this protected override void WndProc(ref Message m) { if (m.Msg == CommonMessageID) { ... // myClass contains junk data here MyClass myClass = (MyClass)Marshal.PtrToStructure(m.WParam, typeof(MyClass)); ... } base.WndProc(ref m); } However, it does not hold the information that was initialized by the other app. What did I do wrong here? Jup

    C# question

  • RichEdit Problem
    A Anh_Tuan

    Usually, when you have an image or object embedded in a richtext document you can interact with it like editing or resizing. :confused:Is there anyone who knows how to disable user interaction with these objects? Thanks, Jup

    C / C++ / MFC hardware help tutorial question

  • Disable Image (Object) manipulation in RichTextBox [modified]
    A Anh_Tuan

    I have a RichTextBox control with inserted images (using Paste() from clipboard data). The problem is I don't want the user to be able to select the images and resize them using the mouse pointer. Anyone can help? Thanks, Jup

    C# help question

  • Print Preview & Print
    A Anh_Tuan

    Hello, I have developed an application in C#, I used RichTextBox control for my word processing part. Now I want to add two more functions that are Print Preview and Print but I had not found any built-in method regarding Print issue with RTB. I am thinking about writing code for the event PrintDocument.PrintPage, hmmm. However, it seems not to be a good idea, I know that I would not have to do that if I deal with the problem using MFC. Though... Buddies suggest me what to do pls. Thanks a lot. J. Alpha

    C# help csharp c++
  • Login

  • Don't have an account? Register

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