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".
akira32
Posts
-
C# how to let textbox always keep in autocomplete?(Windows Form) -
C# how to let textbox always keep in autocomplete?(Windows Form)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); }
-
ASP.NET Local Storage save a item of DataSet XML failtureI 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 VB cannot change Label'sText by JavascriptI 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)
-
How to return 2-dimension array in a functiongood,thank you all
-
How to return 2-dimension array in a functionIn 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;
}
-
How do I use std::stringstream to format data to a string like sprintf "%02d"[modified]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
-
How to hide MFC dialog to tray icon in the bottomright ToolbarCould 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.
-
CLR,How do I calculate FPSNot for video. I use for DirectX.
-
CLR,How do I calculate FPSFPS 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
-
Visual C++ CLR,How to design the UI like Adobe After Effects's TimeLine PanelI 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?
-
CLR,How do I calculate FPSI 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(); }
}
-
How to use PropertyGrid to browse and modify the attributes of customized objectI 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
-
CLR,What is the event for the scrolling of middle mouse scroll?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.
-
How to use PropertyGrid to browse and modify the attributes of customized objectI 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; }
-
CLR,How to modify the AutoScrollMinSize of Form1 by coding? [modified]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
-
CLR,How to put any type controls on Toolstrip?Could somebody know how to put any type controls on Toolstrip? I want to put TrackBar and DomainUpDown controls to the Toolstrip.
-
CLR,How to set RootFolder of FodlerBrowserDialog to be Current Working DirectoryThanks. I has solved this problem.
-
How to render DirectX9 on my CLR customed control?Thanks. I has solved this problem.
-
CLR,How to set RootFolder of FodlerBrowserDialog to be Current Working DirectoryFolderBrowserDialog FolderBrowserDialog1; //FolderBrowserDialog1.RootFolder=System::Environment::SpecialFolder::Startup;