Click here to Skip to main content
16,005,037 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: UNSETCOMMA Pin
Briga14-Oct-05 1:19
Briga14-Oct-05 1:19 
GeneralRe: UNSETCOMMA Pin
Greeky14-Oct-05 1:23
Greeky14-Oct-05 1:23 
GeneralRe: UNSETCOMMA Pin
Briga14-Oct-05 2:29
Briga14-Oct-05 2:29 
GeneralRe: UNSETCOMMA Pin
jo0ls15-Oct-05 16:36
jo0ls15-Oct-05 16:36 
QuestionJoin Tables Pin
Greeky13-Oct-05 23:55
Greeky13-Oct-05 23:55 
AnswerRe: Join Tables Pin
Qhalis14-Oct-05 6:37
Qhalis14-Oct-05 6:37 
QuestionREAD ONLY COMBO CONVERT C++ CODE TO VB.NET Pin
Greeky13-Oct-05 23:26
Greeky13-Oct-05 23:26 
AnswerRe: READ ONLY COMBO CONVERT C++ CODE TO VB.NET Pin
Briga14-Oct-05 1:53
Briga14-Oct-05 1:53 
Greeky wrote:
{
CComboBox::OnEnable(bEnable);

CEdit* pEdit = (CEdit*)GetWindow(GW_CHILD);
pEdit->EnableWindow(TRUE);
pEdit->SetReadOnly(!bEnable);
}



CComboBox::OnEnable(bEnable);
is equal to
MyBase.OnEnable(bEnable)

Now for the pointer that's more tricky. First I don't know the CEdit and the GetWindow function/method so you have to sort it out how to apply it.

If you only get a pointer as a result then:
CEdit* pEdit = (CEdit*)GetWindow(GW_CHILD);
Dim pEdit as IntPtr = GetWindow(GW_CHILD)

But if you want to access objects you need to make use of GCHandle, and that's where I don't have a full knowledge. I guess your code should be:

Dim pGCH as GCHandle
pGCH=GCHanlde.Alloc(pEdit)
Dim mEdit as cEdit = pGCH.Target

and then
pEdit->EnableWindow(TRUE);
pEdit->SetReadOnly(!bEnable);
mEdit.EnableWindow(True)
mEdit.SetReadOnly(Not bEnable)

finish by freeing garbage collector:
pGCH.Free

As I said I'm not 100% sure about the GCHanlde so give it a try, anyone is welcomed in jumping in and correct, if necessary, my code.
AnswerRe: READ ONLY COMBO CONVERT C++ CODE TO VB.NET Pin
jo0ls15-Oct-05 12:14
jo0ls15-Oct-05 12:14 
AnswerRe: READ ONLY COMBO CONVERT C++ CODE TO VB.NET Pin
jo0ls15-Oct-05 12:16
jo0ls15-Oct-05 12:16 
QuestionHow to generate an operating system token of other valid network user Pin
farazzzzzz13-Oct-05 21:38
farazzzzzz13-Oct-05 21:38 
QuestionRAW DATA PRINTING ON WINDOWS ME Pin
Greeky13-Oct-05 21:09
Greeky13-Oct-05 21:09 
AnswerRe: RAW DATA PRINTING ON WINDOWS ME Pin
Dave Kreskowiak14-Oct-05 1:29
mveDave Kreskowiak14-Oct-05 1:29 
GeneralRe: RAW DATA PRINTING ON WINDOWS ME Pin
Greeky14-Oct-05 1:51
Greeky14-Oct-05 1:51 
GeneralRe: RAW DATA PRINTING ON WINDOWS ME Pin
Dave Kreskowiak14-Oct-05 4:04
mveDave Kreskowiak14-Oct-05 4:04 
QuestionVB.net or C# Pin
Guerven13-Oct-05 20:24
Guerven13-Oct-05 20:24 
AnswerRe: VB.net or C# Pin
Dave Kreskowiak14-Oct-05 1:23
mveDave Kreskowiak14-Oct-05 1:23 
QuestionChess programming Pin
Byamatsogt13-Oct-05 17:52
Byamatsogt13-Oct-05 17:52 
AnswerRe: Chess programming Pin
munkh-erdene13-Oct-05 17:54
munkh-erdene13-Oct-05 17:54 
AnswerRe: Chess programming Pin
Dave Kreskowiak14-Oct-05 1:21
mveDave Kreskowiak14-Oct-05 1:21 
QuestionThe Beep sound question again... Pin
13-Oct-05 11:32
suss13-Oct-05 11:32 
AnswerRe: The Beep sound question again... Pin
jo0ls15-Oct-05 16:57
jo0ls15-Oct-05 16:57 
QuestionSub Script Error Pin
shoaibnawaz13-Oct-05 10:57
shoaibnawaz13-Oct-05 10:57 
QuestionTrouble with Request.ServerVariables("LOGON_USER") Pin
jszpila13-Oct-05 8:54
jszpila13-Oct-05 8:54 
AnswerRe: Trouble with Request.ServerVariables("LOGON_USER") Pin
Dave Kreskowiak13-Oct-05 9:59
mveDave Kreskowiak13-Oct-05 9:59 

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.