Click here to Skip to main content
15,891,248 members
Home / Discussions / C#
   

C#

 
GeneralRe: MouseMove event confusion Pin
Saksida Bojan27-Feb-10 2:22
Saksida Bojan27-Feb-10 2:22 
GeneralRe: MouseMove event confusion Pin
ahmetkoc27-Feb-10 2:25
ahmetkoc27-Feb-10 2:25 
GeneralRe: MouseMove event confusion Pin
Saksida Bojan27-Feb-10 2:30
Saksida Bojan27-Feb-10 2:30 
GeneralRe: MouseMove event confusion Pin
Luc Pattyn26-Feb-10 6:56
sitebuilderLuc Pattyn26-Feb-10 6:56 
QuestionWindows mobile screen rotation - C# Pin
john3426-Feb-10 1:33
john3426-Feb-10 1:33 
AnswerRe: Windows mobile screen rotation - C# Pin
Alan Balkany26-Feb-10 4:26
Alan Balkany26-Feb-10 4:26 
GeneralRe: Windows mobile screen rotation - C# Pin
john343-Mar-10 1:50
john343-Mar-10 1:50 
GeneralRe: Windows mobile screen rotation - C# Pin
Alan Balkany3-Mar-10 4:07
Alan Balkany3-Mar-10 4:07 
The code I have is in C++/MFC, so I don't know if you could use it. I don't have it here right now, but here's the general approach I used:

1. I invented a language called WASP (Window Arrangement Specification Protocol) which consisted entirely of ints, so I could easily store it in a static array in the class. This avoided all parsing and syntax issues. #defines were used for the ints to make the WASP program human-readable.

2. Each WASP op code was followed by the MFC int ID(s) of one or more dialog controls, and parameters. Each percentage (for the extra space for that control) was an int representing the numerator, assuming a 32768 denominator. This avoided having to encode floating-point percentages in the WASP program.

3. Sample WASP ops: Add a given percentage of the extra space in the X direction to the following control(s), terminated by a -1. Space the given controls evenly in the allotted extra space.

4. I also created a Wasp class that (as I recall) took a pointer (reference in C#) to the dialog, and the int array containing that dialog's WASP program. Each dialog called a method in the Wasp class to execute the WASP program to arrange the controls before it was first shown.

5. On startup, the screen dimensions are obtained and stored in static members in the WASP class to get the extra space we have to work with in both dimensions.
QuestionRegistry Pin
kk.tvm26-Feb-10 1:11
kk.tvm26-Feb-10 1:11 
AnswerRe: Registry Pin
Bernhard Hiller26-Feb-10 1:37
Bernhard Hiller26-Feb-10 1:37 
GeneralRe: Registry Pin
kk.tvm26-Feb-10 18:01
kk.tvm26-Feb-10 18:01 
QuestionFastest way of filtering a DataTable?? Pin
Muammar©26-Feb-10 0:28
Muammar©26-Feb-10 0:28 
AnswerRe: Fastest way of filtering a DataTable?? Pin
Som Shekhar26-Feb-10 1:08
Som Shekhar26-Feb-10 1:08 
GeneralRe: Fastest way of filtering a DataTable?? Pin
Muammar©26-Feb-10 10:15
Muammar©26-Feb-10 10:15 
GeneralRe: Fastest way of filtering a DataTable?? Pin
Som Shekhar26-Feb-10 10:19
Som Shekhar26-Feb-10 10:19 
GeneralRe: Fastest way of filtering a DataTable?? Pin
Muammar©26-Feb-10 10:28
Muammar©26-Feb-10 10:28 
GeneralRe: Fastest way of filtering a DataTable?? Pin
Som Shekhar26-Feb-10 19:39
Som Shekhar26-Feb-10 19:39 
AnswerRe: Fastest way of filtering a DataTable?? Pin
Dave Kreskowiak26-Feb-10 3:29
mveDave Kreskowiak26-Feb-10 3:29 
GeneralRe: Fastest way of filtering a DataTable?? Pin
Muammar©26-Feb-10 10:24
Muammar©26-Feb-10 10:24 
GeneralRe: Fastest way of filtering a DataTable?? Pin
Dave Kreskowiak26-Feb-10 12:43
mveDave Kreskowiak26-Feb-10 12:43 
QuestionSending mail from yahoo thru application Pin
Hum Dum26-Feb-10 0:26
Hum Dum26-Feb-10 0:26 
AnswerRe: Sending mail from yahoo thru application Pin
Bernhard Hiller26-Feb-10 2:22
Bernhard Hiller26-Feb-10 2:22 
QuestionGeneric List Pin
spankyleo12325-Feb-10 23:51
spankyleo12325-Feb-10 23:51 
AnswerRe: Generic List Pin
Pete O'Hanlon25-Feb-10 23:57
mvePete O'Hanlon25-Feb-10 23:57 
GeneralRe: Generic List [modified] Pin
spankyleo12326-Feb-10 0:12
spankyleo12326-Feb-10 0:12 

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.