Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Migration vb6 to vb.net, problem (Microsoft Common Dialog Contro)

views
     
TSwilliam
post Feb 27 2006, 02:47 AM, updated 19y ago

Getting Started
**
Junior Member
184 posts

Joined: Jan 2003
Dear friends,


I have an application which implemented by VB6. In the vb6, it has a component call Microsoft Common Dialog Control 6.0. It was worked well in this application. But, when i want to migrate from VB6 to Vb.Net.Problem arise and it shows out that i don't have Microsoft Common Dialog Control 6.0.

Dim oChildTvNode As MSComctlLib.Node =>vb6 coding

and vb.net ..it shows MSComctlLib is not defined.

Is it Vb.net don't have Microsoft Common Dialog Control 6.0 this component. I try to search internet but still not in the right path. Still scratching my head now.

Hope i can share my problem and discuss together.
shinchan^^
post Feb 27 2006, 08:55 AM

K66
*********
All Stars
21,256 posts

Joined: Jan 2003
From: Pekopon


OpenFileDialog1 <-----------
TSwilliam
post Feb 28 2006, 01:35 AM

Getting Started
**
Junior Member
184 posts

Joined: Jan 2003
QUOTE(shinchan^^ @ Feb 27 2006, 08:55 AM)
OpenFileDialog1 <-----------
*
can you give me in more details..thanks.
TSwilliam
post Feb 28 2006, 01:42 AM

Getting Started
**
Junior Member
184 posts

Joined: Jan 2003
QUOTE(william @ Feb 27 2006, 02:47 AM)
Dear friends,
        I have an application which implemented by VB6. In  the vb6, it has a component call Microsoft Common Dialog Control 6.0. It was worked well in this application. But, when i want to migrate from VB6 to Vb.Net.Problem arise and it shows out that i don't have Microsoft Common Dialog Control 6.0.

Dim oChildTvNode As MSComctlLib.Node =>vb6 coding

and vb.net ..it shows MSComctlLib is not defined.


Is it Vb.net don't have Microsoft Common Dialog Control 6.0 this component. I try to search internet but still not in the right path. Still scratching my head now.

Hope i can share my problem and discuss together.
*
Dim oTvNode As OpenFileDialog but i cannot see my .node. Any help..?

Dim oXmlNode As MYXMLDOM.XMLNODE

anthony_yio
post Mar 2 2006, 08:20 PM

........
Group Icon
Elite
1,828 posts

Joined: Jan 2003


QUOTE(william @ Feb 28 2006, 01:42 AM)
Dim oTvNode As OpenFileDialog but i cannot see my .node. Any help..?

        Dim oXmlNode As MYXMLDOM.XMLNODE
*
VB.NET

CODE
Sub DisplayOpenFileDialog()
   Dim openFile As New System.Windows.Forms.OpenFileDialog()
   openFile.DefaultExt = "doc"
   openFile.Filter = "Word documents (*.doc)|*.doc"
   openFile.ShowDialog()
   If openFile.FileNames.Length > 0 Then
       Dim filename As String
       For Each filename In openFile.FileNames
           ' Insert code here to process the files.
       Next
   End If
End Sub


TSwilliam
post Mar 3 2006, 02:51 AM

Getting Started
**
Junior Member
184 posts

Joined: Jan 2003
what is the vb.net command to open file name?



Public Function load1(ByVal FileName As String) As String
Dim xmlStr As String
Dim xmlLine As String
Dim freeFileNo As Integer
freeFileNo = FreeFile()
open FileName For Input As freeFileNo
If Not EOF(1) Then
Do While Not EOF(freeFileNo)
Input(freeFileNo, xmlLine)
xmlStr = xmlStr & " " & xmlLine
Loop
End If
Close()
load1 = xmlStr
End Function

open is not declare???
what it means method arguments must be enclosed in parentheses??
Give me guidance.Thank you
shinchan^^
post Mar 3 2006, 09:09 AM

K66
*********
All Stars
21,256 posts

Joined: Jan 2003
From: Pekopon


vb.net very easy wat

go to tools drag and drog the openfiledialog into ur form

then can use already


Dothan
post Mar 3 2006, 10:08 AM

Dingle Berries
******
Senior Member
1,020 posts

Joined: Jan 2003


QUOTE(shinchan^^ @ Mar 3 2006, 09:09 AM)
vb.net very easy wat

go to tools drag and drog the openfiledialog into ur form

then can use already
*
You are missing 1 point here. We should remind him the different between VB.net and classic VB.

@william, you know how to use the readied library from Microsoft VB6. But there is a difference to call the readied library from .Net where many things are categorised in dotted form (not the window form). This is a simple explanation I can enlighten you to do coding in .net environment. Just a simple research in MSDN, you will know how to use it well. Happy coding.
TSwilliam
post Mar 9 2006, 10:27 PM

Getting Started
**
Junior Member
184 posts

Joined: Jan 2003
Dear all,
what is MSComctlLib???
Is it a active x control?
It works in vb 6 but in vb.net it can't.
Example:
dim oChildTvNode as mscomctlLib.node ===>vb6

after migrate

dim oChildTvNode as mscomctl.Node ===>vb.net

It show that mscomctl is undefined..
I feel headache and wonder is it in vb.net is not using this kind of active x control.

This post has been edited by william: Mar 9 2006, 10:28 PM
anthony_yio
post Mar 9 2006, 10:35 PM

........
Group Icon
Elite
1,828 posts

Joined: Jan 2003


QUOTE(william @ Mar 9 2006, 10:27 PM)
Dear all,
  what is MSComctlLib???
Is it a active x control?
It works in vb 6 but in vb.net it can't.
Example:
dim oChildTvNode as mscomctlLib.node  ===>vb6

after migrate

dim oChildTvNode as mscomctl.Node  ===>vb.net

It show that mscomctl is undefined..
I feel headache and wonder is it in vb.net is not using this kind of active x control.
*
It is an ActiveX control. (C:\WINDOWS\System32\MSCOMCTL.OCX )

You can still use it in .NET if you like but not as straight forward if you do not want to use the dedicated .NET classes.

cause the mscomctl is not a classname in .NET framework. There is dedicated .NET class for that I suppose.

By the way, to answer why mscomctl no longer present and etc ( or a lot) need to recode.

Try
visual basic 2005
which will solve most your migration problem.




 

Change to:
| Lo-Fi Version
0.0158sec    0.56    5 queries    GZIP Disabled
Time is now: 29th March 2024 - 12:19 AM