Click here to Skip to main content
15,881,172 members
Home / Discussions / C#
   

C#

 
GeneralRe: Help reading a binary file Pin
David Williams3-Oct-02 7:38
David Williams3-Oct-02 7:38 
GeneralRe: Help reading a binary file Pin
Eric Gunnerson (msft)3-Oct-02 8:17
Eric Gunnerson (msft)3-Oct-02 8:17 
GeneralPopUp A form in Multi-window environment Pin
Chris#1-Oct-02 5:43
Chris#1-Oct-02 5:43 
GeneralRe: PopUp A form in Multi-window environment Pin
Stephane Rodriguez.1-Oct-02 7:13
Stephane Rodriguez.1-Oct-02 7:13 
GeneralRe: PopUp A form in Multi-window environment Pin
leppie1-Oct-02 7:15
leppie1-Oct-02 7:15 
GeneralUrls from Internet Explorer Pin
csharpthomas1-Oct-02 4:08
csharpthomas1-Oct-02 4:08 
GeneralRe: Urls from Internet Explorer Pin
Stephane Rodriguez.1-Oct-02 7:15
Stephane Rodriguez.1-Oct-02 7:15 
GeneralRe: Urls from Internet Explorer Pin
csharpthomas8-Oct-02 23:53
csharpthomas8-Oct-02 23:53 
Thanks.

I'm a little late responding your mail.
Well, I beg your pardon but still I would say it is a C# topic.
Most of my informations I got from VB. And VB apps seems to be working.
By the way I got the right handle to the comboBox (I guess) and I am able to retrieve informations about total listBox entries and text length of each entry. But I do not succeed retrieving characters or strings.
The fact of handling a ComboBoxEx control does not mind because simple comboBoxes in other applications do not send back characters or strings too.
Here's a reflection on some of my code portions:


[DllImport("user32.exe")]
public static extern int SendMessage(int cbHandle, int Msg, int wParam, object lParam);
...

//constants:
const int CB_GETLBTEXTLEN = 0x0149;
const int CB_GETLBTEXT = 0x0148;
const int CB_GETCOUNT = 0x0146;
...
// the method including the SendMessage-function:
private void listBox2_DoubleClicked(object sender, EventArgs e)
{
   int lbAmount = SendMessage(cbHandle, CB_GETCOUNT, 0, 0);
   char[] ch;
   for(int i = 0; i<lbAmount, i++)
   {
      int txtLength = SendMessage(cbHandle, CB_GETLBTEXTLEN, i, 0);
      ch = new char[txtLength+1];   // includes null termination
      SendMessage(cbHandle, CB_GETLBTEXT, i, ch);
      string itemText = new String(ch);
   // a listbox where to display the quest's result(s):
      listBox3.Items.Add(ch);
   }
}



Can you locate any essential faults or do you think, it is still not a C# topic? Then I will believe you.

Thanks again


Tom LaBenche
GeneralRe: Urls from Internet Explorer Pin
Anonymous9-Oct-02 4:12
Anonymous9-Oct-02 4:12 
GeneralRe: Urls from Internet Explorer Pin
csharpthomas9-Oct-02 5:24
csharpthomas9-Oct-02 5:24 
Generalthrow exception "into" another thread Pin
Rüpel1-Oct-02 0:49
Rüpel1-Oct-02 0:49 
GeneralRe: throw exception "into" another thread Pin
Paul Riley1-Oct-02 1:33
Paul Riley1-Oct-02 1:33 
GeneralRe: throw exception "into" another thread Pin
James T. Johnson1-Oct-02 2:19
James T. Johnson1-Oct-02 2:19 
GeneralRe: throw exception "into" another thread Pin
Philip Fitzsimons1-Oct-02 5:16
Philip Fitzsimons1-Oct-02 5:16 
Generalvb.net vs c# Pin
waleed riaz1-Oct-02 0:37
waleed riaz1-Oct-02 0:37 
GeneralRe: vb.net vs c# Pin
Kevin McFarlane1-Oct-02 0:49
Kevin McFarlane1-Oct-02 0:49 
GeneralRe: vb.net vs c# Pin
David Stone1-Oct-02 11:26
sitebuilderDavid Stone1-Oct-02 11:26 
GeneralRe: vb.net vs c# Pin
Kevin McFarlane2-Oct-02 0:57
Kevin McFarlane2-Oct-02 0:57 
GeneralRe: vb.net vs c# Pin
David Stone2-Oct-02 8:36
sitebuilderDavid Stone2-Oct-02 8:36 
GeneralRe: vb.net vs c# Pin
Stephane Rodriguez.1-Oct-02 1:44
Stephane Rodriguez.1-Oct-02 1:44 
GeneralRe: vb.net vs c# Pin
Philip Fitzsimons1-Oct-02 5:18
Philip Fitzsimons1-Oct-02 5:18 
GeneralDOH ! I lost the default Toolbox Settings.HELP Pin
Jon E30-Sep-02 23:37
Jon E30-Sep-02 23:37 
GeneralRe: DOH ! I lost the default Toolbox Settings.HELP Pin
James T. Johnson1-Oct-02 2:05
James T. Johnson1-Oct-02 2:05 
GeneralRe: DOH ! I lost the default Toolbox Settings.HELP Pin
Dato1-Oct-02 7:20
Dato1-Oct-02 7:20 
Generalerror when docking one form to another Pin
Derek Smigelski30-Sep-02 19:05
Derek Smigelski30-Sep-02 19:05 

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.