|
You can use some XML reader or DataSet.ReadXml().
|
|
|
|
|
Can help with some sample code in vb.net?
Saseendran Kombath
|
|
|
|
|
You can google "VB.NET how to read XML file" or "DataSet.ReadXml()" ..
|
|
|
|
|
I'm using the AppActivate function to bring an application to focus. This function works if the application has not been minimised. If it is minimised, AppActivate function won't bring the specified application to focus.
Thanks
Graeme G
I am always greteful for any help!
|
|
|
|
|
Hello
I want to make a chat program used to talk between 2 computers connected by LAN.
But I couldn't, I made a good one in VB6 using WinSock.
But in VB.NET, it isn't the same.
So can anybody give me a sample, or at least tell how to do it?
Thanks
modified on Sunday, December 16, 2007 6:44:02 PM
|
|
|
|
|
There are plenty of those around (.net remoting chat etc.) - just search for "chat" here
|
|
|
|
|
I searched and looked around, but I got nothing what I need.
Can you help me more please?
|
|
|
|
|
look here[^]">
for example
|
|
|
|
|
The sample you gave me is a VC.NET project.
I don't have VC.NET, but only VB.NET, so I couldn't open it.
What should I do?
Thanks
|
|
|
|
|
I want to manipulate a simple program from my VB - I need to insert s short text in a field and activate a button in the program. Is anyone know how to do that? Thanks, Ronny
|
|
|
|
|
Depends on what the other program is. No matter what, you'd be better off in C++, but with p/invoke you may be able to do it
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have been able to do some successful outlook automation using VB.Net and create a new mail message with the address, subject, and body filled out as below:
Dim app As Outlook.Application = New Outlook.Application
Dim appNameSpace As Outlook._NameSpace
Dim memo As Outlook.MailItem
appNameSpace = app.GetNamespace("MAPI")
appNameSpace.Logon(Nothing, Nothing, False, False)
memo = app.CreateItem(Outlook.OlItemType.olMailItem)
memo.To = "sample@gmail.com"
memo.Subject = "Reminder"
memo.Body = sampletext
memo.Display()
What I would like to next is highlight all the body text and do a find and replace on some words in the text. I haven't been able to make enough sense of the macro recorder on outlook to successfully do this, though. It looks like the way to do this in VBA is:
Selection.WholeStory
memo.Selection.Find.Text = "original_text"
memo.Selection.Find.Replacement.Text = "replacement_text"
memo.Selection.Find.Execute(Replace:=wdReplaceAll)
However, I am having a hard time doing this in VB.Net. I feel like I'm must be missing something really easy. I have done this before using MS Word automation with no troubles. Can anyone steer me in the right direction? Thanks!
Craig
"That rug really tied the room together."
modified on Tuesday, December 11, 2007 12:09:48 PM
|
|
|
|
|
|
Here is my problem...I have the following class:
Public Class Login 'in Database_Class library
Public m_User As String
Public m_Password As String
Public Sub New()
End Sub
Public Property UserName() As String
Get
Return m_User
End Get
Set(ByVal value As String)
m_User = value
End Set
End Property
Public Property Password() As String
Get
Return m_Password
End Get
Set(ByVal value As String)
m_Password = value
End Set
End Property
End Class
This class is going to hold login information...I have a form that a user will enter in the user name and password.
My question is this. I am trying to connect to a database using a connection string (which works). I dont want to provide my username and password directly into the connection string so I decided to set up a class for my login info so i can use a login form. I want to append the user name and password into the connection string and it doesnt work. I have the following in my connection class...
Imports Database_Class 'The class library that contains the Login Class
Imports System.Data.oracleClient
Public Class Connection
Public Shared Function GetConnection() As OracleConnection
Dim connectionString As String = "Data Source = PIDBDEV; User ID= " & UserName & ";Password = " & Password & " ;Unicode = True;"
Return New OracleConnection(connectionString) Return New OracleConnection(connectionString)
End Function
so what am I doing wrong? How do you access the values contained in a property contained in a class library in another class??
Erica
|
|
|
|
|
You pass the instance of your Login class to this method so it can use the information inside it to create the connection string.
Also, change the m_User and m_Password fields to Private, not Public. You're aslready exposing the fields as public Properties so you don't need to expose them twice.
Imports Database_Class
Imports System.Data.oracleClient
Public Class Connection
Public Shared Function GetConnection(ByVal credentials As Login) As OracleConnection
Dim connectionString As String = _
String.Format("Data Source = PIDBDEV; User ID={0};Password = {1};Unicode = True;", _
credentials.UserName, credentials.Password)
Return New OracleConnection(connectionString) Return New OracleConnection(connectionString)
End Function
|
|
|
|
|
wow thanks dave...the only thing is now when I am creating a new instance of the connection how do I pass the credentials to the function?
This is how i was doing it when I had the userID and password hardcoded into the connection string...
Dim newConnection As OracleConnection = Connection.GetConnection
this doesnt work:
Dim newConnection As OracleConnection = Connection.GetConnection(credentials as login)
i am trying to understand how to use properties...you have been a great help with the last issue.
Erica
|
|
|
|
|
OK, I would seriously suggest picking up a book on VB.NET and working through it. What your asking is a basic concept you find covered in any beginners book.
You have to create an instance of the Login class, fill in the properties, then pass it to the GetConnection method:
Dim myLoginData As New Login
myLoginData.User = "username"
myLoginData.Password = "password"
Dim conn As OracleConnection = Connection.GetConnection(myLoginData)
|
|
|
|
|
Hi guys,
I added icons to an imagelist which i then associated with a treeview control. The original icons have a transparent background and are of relatively good quality pictures, however when i run my system, they look very grainy at the edges and have a blue border around them when they appear in the treeview at runtime. i used the original icon size (16X16) and a color depth of 32bits. Is there something else about this control and icons or maybe is it haunted?
Thanks a lot for your assistance.
Regards
|
|
|
|
|
Hi,
I have a .NET DLL written in VB 2005. I have to run this in a VB6.0 application.
I've created the .TLB file for the DLL in VB 2005, and successfully imported this reference to the vb6.0 app. All works well on my development machine. However, my problem is distribution. On Package And Deployment through vb6.0, all is transferred successfully to a new machine, but when I run the vb6.0 app, I get the Error:
"Run time error 429. ActiveX component can’t create object"
Any ideas?
Thanks,
Andy
|
|
|
|
|
I think that you must check whether the class library is deployed with the application and it is registered on the other machine. May be your setup project doesn't register class library by default ?
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Thanks for this.
The DLL is deployed by the setup.exe, however it's likely not registered during that process.
Could yoy advise on how to register a DLL on the new machine?
Thank you!
Andy
Actually, it's okay - I've found the Regasm tool! All's well.
modified on Tuesday, December 11, 2007 7:37:28 AM
|
|
|
|
|
I can tell you the command to install some COM component (ActiveX), but I have no experience on how to call external exe from Setup Deployment Project. The command used to register any COM component is -
regsvr32 /i <complete path="" of="" com="" dll="">
Hope this helps.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
RegSvr32 works for COM-based .DLL's only, NOT on .NET .DLL's.
RegAsm works for .NET DLL's, registering them so they can be consumed by COM clients. In the old VB6 Setup and Deployment project, you'd have to customize the project to run the RegAsm as an external app.
|
|
|
|
|
Hi,
anyone know of a function already in .Net to return the monthend date of a specified date?
If I have a date, 30 April 2007, and call:
myDate.AddMonth(1)
It will return 30 May 2007, but thats not the monthend.
Anyone know?
|
|
|
|
|
DateTime.DaysInMonth
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|