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

Abisodun

@Abisodun
About
Posts
90
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Problem with RichTextBox SelectedRtf
    A Abisodun

    As I recall an external component was loading a different version of the riched32.dll/riched20dll. Workaround was to initialize the right dll first (new RichTextBox() in your application). Hope this helps.

    C# help question

  • stencil bar in ms visio
    A Abisodun

    Have you tried the Visio Developer newsgroup? http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.visio.developer&lang=en&cr=US[^]

    C# csharp question

  • Using Visio Drawing Control 2003 with System.Windows.Forms.RichTextBox
    A Abisodun

    I'm having difficulty using the Visio Drawing Control 2003 and the RichTextBox anywhere in the same application. e.g. public partial class VisForm : Form { public VisForm() { //RichTextBox rttb = new RichTextBox(); //string rtf = rttb.Rtf; //rttb.SelectedRtf = @"{\rtf1\ansi " + "Visible" + @"{\v " + "Hidden" + @"}}"; //string rtfText = rttb.Text; InitializeComponent(); RichTextBox rttb1 = new RichTextBox(); string rtf1 = rttb1.Rtf; rttb1.SelectedRtf = @"{\rtf1\ansi " + "Visible" + @"{\v " + "Hidden" + @"}}"; string rtfText1 = rttb1.Text; } --- } First Scenario: Initialize the RichTextBox BEFORE the Visio Drawing Control. Set rttb.SelectedRtf = @"{\rtf1\ansi " + "Visible" + @"{\v " + "Hidden" + @"}}"; rttb.Text will then be "VisibleHidden" which is correct. With the form displayed press CTRL+F to display the Find Dialog. The result is an AccessViolationException with the following message: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt". Second Scenario: Initialize the RichTextBox AFTER the Visio Drawing Control. Set rttb.SelectedRtf = @"{\rtf1\ansi " + "Visible" + @"{\v " + "Hidden" + @"}}"; rttb.Text will then be "Visible" which is WRONG. i.e. the hidden text does not get set when the Visio Control is initialized before the RichTextBox. With the form displayed, this time pressing CTRL+F results in the Find Dialog being displayed with no problem. Any ideas? Thanks, B.

    C# graphics performance help question

  • Problem in Logout in asp.net using C#
    A Abisodun

    Try preventing the page from being cached. Use the following at the top of the aspx page. <% Response.CacheControl = "no-cache"; Response.AppendHeader("Pragma", "no-cache"); Response.Expires = -1; %>

    ASP.NET csharp asp-net help tutorial

  • GridView on MultiView / Views with MenuItems to change Views - having problems
    A Abisodun

    Steve Stchur has UserControl/javascript solution for maintaining the scroll position: http://aspnet.4guysfromrolla.com/articles/111704-1.2.aspx[^]

    ASP.NET help csharp javascript question announcement

  • Dynamically Adding controls to UserControl
    A Abisodun

    I'm having difficulty adding dynamically loading one control GridViewControl.ascx to another (ControlOnPage.ascx). Adding a placeHolder to Default.aspx and dynamically loading GridViewControl.ascx works fine. Click Edit, modify a field, click update - everything's in order. Problem: Add ControlOnPage.ascx to Default.aspx. Add the placeHolder to ControlOnPage.ascx. Dynamically add GridViewControl.ascx to the placeHolder. This time the Edit link behaves like an empty PostBack button. RowEditing does not fire. Any ideas? Thanks, B

    ASP.NET help question announcement

  • Problem with Word.doc generating C# Application, installed on another local computer
    A Abisodun

    This might help. See Late Binding here: http://support.microsoft.com/kb/302902[^]

    C# help csharp business question announcement

  • Visio automation via C#
    A Abisodun

    http://www.microsoft.com/downloads/details.aspx?familyid=557120bd-b0bb-46e7-936a-b8539898d44d&displaylang=en[^]

    C# csharp testing tools help

  • RTB Redraw problem
    A Abisodun

    I don't recall where I found this but it should solve both of you problems: Private Const WM_SETREDRAW As Integer = &HB Private Const WM_USER As Integer = &H400 Private Const EM_GETEVENTMASK As Integer = (WM_USER + 59) Private Const EM_SETEVENTMASK As Integer = (WM_USER + 69) Private Declare Auto Function SendMessage Lib "user32.dll" ( _ ByVal hWnd As IntPtr, _ ByVal msg As Integer, _ ByVal wParam As Integer, _ ByVal lParam As IntPtr) As IntPtr ' We want to suspend redrawing because we need to select each ' character in turn to determine its fonts. However, RichTextBox ' appears to be missing some properties to do this, so use API: ' Stops RichText redrawing: richTextBox1.SuspendLayout() SendMessage(richTextBox1.Handle, WM_SETREDRAW, 0, IntPtr.Zero) ' Stops RichText sending any events: Dim eventMask As IntPtr = SendMessage( _ richTextBox1.Handle, EM_GETEVENTMASK, 0, IntPtr.Zero) ' Get the selection extent: Dim selStart = richTextBox1.SelectionStart Dim selEnd = richTextBox1.SelectionStart + richTextBox1.SelectionLength ... perform processing here ... ' Turn events back on again: SendMessage(richTextBox1.Handle, EM_SETEVENTMASK, 0, eventMask) ' Select the correct range (we must do this with events on otherwise ' the scroll state is inconsistent): richTextBox1.Select(selStart, selSize) ' Turn redraw back on again: SendMessage(richTextBox1.Handle, WM_SETREDRAW, 1, IntPtr.Zero) richTextBox1.ResumeLayout() ' Show changes richTextBox1.Invalidate()

    C# help question

  • Selecting a tree node??
    A Abisodun

    No problem

    C# data-structures question

  • Selecting a tree node??
    A Abisodun

    In the NodeMouseClick event: treeview.SelectedNode = treeview.GetNodeAt(e.Location);

    C# data-structures question

  • 64-bit Interop
    A Abisodun

    Use IntPtr in place of Int32.

    .NET (Core and Framework) help c++ com json question

  • internal and internal protected
    A Abisodun

    internal protected is a superset of internal and protected. Was this your understanding?

    C# ios question

  • TreeView StateImageList StateImageIndex
    A Abisodun

    I see this behavior is documented for 3.0 but not in 2.0. http://msdn2.microsoft.com/en-us/library/system.windows.forms.treenode.stateimageindex.aspx[^] ArgumentOutOfRangeException - The specified index is less than -1 or greater than 14. Fair enough.

    C# question

  • TreeView StateImageList StateImageIndex
    A Abisodun

    Is there a max value for treeNode.StateImageIndex? I have a stateImageList with 21 images. Any image above the 15th e.g. treeNode.StateImageIndex = 15, generates an ArgumentOutOfRangeException with message: InvalidArgument=Value of '15' is not valid for 'StateImageIndex' A max value isn't documented as far as I see. What am I missing? Thanks

    C# question

  • Disabling the browser back button
    A Abisodun

    You shouldn't be able to as far as I know. One practice is to prevent the page from caching i.e. In your aspx page: <% Response.CacheControl = "no-cache"; Response.AppendHeader("Pragma", "no-cache"); Response.Expires = -1; Response.Cache.SetNoStore(); %> Some combination of these commands should stop caching. Then use the pageload event to redirect as necessary. Good Luck.

    ASP.NET tutorial

  • How can i fire event from UserControl to the Dialog ?
    A Abisodun

    myControl.Click1 += new MyControl.ClickHandler(yourClickHandlerMethodInTheDialog); myControl here is an instance of the user control whose class name is MyControl.

    Yanshof wrote:

    What i need to know ( and does not understand ) is the dialog know about the existing of the click event before i create the connection between the dialog and the User Control ?

    The instance myControl only exists at run time in all cases (even if you're using the VS Designer). -- modified at 8:33 Monday 30th July, 2007

    C# question help

  • How can i fire event from UserControl to the Dialog ?
    A Abisodun

    In the user control declare a delegate and event: public event ClickHandler Click1; public delegate void ClickHandler(EventArgs e); In the button's click event raise the event: i.e. if (null != Click1) Click1(e); In the dialog add a handler for Click1: myControl.Click1 += YourHandler

    C# question help

  • Capturing the Current Line of Text from RichTextBox [modified]
    A Abisodun

    I'm sure there are several solutions but my first thought is as follows: e.g. first second third fourth that wraps fourth that wraps fourth that wraps fourth that wraps string[] lines = richTextBox.Lines; i.e. lines[0] returns "first", lines[3] returns "fourth that wraps fourth that wraps fourth that wraps fourth that wraps". 1) Create a class LineClass with properties: int FirstCharacter, int LastCharacter, string Line. 2) Add an entry for each line to a List. Remember there is a return character between lines so that in my example: first instance of LineClass FirstCharacter=0, LastCharacter=4, Line=first second instance of LineClass FirstCharacter=6, LastCharacter=11, Line=second 3) Use GetFirstCharIndexOfCurrentLine to determine the cursor location. 4) Loop through List to get the line you need. If the line is a result of wrapping, your answer in 3) will fall between FirstCharacter and LastCharacter for that entry. Otherwise it will equal FirstCharacter. Good Luck.

    C# database question workspace

  • boolean variable as null
    A Abisodun

    bool? myBool = null;

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