|
Use Microsoft Inet control? or try HTTP request with WinSock, but I guess that is harder to do...
greetz
*Niels Penneman*
Software/Dev Site Personal Site
|
|
|
|
|
wininet.dll
InternetOpen
InternetOpenUrl
InternetReadFile
I have a small sample i wrote years ago. let me know if you want a copy.
|
|
|
|
|
I want to access my MDI forms menus from a child form.
like I want to enable all the menus in my MDI form(which is a startup form) after the user
logs in successfully.
How can I access my Mdi forms menus/controls from a child form
Thanks
tasnim.
|
|
|
|
|
If this is VB.NET, use the Form.MdiParent property. If this is VB5 or 6: call the form by its name
greetz
*Niels Penneman*
Software/Dev Site Personal Site
|
|
|
|
|
dear all,
how to draw the waveform of a wave or mp3 file using visual basic....i want to draw the waveform for a playing wav file and also for a static wav file.
Any links tht can help me to do this?
Regards
rIsHaBh
|
|
|
|
|
|
Hi.
I got a problem getting a program i wrote in VB.net to work with excel 2000.
It works well with excel 2002.
The error occures within this code:
ExcelApp = New Excel.Application()
ExcelBook = ExcelApp.Workbooks.Open(ExcelFile, False, True)
ExcelSheet = ExcelApp.ActiveSheet
This is the error i get:
"Object reference not set to an instance of an object.
interop.excel
at Excel.Workbooks.open(String Filename, object Updatelinks .......all the optional attributes.......) "
Odd Magne Vea
|
|
|
|
|
Have you tried to re-import the libraries you are using? Because interop DLLs probably need to be regenerated to work with another file version...
greetz
*Niels Penneman*
Software/Dev Site Personal Site
|
|
|
|
|
Hi, My name is Greg Kelley. I'm a student in college. I'm currently studying Visual Basic.Net. I have a project that I'm working on, and I'm having some problems bringing it all together.I need to create a program that contains the following:
Menu System Required
Merge(2)Files together
Sort the File(First six characters)
Encrypt the file
Decrypt the file
Note: The file must contain 10 records(80 bytes long)
If you could asssist me in this , it would be greatly appreciated. If so, I need to do this in its simpliest form.
Thanks,
Greg Kelley
Greg Kelley
|
|
|
|
|
What are you having problems with? Menus, Merge, Sort, Encrypt/Decrypt??
RageInTheMachine9532
|
|
|
|
|
Thanks for responding. Well to be honest. I having problems with all of those.
This program doesn't have to be complex. Unfortunately, i had some personal issues that required to be absent for the class when all of the above was covered. I've been trying to contruct this on my own but haven't had much success. Your help would greatly be appreciated!!!!
Thanks
Greg Kelley
Greg Kelley
|
|
|
|
|
Buddy, we can help you here, but I think that's your homework. Send me the code you've already done, and I'll give you some help with it.
Free your mind...
|
|
|
|
|
Here is what i've done so far.
'Greg Kelley
'VB Program
'1-9-04
Module Module1
Sub Main()
'Read the contents of File1 to end of file and close.
Dim File1 As New System.IO.StreamReader("c:\words.txt")
Dim word1 As String = File1.ReadToEnd()
File1.Close()
'Reads the content of File2 to end of file and close.
Dim file2 As New System.IO.StreamReader("c:\test.txt")
Dim word2 As String = file2.ReadToEnd()
file2.Close()
'Merges the contents of file1 and file2 into File3 and closes.
Dim File3 As New System.IO.StreamWriter("c:\main.txt,")
File3.WriteLine(word1 & word2)
File3.Close()
End Sub
' Encrypts/decrypts the passed string using
' a simple ASCII value-swapping algorithm
Public Function SimpleCrypt(ByVal Main As String) As String
Dim X As String, i As Integer
' Encrypt
X = SimpleCrypt(Main)
MessageBox.Show(Main)
' Decrypt
X = SimpleCrypt(Main)
MessageBox.Show(Main)
For i = 1 To Len(Main)
If Asc(Mid$(Main, i, 1)) < 128 Then
File3 = _
CType(Asc(Mid$(Main, i, 1)) + 128, String)
ElseIf Asc(Mid$(Main, i, 1)) > 128 Then
File3 = _
CType(Asc(Mid$(Main, i, 1)) - 128, String)
End If
Mid$(Main, i, 1) = _
Chr(CType(File3, Integer))
Next i
Return Main
End Function
End Module
Greg Kelley
|
|
|
|
|
Where do you need help ?
Crypting and Decrypting ??
Free your mind...
|
|
|
|
|
Console Application
The program is suppose read in 2 txt files
Then concatenate those two files into a single txt file
Then Display the encrypted contents on screen
Write to another file
Display the decrypted contents on screen
Read the encrypted file
encrypting and then decrpyting .txt file
Greg Kelley
|
|
|
|
|
I haven't tested the code you sent me.
Does the Crypt-Decrypt algorithm work ?
If not, build the algorithm and I'll help you build the solution.
Free your mind...
|
|
|
|
|
How to get all the controls in the form, like in VB we used to do
for each ctrl in me
if typeof ctrl is Textbox then
ctrl.text = ""
end if
next
How we do this in VB.Net.???
Thanks
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
The controls are in me.Controls.
for each ctl as Control in me.Controls
if TypeOf ctl Is TextBox Then ...
next
|
|
|
|
|
was good one controls are in me, but, I tried out the code, i declared ctl as object, and gave the same code but it is giving me "syntax error ." thats what it is saying. so if u can help me out.
Thanks again for ur reply
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
ctl should to be Control, not Object. I tried this, without any errors:
For Each ctl As Control In Me.Controls
ctl.Text = "hier"
Next
|
|
|
|
|
|
ya, but suppose i have a group box and my textbox/combo box is placed on the group box, then how to access it. thru this code i get groupbox, but not the controls that are placed inside the groupbox.
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
Het2109 wrote:
ya, but suppose i have a group box and my textbox/combo box is placed on the group box, then how to access it. thru this code i get groupbox, but not the controls that are placed inside the groupbox.
Then handle that case in the loop, either by having a secondary loop, or better, set up the loop as a function that takes a controls collection as a parameter. eg:
Public Sub RecurseControls(ByVal ctls As ControlCollection)
Dim c As Control
For Each c In ctls
If TypeOf c Is TextBox Then
Debug.WriteLine(c.Text)
ElseIf TypeOf c Is GroupBox Then
RecurseControls(c.Controls)
End If
Next
End Sub
You call this function, passing in Me.Controls to start with.
--
Ian Darling
"The moral of the story is that with a contrived example, you can prove anything." - Joel Spolsky
|
|
|
|
|
Hello everybody!
I'm new to the Visual basic.net and I'm trying to create a ActiveX dll project to use on server side in my asp pages.
I have created several of similar projects in vb6 and never had a problem.
I created a new Class library project. Added ComClass tag with ClassID, InterfaceId and EventsID. I checked the "Register for COM Interop" in project properties.
I created test asp page that calls Server.CreateObject("appname.classname") and this is when I get the error "object reference not set to an instance of an object"
Does any one know why this happens?
Thank you for any help!
iluha
|
|
|
|
|
I found the problem!
Public Sub New()
MyBase.New()
g_dbConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
End Sub
as soon as i commented the "g_dbConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=""" line it started to work.
Can some one tell me, can i have extra code in the sub new ?
besides the MyBase.New()?
|
|
|
|