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
E

econy

@econy
About
Posts
196
Topics
80
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Function parameter question
    E econy

    Then use pointer is not the same thing ?

    C / C++ / MFC question

  • Function parameter question
    E econy

    struct node{
    int key;
    node* head;
    }

    node *head = NULL;
    void func(node* &h,int n, int m)
    {
    if(n > m)
    return;
    else {
    int mid = (n+m)/2;
    func(h->head,n,mid-1);
    func(h->head,mid+1,m);
    }
    }

    I am wonder what is the difference of parameter: func(node* &h, int n, int m) and func(node* h,int n, int m) what is the usefulness of node *&h.

    C / C++ / MFC question

  • MenuItem question
    E econy

    I want to change the Text of a Menuitem dynamically in runtime. I can get a Menuitem in the Menuitems collection, but it's Name property is empty.

    For Each fp In My.Forms.GetType.GetProperties
    If fp.Name = "BaseForm" Then
    For Each mnu As MenuItem In Me.Menu.MenuItems

    But in property window, the Menuitem has Name property, it's same as a name of field variable, like: MnuBaseFile

    Visual Basic question

  • MenuItem question
    E econy

    Solved, use Setvalue

    Visual Basic question

  • MenuItem question
    E econy

    Public Class BaseForm
    Inherits System.Windows.Forms.Form
    ......
    Friend WithEvents MnuBaseFile As System.Windows.Forms.MenuItem
    Friend WithEvents MnuBaseWindow As System.Windows.Forms.MenuItem
    Friend WithEvents MnuBaseFileExit As System.Windows.Forms.MenuItem
    ....
    For Each fp In My.Forms.GetType.GetProperties
    If fp.Name = "BaseForm" Then
    For Each mnu As MenuItem In Me.Menu.MenuItems

    Here I can get mnu.text = &File, But mnu.Name = "", Nothing. And I try to use the following block:

    Dim fi As System.Reflection.FieldInfo() = bfType.GetFields(BindingFlags.NonPublic Or BindingFlags.Instance Or BindingFlags.DeclaredOnly)

    For Each f As System.Reflection.FieldInfo In fi
    If (f.FieldType.Name.ToString() = "MenuItem") Then
    mnuNameStr = f.Name.Remove(0, 1)
    End If

    Now I can get field's name, but I can't use field to set text for the menu. How can I get a field's name, the Menuitem's name, then set the text for the Menuitem?

    Visual Basic question

  • Reflection question
    E econy

    Thanks

    Visual Basic data-structures question

  • Reflection question
    E econy

    I try to use reflection to get a list of member fields in a form class.

    Public Class BaseForm
    Inherits System.Windows.Forms.Form
    ......
    Friend WithEvents MnuBaseFile As System.Windows.Forms.MenuItem
    Friend WithEvents MnuBaseWindow As System.Windows.Forms.MenuItem
    Friend WithEvents MnuBaseFileExit As System.Windows.Forms.MenuItem
    Friend WithEvents BaseFormTimer As System.Timers.Timer
    Friend WithEvents MenuMainSeparator1 As System.Windows.Forms.MenuItem
    Friend WithEvents HelpProvider As System.Windows.Forms.HelpProvider

    .....
    Dim fi As System.Reflection.FieldInfo() = My.Forms.BaseForm.GetType().GetFields()

    But I failed, the length of fi is zero, the fi is empty array.

    Visual Basic data-structures question

  • MFC multi languages UI question
    E econy

    I implemented a multi language UI in a MFC program, since only a few controls, so I write translation in code, I knew it can be implemented with DLL, or String Table. Now I wonder what way is better, in code, string table, or DLL,according to run time performance and space consuming. :)

    ATL / WTL / STL c++ design performance question

  • How can I use a string as the name to search controls in an application?
    E econy

    Some are opened, some are not

    Visual Basic question regex

  • How can I use a string as the name to search controls in an application?
    E econy

    The application has about 30 forms, some forms have menubars. All forms and controls are singleton pattern. I want to search all controls in the application to find a control instance with the specific string name, like, "MenuLogin". I tried Me.Controls, but it only contain the controls of the current form. Thanks

    Visual Basic question regex

  • Generic problem of VB.NET
    E econy

    I try to use Assembly.GetExecutingAssembly(). Thanks

    C# tutorial csharp help

  • Generic problem of VB.NET
    E econy

    Sure, Thanks. I rewrote my question. In fact, I don't want to create a new object, I just want to find the object with the name: xx-YY.

    C# tutorial csharp help

  • Generic problem of VB.NET
    E econy

    I have some strings to represent the names of forms and controls. for example; MenuLogin = name of an instance of System.Windows.Forms.MenuItem Now I want to assign Text value to the object whose name is the string at run time. I.e:

    s1 = "MenuExit"
    Object(s1).Text = Exit login window //find an object,Name:MenuExit

    I can't find a method in the Object that can search an object with name "MenuExit" in the application. Please tell me how to implement it, thanks.

    C# tutorial csharp help

  • How to change Window.Title property?
    E econy

    I want to change the fontsize of the Window.Title, But I found < Window FontSize = "14" > not worked for the Title, just for the content of window.

    WPF tutorial question

  • The difference of Style on Button and TextBlock,
    E econy

    Thanks, Yes, I wrote code like that,I wonder why the Setter for Button not works for all Buttons without . But, the Setter for TextBlock works for all TextBlocks, don't need to type <Style StaticResource ...></x-turndown>

    WPF csharp wpf

  • The difference of Style on Button and TextBlock,
    E econy

    <Setter Property="HorizontalAlignment" Value="Center" />
    <Setter Property="FontFamily" Value="Comic Sans MS"/>
    <Setter Property="FontSize" Value="20"/>

        <Setter Property="Height" Value="36"/>
            <Setter Property="Width" Value="60"/>
        
    
    <Button Content="Button" Style="{StaticResource ButtonStyle}"/>
        <Button Content="Button" Style="{StaticResource ButtonStyle}" Margin="156,144,286,145" />
    

    I am a rookie in WPF, I am wonder why the Button need : Style="{StaticResource ButtonStyle}" , a explicit Style syntax. But the TextBlock don't need it. Thanks

    WPF csharp wpf

  • window set fontsize question
    E econy

    Thanks

    WPF question

  • window set fontsize question
    E econy

    Don't know why the Fontsize="14" attribute not works on MenuItem, File,Login,Exit.

    WPF question

  • BitBlt() function performance question
    E econy

    Thanks,image without dirctx components inside

    C / C++ / MFC performance question

  • BitBlt() function performance question
    E econy

    The background picture is 800*600, 24 color depth, so it is about 1.44 MB. Did you think the picture size would affect the BitBlt() speed?

    C / C++ / MFC performance 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