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

akira32

@akira32
About
Posts
90
Topics
69
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • C# how to let textbox always keep in autocomplete?(Windows Form)
    A akira32

    Hello CHill60! Thanks your answer. But my problem is that I cannot input the second word with Autocomplete list item. For example, when I input "May Apr", it should be disapeear "May April" for me to select "April". Now it just can work in frist word "May".

    C# csharp tutorial question

  • C# how to let textbox always keep in autocomplete?(Windows Form)
    A akira32

    I use below code to reach the autocomplete in a textbox. But the chance is once, it cannot keep in autocomplete status. When I finish an autocomplete work, and then I cannot key in another autocomplete word. Does somebody know how to let textbox always keep in autocomplete?

    private void Form1_Load(object sender, EventArgs e)
    {
    // Create the list to use as the custom source.
    var source = new AutoCompleteStringCollection();
    source.AddRange(new string[]
    {
    "January",
    "February",
    "March",
    "April",
    "May",
    "June",
    "July",
    "August",
    "September",
    "October",
    "November",
    "December"
    });

    		// Create and initialize the text box.
    		var textBox = new TextBox
    		{
    			AutoCompleteCustomSource = source,
    			AutoCompleteMode =
    				AutoCompleteMode.SuggestAppend,
    			AutoCompleteSource =
    				AutoCompleteSource.CustomSource,
    			Location = new Point(20, 20),
    			Width = ClientRectangle.Width - 40,
    			Visible = true
    		};
    
    		// Add the text box to the form.
    		Controls.Add(textBox);
    
    	}
    
    C# csharp tutorial question

  • ASP.NET Local Storage save a item of DataSet XML failture
    A akira32

    I use ASP.NET with VB. myDataSet is a DataSet with some data. I want to save the DataSet XML to Local Storage and then load the item from Local Storage offline. But now I seem to be failed to write the item of xml to Local Storage. Does somebody know how to solve this problem?

    Dim xml As String = myDataSet.GetXml()
    Dim str As String = " localStorage.setItem('key1', '" & xml & "'); "

    ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "showmessage1", str, False)

    ASP.NET csharp asp-net xml help tutorial

  • ASP.NET VB cannot change Label'sText by Javascript
    A akira32

    I use localStorage to save a item called "key1", and then I want to read the value and display it on Label('LabelLS'). But the Label'text does not change. I am sure localStorage get the key1 item(I had used document.write(d) to print key1 item). Does somebody know how to solve it?

    Protected Sub ButtonSubmit_Click(sender As Object, e As EventArgs) Handles ButtonSubmit.Click

    Dim str2 As String = " var d = localStorage.getItem('key1'); var c = document.getElementById('LabelLS'); c.innerHTML = d; "

    ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "showmessage2", str2, False)

    ASP.NET csharp javascript asp-net tutorial question

  • How to return 2-dimension array in a function
    A akira32

    good,thank you all

    C / C++ / MFC data-structures help tutorial

  • How to return 2-dimension array in a function
    A akira32

    In getA, I can get 1-dimension array. But in getB, it will appear the error message as below: Error 2 error C2440: 'return' : cannot convert from 'int [3][2]' to 'int **'

    int* getA()
    {
    int a[2];
    return a;
    }

    int** getB()
    {
    int b[3][2];

    return b;
    

    }

    C / C++ / MFC data-structures help tutorial

  • How do I use std::stringstream to format data to a string like sprintf "%02d"[modified]
    A akira32

    I want to use std::stringstream to format data to a string like sprintf "%02d" as below: char szWord[MAX_PATH]; int nValue=3; sprintf(szWord,"%02d",nValue); How do I do that by std::stringstream?

    modified on Friday, April 9, 2010 5:17 AM

    C / C++ / MFC question

  • How to hide MFC dialog to tray icon in the bottomright Toolbar
    A akira32

    Could somebody know how to hide MFC dialog to tray icon in the bottomright Toolbar? I can open the MFC dialog by click the tray icon or select some menu items I set.

    C / C++ / MFC c++ tutorial question

  • CLR,How do I calculate FPS
    A akira32

    Not for video. I use for DirectX.

    Managed C++/CLI c++ question dotnet data-structures tutorial

  • CLR,How do I calculate FPS
    A akira32

    FPS is frame per second. Sorry! m_FPS is customized strcut as below: ref struct sFPS { sFPS() { Init(); } void Init() { FrameCnt=0; TimeElapsed=0; dFPS=0; } void CalculateFPS() { dFPS = (Double)FrameCnt / (TimeElapsed/1000.0f); } DWORD FrameCnt; DWORD TimeElapsed; Double dFPS; }; In MFC project, I can use the CWinApp::Idle to count the frame number for FPS. But in CLR project. Application::Idle is not always called(must have some windows messages be triggerred), so I cannot use it to calculate FPS if the mouse does not focus on the winform. I want to find a event that will be called at any time.

    modified on Tuesday, November 24, 2009 12:14 AM

    Managed C++/CLI c++ question dotnet data-structures tutorial

  • Visual C++ CLR,How to design the UI like Adobe After Effects's TimeLine Panel
    A akira32

    I want to design a UI like Adobe After Effects's TimeLine Panel as below bitmap: The TimeLIne bitmap:http://pixinfo.com/img/sz/Adobe\_After\_Effects\_6.5/AfterEffects6.5\_02\_od.jpg The TimeLine Panel has two parts. Left part seems to be ListView with Icon and Text,but it has hierarchy like TreeView. Right part has a TrackBar-like time bar and a list shows the animation range(click the item of list to drag-drop the curve of translation,scaling,rotation). How magicial the TimeLine is!! Does somebody havw any idea about the TimeList design? Or How to design the same control like the TimeLine?

    Managed C++/CLI c++ design dotnet com graphics

  • CLR,How do I calculate FPS
    A akira32

    I use Application::Idle to calculate FPS, but it seems to be unsuitable. Becuase the Application::Idle does not like the CWinApp::Idle in MFC. Application::Idle event is not called in every frame. Could somebody know how to calculate FPS in Visual C++ CLR project?

    [STAThreadAttribute]
    int main(array<System::String ^> ^args)
    {
    Application::EnableVisualStyles();
    Application::SetCompatibleTextRenderingDefault(false);

    Form1^ form1=gcnew Form1();
    Application::Idle += gcnew System::EventHandler(form1,&Form1::Form1_Idle);
    Application::Run(form1);
    return 0;
    }

    public: System::Void Form1_Idle(System::Object^ sender, System::EventArgs^ e)
    {
    DWORD currentTime=GetTickCount();
    DWORD deltaTime=currentTime-m_PlayCurrentTime;

    m\_PlayCurrentTime=currentTime;
    
    m\_FPS->FrameCnt++;
    m\_FPS->TimeElapsed+=deltaTime;
    
    if (m\_FPS->TimeElapsed >= 1000)
    {
     m\_FPS->CalculateFPS();
     m\_FPS->TimeElapsed -= 1000;
     m\_FPS->FrameCnt    = 0;
     FPStoolStripStatusLabel->Text=L"FPS=" + m\_FPS->dFPS.ToString(); 
    }       
    

    }

    Managed C++/CLI c++ question dotnet data-structures tutorial

  • How to use PropertyGrid to browse and modify the attributes of customized object
    A akira32

    I had used public property to solve this problem. But... I meet another problem. If SelectedObject is a nested object like basicobject, how to show the parameters of basiceffect in PropertyGrid? public ref class BasicEffect { public: BasicEffect(void) { } virtual ~BasicEffect() { } public: [Browsable(true)] property System::Boolean loop { bool get() { return _loop; } void set(System::Boolean value) { _loop=value; } } private: System::Boolean _loop; }; public ref class UIObject { public: UIObject(void){_basiceffect=gcnew BasicEffect()}; virtual ~UIObject(void){}; public: [Browsable(true)] property int x { int get() { return _x; } void set(int value) { _x=value; } } public: [Browsable(true)] property BasicEffect^ basiceffect2 { BasicEffect^ get() { return _basiceffect2; } void set(BasicEffect^ value) { _basiceffect2=value; } } private: int _x; private: BasicEffect^ _basiceffect2; };

    modified on Thursday, November 19, 2009 3:32 AM

    Managed C++/CLI tutorial question

  • CLR,What is the event for the scrolling of middle mouse scroll?
    A akira32

    Could somebody know the even for the scrolling of middle mouse scroll? I want to update the client region when user scrolls the middle mouse scroll.

    Managed C++/CLI question dotnet announcement

  • How to use PropertyGrid to browse and modify the attributes of customized object
    A akira32

    I define a class MyObject. I want to use PropertyGrid to browse and modify the attributes of myObject (MyObject object). Can I reach this goal? If the answer is "Yes". Could sombody tell me how to do? ref class MyObject { public: int x; int y; int rx; int ry; }; private: System::Void FormProperty_Load(System::Object^ sender, System::EventArgs^ e) { MyObject^ myObject=gcnew MyObject(); propertyGrid1->SelectedObject = myObject; }

    Managed C++/CLI tutorial question

  • CLR,How to modify the AutoScrollMinSize of Form1 by coding? [modified]
    A akira32

    I want to modify the AutoScrollMinSize of Form1 by the code as below:

    private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
    {
    this->AutoScrollMinSize.Width=1000;
    this->AutoScrollMinSize.Height=1000;
    }

    But it still not be active. Could somebody know how to modify the AutoScrollMinSize of Form1? PS:already set Form1's AutoScroll as True.

    modified on Tuesday, November 17, 2009 3:24 AM

    Managed C++/CLI dotnet tutorial question

  • CLR,How to put any type controls on Toolstrip?
    A akira32

    Could somebody know how to put any type controls on Toolstrip? I want to put TrackBar and DomainUpDown controls to the Toolstrip.

    Managed C++/CLI dotnet tutorial question

  • CLR,How to set RootFolder of FodlerBrowserDialog to be Current Working Directory
    A akira32

    Thanks. I has solved this problem.

    Managed C++/CLI dotnet tutorial workspace

  • How to render DirectX9 on my CLR customed control?
    A akira32

    Thanks. I has solved this problem.

    Managed C++/CLI dotnet graphics game-dev docker tutorial

  • CLR,How to set RootFolder of FodlerBrowserDialog to be Current Working Directory
    A akira32

    FolderBrowserDialog FolderBrowserDialog1; //FolderBrowserDialog1.RootFolder=System::Environment::SpecialFolder::Startup;

    Managed C++/CLI dotnet tutorial workspace
  • Login

  • Don't have an account? Register

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