Tham khảo tài liệu 'tự học visual basic và bài tập thực hành part 7', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | MsgFunc strMsg vbOKOnly Or vbQuestion gstrTitle GoTo CGError End If Else If Not fValidNTGroupName mstrGroup Then strMsg ResolveResString resGROUPINVALIDGROUP NAME 11 CStr gintMAX_GROUPNAME_LEN I2 . ResolveResString resG ROUPINVALIDCHARS MsgFunc strMsg vbOKOnly Or vbQuestion gstrTitle GoTo CGError End If End If Go ahead and create the main program group If Not fCreateOSProgramGroup mfrm mstrGroup True fPrivate fStartMenu Then GoTo CGError End If fC reate ProgG roup True Exit Function CGError fCreateProgGroup False End Function Private Sub Form_Load Initialize localized control properties. SetFormFont Me Reso veResString resGROUPFRM IT gstrAppName 141 ResolveResString resGROUPLBLMAIN ResolveResString resGROUPLBLGROUP ResolveResStringfresGROUPLBLG ROUPS ResolveResString resGROUPBTNCONTINUE ResotveResString resLOG_vbCancel I Initialize the Program Group text box with the title of the application gstrTitle Load the ListBox with the program manager groups. If TreatAsWin95 Then LoadW95Groups Else LoadProgManGroups End If Initialize the Program Group textbox with the default group selected in the list box. End Sub Private Sub lstGroups_Click End Sub Private Sub txtGroup_Change Len Trim 0 End Sub Sub LoadProgManGroupsO 142 This routine uses DDE to talk to Program Manager to retrieve a list of all the groups it manages. It should only be called if the shell is NT . If it rs Win95 or NT4 call LoadW95Groups instead. Special strings used in this routine. Do not localize these strings. Const strPROGMANLINKTOPIC ProgManlProgman Const strPROGMANLINKITEM Progman Const strNDWGROUP Quick Access Dim strGroups As String Dim strGroup As String Dim intOffset As Integer Dim intAnchor As Integer Dim iGroup As Long .