Click here to Skip to main content
16,020,417 members
Home / Discussions / Windows Forms
   

Windows Forms

 
NewsFree Half-Day Windows 7 App Compatibility Labs Available in USA in June Pin
brucedkyle1-Jun-09 12:58
brucedkyle1-Jun-09 12:58 
Questionsaving data to sql database from excel sheet Pin
Choubey Prashant1-Jun-09 3:15
Choubey Prashant1-Jun-09 3:15 
AnswerRe: saving data to sql database from excel sheet Pin
Mycroft Holmes1-Jun-09 17:32
professionalMycroft Holmes1-Jun-09 17:32 
QuestionCursor control in Text Box Pin
sakthii1-Jun-09 0:15
sakthii1-Jun-09 0:15 
AnswerRe: Cursor control in Text Box Pin
Henry Minute1-Jun-09 2:06
Henry Minute1-Jun-09 2:06 
GeneralRe: Cursor control in Text Box Pin
sakthii1-Jun-09 16:05
sakthii1-Jun-09 16:05 
GeneralRe: Cursor control in Text Box Pin
Mycroft Holmes1-Jun-09 17:28
professionalMycroft Holmes1-Jun-09 17:28 
GeneralRe: Cursor control in Text Box [modified] Pin
sakthii2-Jun-09 2:22
sakthii2-Jun-09 2:22 
Thanks for your reply.
I posted this query after searching through net and going through codeproject.
There are many features available for WindowsCE! I am working on WindowsForms.
I am hardcore C Programmer, I am introduced to C++ because of MFC/Visual Studio to create gui to my back end C program library.
I am switching over from MFC to windows forms as i am informed that WF is easy than MFC. I am learning Windows Form now, and i see examples for VB, C# and C++. I prefer to use C++ as i can manage and understand the same compare to other.

I created Windows Forms project using following options:
File->New->Project->VC++(main option)->Windows Forms Application in Visual Studio 2008 professional edition.

I really dont know whether C# or C++ is used by default by the VS2008 while creating the template!

I looked into this site http://msdn.microsoft.com/en-us/library/system.windows.forms.cursor(VS.71).aspx

my requirement is I wish to change the cursor based on button press inside the text control and back to default on clicking another button. I used following code.
private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {
// creating new cursor
System::Windows::Forms::Cursor= gcnew System::Windows::Forms::Cursor("MyCur.cur");
// this should set a cursor for all TextBox inside the form
System::Windows::Forms::TextBox::Cursor::set(mycur);
//setting the focus to textBox1
textBox1->Focus();
}

// to get default cursor
private: System::Void button5_Click(System::Object^ sender, System::EventArgs^ e) {
System::Windows::Forms::Cursor::Current = System::Windows::Forms::Cursors::Default;

}

Result: on button4 press, the whole form gets the new cursor. And the focus given to textBox1, with default cursor!
on button5 press, it is not reverting back to default cursor.

modified on Tuesday, June 2, 2009 8:51 AM

GeneralRe: Cursor control in Text Box Pin
Henry Minute2-Jun-09 2:57
Henry Minute2-Jun-09 2:57 
GeneralRe: Cursor control in Text Box Pin
Baeltazor11-Jun-09 20:10
Baeltazor11-Jun-09 20:10 
AnswerRe: Cursor control in Text Box Pin
Uwe Keim3-Jun-09 20:52
sitebuilderUwe Keim3-Jun-09 20:52 
GeneralRe: Cursor control in Text Box Pin
Baeltazor11-Jun-09 20:12
Baeltazor11-Jun-09 20:12 
Question4-panel splitcontainer Pin
dybs29-May-09 18:34
dybs29-May-09 18:34 
AnswerRe: 4-panel splitcontainer Pin
Henry Minute30-May-09 0:30
Henry Minute30-May-09 0:30 
GeneralRe: 4-panel splitcontainer Pin
dybs30-May-09 4:17
dybs30-May-09 4:17 
GeneralRe: 4-panel splitcontainer Pin
dybs30-May-09 11:48
dybs30-May-09 11:48 
GeneralRe: 4-panel splitcontainer Pin
Henry Minute30-May-09 12:06
Henry Minute30-May-09 12:06 
GeneralRe: 4-panel splitcontainer Pin
dybs3-Jun-09 15:41
dybs3-Jun-09 15:41 
AnswerRe: 4-panel splitcontainer Pin
Eddy Vluggen30-May-09 2:04
professionalEddy Vluggen30-May-09 2:04 
GeneralRe: 4-panel splitcontainer Pin
dybs30-May-09 4:19
dybs30-May-09 4:19 
AnswerRe: 4-panel splitcontainer Pin
dan!sh 30-May-09 2:37
professional dan!sh 30-May-09 2:37 
QuestionFolderListBox and setting the base folder Pin
The Cake of Deceit29-May-09 7:39
The Cake of Deceit29-May-09 7:39 
NewsCertify Your Application with "Compatible with Windows 7" Logo Toolkit -- Launches Today Pin
brucedkyle29-May-09 6:20
brucedkyle29-May-09 6:20 
Questionhow get current record viewd in crystal report in vb.net Pin
Choubey Prashant28-May-09 17:57
Choubey Prashant28-May-09 17:57 
QuestionHowto create a virtual instance of a Modem Device ? Pin
matiboyin26-May-09 19:19
matiboyin26-May-09 19:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.