NickTheGreek Δημοσ. 29 Σεπτεμβρίου 2001 Δημοσ. 29 Σεπτεμβρίου 2001 Esto oti ftiaxnoume ena programma me thn vb6,pou periexei 3 command buttons.Ta command1.command2,command3.To onomazoume Progr1 kai to metatrepoume se EXE.<P>Ftiaxnoume ena deutero programmataki sto opoio bazoume tis akolouthes entoles:<P>Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long<BR>Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hwnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long<P>dim hwnd1 as long,ret as long<BR>dim comstr as string<P>hwnd1=findwindow(vbnullstring,"Progr1")<P>comstr="command1" (ena apo ta commands tou Progr1)<BR>if hwnd1<>0 then<BR> ret=findwindowex(hwnd1,0,vbnullstring,comstr) <BR> <BR>To programma tha entopisei ena apo ta commands tou Progr1 alla etsi kai prospathisoume na entopisoume ta alla allazontas thn metabliti se comstr=command2 h command3 tha apotixoume.Kano kapou lathos???Ksereis kaneis giati h pos parakamptetai???
Paulus Δημοσ. 29 Σεπτεμβρίου 2001 Δημοσ. 29 Σεπτεμβρίου 2001 O kwdikas sou einai swstos -kai bgazei apotelesma kai gia ta tria buttons -prosekse mono to onoma tis formas toy Prog1 na einai "Prog1"-kai prosekse to programma apo to opoio trexeis ti routina na min exei forma me caption "Prog1".
Paulus Δημοσ. 29 Σεπτεμβρίου 2001 Δημοσ. 29 Σεπτεμβρίου 2001 ...oxi to onoma tis formas ,to caption tis formas ithela na pw-opws kai anti gia "Prog1" fysika "Progr1"...
NickTheGreek Δημοσ. 30 Σεπτεμβρίου 2001 Μέλος Δημοσ. 30 Σεπτεμβρίου 2001 Eixes dikio gia to programma den to eixa dokimasei sorry.Htan omos endeiktiko.Auto pou thelo na kano einai na bro prota to hwnd enos RichTextBox enos allou programmatos kai epeita na allakso to text tou os eksis:<BR>Esto oti exoume idi ftiaksei ena programma (prog1) me orismena textboxes px rtext1,rtext2 kai rtext3<BR>Ftiaxnoume ena deutero:<P>Dim hwnd1 As Long, ret As Long<BR>Dim comstr As String, msg As String<P><BR>hwnd1 = FindWindow(vbNullString," Progr1") <P>comstr = "rtext2" '(ena apo ta rtexts tou Progr1)<BR>If hwnd1 <> 0 Then<BR> ret = FindWindowEx(hwnd1, 0, vbNullString, comstr)<BR> if ret<>0 then <BR> msg = "Ola ok"<BR> ret = SendMessage(ret, &HC, 0&, ByVal msg) 'allagh tou text tou parathirou me .hwnd=ret se text=msg<BR>end if<P>End If<P><BR>E to text tou Progr1 den prokeitai pote na allaksei...oute kan to .hwnd tou rtext den tha brei.An exeis lush s'auto kala tha 'tane.<BR>Basika to problima parakamptetai an me to pou tha treksoume to Progr1 apothikeusoume se ena arxeio ta hwnd twn textboxes kai epeita paroume tous arithmous autous kateutheian me to deutero programma xoris na anagkastoume na tous broume monoi mas,alla den m'aresoun tetoies luseis.Ase pou mou gine emmoni idea ti ftaiei.<P>Ypopsin oti douleuei me kanonika textboxes.
NickTheGreek Δημοσ. 30 Σεπτεμβρίου 2001 Μέλος Δημοσ. 30 Σεπτεμβρίου 2001 Ksexasa to declare tou sendmessage<BR>Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long<P>Private Const WM_SETTEXT = &HC
Paulus Δημοσ. 4 Οκτωβρίου 2001 Δημοσ. 4 Οκτωβρίου 2001 Eisai poli konta se kati kalo Mou thimises ena prog pou eixa ftiaksei gia na blepeis keimeno katw apo asteriskous (password -opws sto connect- try it!!)
NickTheGreek Δημοσ. 5 Οκτωβρίου 2001 Μέλος Δημοσ. 5 Οκτωβρίου 2001 Xexe.Den psaxno kati tetoio pantos an kai nomizo oti m'ena mono api ginetai h olh douleia me tous asteriskous.
Paulus Δημοσ. 7 Οκτωβρίου 2001 Δημοσ. 7 Οκτωβρίου 2001 <BLOCKQUOTE><font size="1" face="Verdana, Helvetica, sans-serif">quote:</font><HR>Originally posted by NickTheGreek:<BR><STRONG>Xexe.Den psaxno kati tetoio pantos an kai nomizo oti m'ena mono api ginetai h olh douleia me tous asteriskous.</STRONG><HR></BLOCKQUOTE><P>Swsta mantepses-apla gnwrizontas briskontas to handle tou edit control stelneis SendMessage to WM_GETTEXT.
Προτεινόμενες αναρτήσεις
Αρχειοθετημένο
Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.