upcase textbox input?

  • Thread starter Thread starter Wapiti
  • Start date Start date
W

Wapiti

Someone a while back mentioned the use of OpenNetCF's TextboxEx control to
aid in upcasing user input... I've loaded a textboxex control, but am
seeing nowhere to have the user's input upshifted.

how do you recommend, upshifting the user input into a textbox? Preferrably
without a bunch of screen flicker. Can it be done?

Thanks,

Mike
 
Sure, it's a simple modification to the Window style. I swear the OpenNETCF
control supports it.

-Chris
 
ES_UPPERCASE = 8
You should be able to do it with a regular textbox as well.

private void Form1_Load(object sender, System.EventArgs e)

{

textBox1.Capture = true;

IntPtr hWnd = GetCapture();

textBox1.Capture = false;

SetWindowLong(hWnd, GWL_STYLE, GetWindowLong(hWnd, GWL_STYLE) |
ES_UPPERCASE);

}

const int GWL_STYLE = -16;

const int ES_UPPERCASE = 8;

[DllImport("coredll")]
extern static void SetWindowLong(IntPtr hWnd, int dwIndex, int Value);

[DllImport("coredll")]
extern static int GetWindowLong(IntPtr hWnd, int dwIndex);

[DllImport("coredll")]
extern static IntPtr GetCapture();
 
This works in VB as well?

Alex Feinman said:
ES_UPPERCASE = 8
You should be able to do it with a regular textbox as well.

private void Form1_Load(object sender, System.EventArgs e)

{

textBox1.Capture = true;

IntPtr hWnd = GetCapture();

textBox1.Capture = false;

SetWindowLong(hWnd, GWL_STYLE, GetWindowLong(hWnd, GWL_STYLE) |
ES_UPPERCASE);

}

const int GWL_STYLE = -16;

const int ES_UPPERCASE = 8;

[DllImport("coredll")]
extern static void SetWindowLong(IntPtr hWnd, int dwIndex, int Value);

[DllImport("coredll")]
extern static int GetWindowLong(IntPtr hWnd, int dwIndex);

[DllImport("coredll")]
extern static IntPtr GetCapture();


--
Alex Feinman
---
Visit http://www.opennetcf.org
Chris Tacke said:
Sure, it's a simple modification to the Window style. I swear the
OpenNETCF
control supports it.

-Chris
 
But supports it how? A method? I can't find reference to it anywhere??
Maybe I'm missing something...
 
Certainly. You shouldn;t have any problems translating it to VB

--
Alex Feinman
---
Visit http://www.opennetcf.org
Wapiti said:
This works in VB as well?

Alex Feinman said:
ES_UPPERCASE = 8
You should be able to do it with a regular textbox as well.

private void Form1_Load(object sender, System.EventArgs e)

{

textBox1.Capture = true;

IntPtr hWnd = GetCapture();

textBox1.Capture = false;

SetWindowLong(hWnd, GWL_STYLE, GetWindowLong(hWnd, GWL_STYLE) |
ES_UPPERCASE);

}

const int GWL_STYLE = -16;

const int ES_UPPERCASE = 8;

[DllImport("coredll")]
extern static void SetWindowLong(IntPtr hWnd, int dwIndex, int Value);

[DllImport("coredll")]
extern static int GetWindowLong(IntPtr hWnd, int dwIndex);

[DllImport("coredll")]
extern static IntPtr GetCapture();


--
Alex Feinman
---
Visit http://www.opennetcf.org
Chris Tacke said:
Sure, it's a simple modification to the Window style. I swear the
OpenNETCF
control supports it.

-Chris

Someone a while back mentioned the use of OpenNetCF's TextboxEx control
to
aid in upcasing user input... I've loaded a textboxex control, but am
seeing nowhere to have the user's input upshifted.

how do you recommend, upshifting the user input into a textbox?
Preferrably
without a bunch of screen flicker. Can it be done?

Thanks,

Mike
 
Very well then, I'll give it a shot. Thanks.

Alex Feinman said:
Certainly. You shouldn;t have any problems translating it to VB

--
Alex Feinman
---
Visit http://www.opennetcf.org
Wapiti said:
This works in VB as well?

Alex Feinman said:
ES_UPPERCASE = 8
You should be able to do it with a regular textbox as well.

private void Form1_Load(object sender, System.EventArgs e)

{

textBox1.Capture = true;

IntPtr hWnd = GetCapture();

textBox1.Capture = false;

SetWindowLong(hWnd, GWL_STYLE, GetWindowLong(hWnd, GWL_STYLE) |
ES_UPPERCASE);

}

const int GWL_STYLE = -16;

const int ES_UPPERCASE = 8;

[DllImport("coredll")]
extern static void SetWindowLong(IntPtr hWnd, int dwIndex, int Value);

[DllImport("coredll")]
extern static int GetWindowLong(IntPtr hWnd, int dwIndex);

[DllImport("coredll")]
extern static IntPtr GetCapture();


--
Alex Feinman
---
Visit http://www.opennetcf.org
"Chris Tacke, eMVP" <ctacke[at]OpenNETCF_dot_org> wrote in message
Sure, it's a simple modification to the Window style. I swear the
OpenNETCF
control supports it.

-Chris

Someone a while back mentioned the use of OpenNetCF's TextboxEx
control to
aid in upcasing user input... I've loaded a textboxex control, but am
seeing nowhere to have the user's input upshifted.

how do you recommend, upshifting the user input into a textbox?
Preferrably
without a bunch of screen flicker. Can it be done?

Thanks,

Mike
 
Back
Top