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
D

dani kenan

@dani kenan
About
Posts
5
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • CBT HOOK not called sometimes
    D dani kenan

    Hi, I have a hook dll to implement a CBT global hook which help us identify some specific type of windows creation. Lets assume the dll is called "a.dll" and that it is is installed by process "a.exe" using SetWindowsHookEx. Due to performance considerations, the hook should only be installed on processes with name "b.exe". In the DllMain of "a.dll", when dwReason == DLL_PROCESS_ATTACH I check for the hosting process name and ensure it is either "a.exe" or "b.exe", otherwise I return 0, which ensures the dll is not loaded to that process. This works great 99% of the time, but seldom we see glitches, where the cbt hook is not being called, and we miss the creation of some of the windows. Are you familiar with this issue? Can you think of something we are doing wrong? Do you have a better/fully consistent solution for identifying windows creation? 10x Dani

    Windows API help hosting performance question

  • Binding MenuItem.IsChecked to RichTextBox.SpellCheck.IsEnabled
    D dani kenan

    Hi, I have the following deceleration of a rich text box:

    <RichTextBox
    x:Key="rtfBox"
    SpellCheck.IsEnabled = "False"
    ContextMenuService.ShowOnDisabled="True"
    ContextMenu="{StaticResource rtfBoxContextMenu}">
    </RichTextBox>

    And the context menu is defined as a resource on the same xaml as follows:

    <ContextMenu x:Key="rtfBoxContextMenu">
    <MenuItem Command="Copy"/>
    <MenuItem Command="Cut"/>
    <MenuItem Command="Paste"/>
    <Separator/>
    <MenuItem Command="My:MyCommands.ToggleSpellChecker" IsCheckable="true"/>
    </ContextMenu>

    I would like to bind the check box of the menu item to the state of the spellcheck isenabled property. Please help. What minimal xaml/code is needed for that? 10x

    WPF wpf wcf help question learning

  • Setting the target of a command binding
    D dani kenan

    Hi, I have a wpf rich text box that I open and show in a win32 application. I declare the rtf box in a resource dictionary like so:

    <RichTextBox
    x:Key="rtfBox"
    HorizontalScrollBarVisibility="Auto"
    VerticalScrollBarVisibility="Auto"
    HorizontalAlignment="Stretch"
    VerticalAlignment="Stretch"
    />

    In another place, I have a wpf window which I use as a floating tool bar. I declare it in its own xaml, similar to the following:

    <Window x:Class="BidiFix.SandBox.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    mc:Ignorable="d"
    Title="Window1" AllowsTransparency="True" Focusable="False" ShowActivated="False" ShowInTaskbar="False"
    SizeToContent="Width" Height="24" Topmost="True" Padding="2"
    WindowStyle="None" Background="Transparent" >

    <Border>
    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="2">
    <Button Command="Copy" Context="Copy"/>
    <Button Command="Cut" Context="Cut"/>
    <Button Command="Paste" Context="Paste"/>
    </StackPanel>
    </Border>
    </Window>

    I instantiate and show the window using the following code:

    RichTextBox rtfBox = GetTheBox();
    Window1 win = new Window1();
    win.Show();

    Now, as you can see I have both the rtf box and window available. But the window is not an ancestor of the rtfBox, nor do they share the same xaml. What minimal markup and/or code is needed to connect the Clipboard commands and button states to the rtf box, such that they will reflect their availability based on the selection state in the rich text box and when click will operate on the rich text box. Please help. 10x.

    WPF wpf csharp html wcf com

  • RichTexBox/FlowDocument Macro Recording
    D dani kenan

    Hi, I would like to easily record the changes made to the of RichTextBox (user and/or programmatic) as well as the changes made to the FlowDocument and be able to save and play them again. I was thinking about the do/undo queue of the document. How do I get access to it? Also, can UIAutomation or something like this can help me? In short, can you to me what my options are? 10x Dani

    WPF question data-structures help

  • Weird UpdatePanel status 500 server error
    D dani kenan

    Hi, I have a main page with an update panel and within it a wizard control. The main page is assigned a Master page in which a script manager resides. The wizard buttons are implemented as image buttons inside navigation templates and each of the 3 wizard steps is implemented by a dedicated user control. On each step-control, I have several textboxes and dropdown lists. Some of the controls generate (Async) PostBack to the server. The wizard navigation also generates AsyncPostBack since the whole wizard is inside the updatepanel. The application was tested thoroughly and it causes no problems for clients with relatively good connection. Alas when used by remote clients with slower connection (we assume this is the commonality between those reporting the error), the navigation between pages sometime shows the following error: "Sys.WebForms.PagerequestManagerServerErrorException: An Unknown error occurred while processing the request on the server. The status code returned from the server was 500" Please note: error was manifested only for some client, only some times and only in the navigation, not in the inter-step updates. I have used fiddler and saw that the http response from the server is actually with status 200 but it contains the raw response text is something like "0|error|500||" I tried to log errors on the ScriptManager.AsyncPostBackError event but it seems not to be called. Any suggestions??? 10x in advanced

    ASP.NET wpf sysadmin tools help 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