|
-
Jul 14th, 2005, 07:27 PM
#1
Thread Starter
Lively Member
basic code convert
who can convert this code(Visual Basic Code) to C# code
VB Code:
Dim objInstances As Object, objIE As Object
Set objInstances = CreateObject("Shell.Application").windows
If objInstances.Count > 0 Then
For Each objIE In objInstances
MsgBox objIE.LocationURL
Next
Else
MsgBox " no instances of explorer or InternetExplorer are open!"
End If
-
Jul 14th, 2005, 08:48 PM
#2
Sleep mode
Try this :
Code:
object objInstances=null;
objInstances=CreateObject("Shell.Application").windows;
if (objInstances.Count > 0)
{
foreach(object objIE in objInstances)
{
MessageBox.Show(objIE.LocationURL);
}
}
else
{
MessageBox.Show(" no instances of explorer or InternetExplorer are open!");
}
-
Jul 15th, 2005, 01:33 AM
#3
-
Jul 15th, 2005, 04:07 AM
#4
Thread Starter
Lively Member
Re: basic code convert
C: \WindowsApplication29\Form1.cs(93): The name 'CreateObject' does not exist in the class or namespace 'WindowsApplication29.Form1'
-
Jul 15th, 2005, 05:57 AM
#5
Sleep mode
 Originally Posted by ayman_rapper
C: \WindowsApplication29\Form1.cs(93): The name 'CreateObject' does not exist in the class or namespace 'WindowsApplication29.Form1'

http://www.dotnet247.com/247referenc...25/127340.aspx
-
Jul 16th, 2005, 03:30 AM
#6
Fanatic Member
Re: basic code convert
#Develop (the open source IDE) will convert C# to VB.NET and back.
"so just keep in mind that fantasy is not the same as realtiy and make sure u remember that wii sports may be fun but u cant count on it as exercise ok cool bye" - HungarianHuman
-
Jul 20th, 2005, 02:00 AM
#7
Re: basic code convert
 Originally Posted by grilkip
#Develop (the open source IDE) will convert C# to VB.NET and back.
I've heard bad stories about SharpDevelop. So I never even tried it.
-
Jul 20th, 2005, 07:09 AM
#8
Fanatic Member
Re: basic code convert
 Originally Posted by mendhak
I've heard bad stories about SharpDevelop. So I never even tried it.
Perhaps, but its handy to quickly convert snippets of C# to VB.NET or vice versa
"so just keep in mind that fantasy is not the same as realtiy and make sure u remember that wii sports may be fun but u cant count on it as exercise ok cool bye" - HungarianHuman
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|