|
Then a VB6 book isn't much help. You should take it back and try to get one on VB.NET. I still don't get what you want to do - you're not using Excel ? So you're using a datagrid ? What do you need ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a file that is delimited by tabs and for the life of me can't figure out how to get my program to work correctly because the p 12 box 1 and so forth is not on every single line. If you could please take the time and help me that would be great.
Here is the code i have so far.
[code]
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim readpath As String = txtRead.Text.ToString()
Dim writepath As String = txtWrite.Text.ToString()
Dim sr As New StreamReader(readpath)
Dim line As String
Dim linevalues() As String
Dim contents As New ArrayList
Dim finished As Boolean = False
While Not finished
line = sr.Readline()
If line Is Nothing Then
finished = True
Else
linevalues = Split(line, TAB().ToString())
contents.Add(linevalues)
End If
End While
Dim sw As New StreamWriter(writepath)
Dim counter As Integer
For counter = 0 To contents.Count() - 1
linevalues = CType(contents(counter), String())
If linevalues(3) = "ACA" Then
' Write all information for ACA type meter
Call sw.WriteLine(TAB().ToString() & "3 " & TAB().ToString() & linevalues(2) & TAB().ToString() & linevalues(3) & linevalues(4) & TAB().ToString() & linevalues(5) & "100" & TAB().ToString() & "Single Phase" & TAB().ToString() & "FORM-2 BASE-S VOLT-240 TA-30 Kh-7.2 RR-13 8/9 Wire " & "Shipment4 " & "Accurae Calibration of the Carolinas" & linevalues(0) & linevalues(1) & linevalues(2) & TAB().ToString() & TAB().ToString() & TAB.ToString() & "0" & TAB().ToString() & "6" & TAB.ToString() & "100" & TAB.ToString() & "Z" & TAB.ToString() & "1" & TAB().ToString() & "8" & TAB().ToString() & " Radio Read" & TAB().ToString() & "10/10/05" & linevalues(6) & TAB().ToString() & linevalues(7) & TAB().ToString() & linevalues(8) & TAB().ToString() & linevalues(9) & TAB().ToString() & linevalues(10) & TAB().ToString() & linevalues(11))
ElseIf linevalues(3) = "ACD" Then
' Write all information for ACD type meter
Call sw.WriteLine("," & "3," & linevalues(1) & linevalues(2) & "," & linevalues(3) & ",,,Shipment 3,Langus Meter,1,Langus," & linevalues(4) & "," & linevalues(5) & "," & linevalues(6) & "," & linevalues(7))
ElseIf linevalues(3) = "ACG" Then
' Write all information for ACG type meter
Call sw.WriteLine("," & "3," & linevalues(1) & linevalues(2) & "," & linevalues(3) & ",,,Shipment 3,GE Meter,1,GE," & linevalues(4) & "," & linevalues(5) & "," & linevalues(6) & "," & linevalues(7))
End If
'Call sw.WriteLine(linevalues(0) & " whatever ")
Next
sr.Close()
sw.Close()
lblFinished.Visible = True
End Sub
[/code]
Here is a sample of the text file
[code]
P 12 1 ACA 26732042 50013209 100.09 99.73 100.09 99.73 100.02 100.02
ACA 26729748 50013043 99.31 98.82 99.84 100.13 99.22 99.90
ACA 26730218 50010533 100.02 99.59 100.02 99.59 99.94 99.94
ACA 26664336 50010599 99.88 100.13 99.88 100.13 99.93 99.93
P 12 2 ACA 27267998 50013354 99.92 98.61 100.13 99.75 99.66 100.05
ACA 38623886 50013351 100.03 99.76 100.03 99.76 99.98 99.98
ACA 26727768 50010624 99.77 99.30 99.97 100.29 99.68 100.03
ACA 27638050 50010558 100.20 100.03 100.20 100.03 100.17 100.17
P 12 3 ACA 38623828 50013238 99.93 99.47 100.02 100.21 99.84 100.06
ACA 39181977 50013338 100.11 99.93 100.11 99.93 100.07 100.07
ACA 39254044 50013227 99.99 99.83 99.99 99.83 99.96 99.96
ACA 38661916 50010577 99.93 99.48 99.92 99.71 99.84 99.88
[/code]
for an aca it needs to write to the file for example the following
tab() 3 tab() ACA26732042 tab() 500013209 tab() 100 tab() Single Phase tab() Form-2 Base-S Volt-240 TA-30 kh-7.2 RR-13 8/9 Wire tab() shipment4 tab() Accurate Calibration of the Carolinas & tab() P 12 1 tab() tab() tab() 0 tab() 6 tab() 100 tab() Z tab() 1 tab() 8 tab() Radio Read tab() 10/10/05 tab() 100.09 tab() 99.73 tab() 100.09 tab() 99.73 tab() 100.02 tab() 100.02
please note tab() indicates that it needs to be tab delimited.
Thankks for your help.
Tony
|
|
|
|
|
I've created a good little Media Player! It play's almost all audio and video format's using DirectX 9 and Net Framework. However i need to know how to change the Audio volume? (like Windows "Volume Control"). I'm Presumming it would have to be done using API. Just don't know how to do API in VB.net 2003 Enterprise Ed.
If anyone could help me out please?
|
|
|
|
|
if ure using directx to play the video then...
Video.Audio.Volume = ??
Where Video is AudioVideoPLayback.Video object, Which you must be using?
|
|
|
|
|
So if i use "Microsoft.DirectX.Video.Audio.volume = Integer(value)" for Video Audio how about the Audio file Volume...?
What it is I've Declared my Video file as "DVF" and Audio file as "DAV" and Currently Playing as file as "DCF". If you understand where i'm going with this?
|
|
|
|
|
Hi there,
Somewhere on one of my PC's I have a class that controlls the master volume.
I think that's what you're looking for.
I also have a nice volume control knob, so if you're interested, give me your e-mail address and I'll mail it to you!
Mine is Jerry___@hotmail.com (thats 3 underscores!).
I'm also interested in media players and stuff like that and I don't know a lot about DirectX. So if you could do me a favour and let me have a look at your code.
I'll look up the code and send it to you asap.
Cheers Jerry.
|
|
|
|
|
|
For a larger project you need to buy a converter, or do it yourself, line by line. It's not that hard.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi ,
i want to read the CPU performance and main memory usage .
I tryed using performance counter component which not give results.so please give me ideas
VERY Argent . Nearly i have to delever my product
Amalarajan
softdeveloper beginer
-- modified at 7:27 Tuesday 18th October, 2005
|
|
|
|
|
hi ,
i am currently doing leasing(bank) project using VB.NET , i like to develope read memory performance such as Memory usage,peformance etc .. ,therefore i used PERFORMANCE COUNTER Component to accomplish my task ,but which have been not worked . So please give idea to fnish my project .
VERY Argent . Nearly i have to delever my product
Amalarajan
softdeveloper beginer
|
|
|
|
|
I have no idea what your question is. You want to check the performance of your application ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
sir ,
i want to write code for read the "performance" of CPU(taskmanager -> performance) and "Main Memory" usage.
I tryed using performance counter component but not work.
Please give idea...
very urgent because nearly i have to delever my project
Amal
|
|
|
|
|
|
thank you vey much for your support .The cooding work properly ..... But I have another problem .. if you can please ,please,please Help me
i need to send crystal report through email as the email body (not as Atachment and Not using ASP.net ).
can i access OUTLOOK EXPRESS to do this
thank you
Amalarajan
|
|
|
|
|
I don't know of any way to access outlook express. Is this a web app ? Do you want the user to click somewhere to send the mail ? If so, just use the a mailto anchor ( google mailto html for more info ). If that's not what you want, more detail please
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
To remove Event Handlers from my all controls in the form, I want to use a generic code as follows.
1) Run through all controls in the Form
2) Run through all Events of a control using Reflection .GetEvents()
3) For each Event, I want to get the Delegate, so that I can remove all using GetInvocationList(). but .NET doesn't provide any property to get delegate for the Event Handler.
Please help. How can I get the Delegate for the Event Handler.
|
|
|
|
|
|
That only gives the Delegate type, but how to actually get the reference to the Delegate?
|
|
|
|
|
How can I show a transparent but 100% visible label( any text) on the screen without showing form so that the user does not get disturbed by th e text. Also same for an image. Thi sneeds to be done in Visual Basic 6.
Accalia
|
|
|
|
|
Hi,
I have created a windows application now i want to create a setup file for that application. The problem is I want to add a key to registry with the current date of the system during installation. Is that possible, if yes please let me know its urgent
Thanks in advance
|
|
|
|
|
The following code shows how to use the registry:
-Make an appform with 2 textboxes: TextBox1 and TextBox2.
-Add two buttons: btnSaveSettings and btnGetSettings.
-code for btnSaveSettings: SaveMyNumber()
-code for btnGetSettings: GetMynumber()
-DONE!
-enter text in TextBox1 > press savesettings
-press get settings and the nuber you entered in TextBox1 should appear in TextBox2!
-if you restart your computer, run the app, press getsettings your saved text will be shown again.
Imports Microsoft.Win32
Dim MyNumber as string
Dim MainKey As RegistryKey = Registry.CurrentUser.OpenSubKey("Software", True)
Dim MyKey As RegistryKey = MainKey.CreateSubKey("MyKey")
Private Sub SaveMyNumber()
If not TextBox1.text = "" then
MyNumber = TextBox1.text
MyKey.SetValue("MyValue", MyNumber)
else
exit sub
end if
End Sub
Private Sub GetMyNumber()
TextBox2.text = MyKey.GetValue("MyValue")
End Sub
Next you can check your value in the registry:
-Start > run > type "regedit" and press enter.
-open HKEY_CURRENTUSER > SoftWare > MyKey and there it is!
You just created this key.
You can delete it (MyKey) by right clicking on MyKey and select Delete, but beware!!! dont delete the wrong keys, it messes up your system!
if you use datetime.today in sub formload, save this in the registry the first time you load the program, the only thing you need to do is figure out how to do this only the first time you load the program. This shouldn't be so difficult.
Hope this helped you,
Cheers.
|
|
|
|
|
Add an Installer class to your setup, assuming you are using VS.NET - you did not specify how you plan to create the setup. Then run Jerry's code shown above in the Installer class.
See the MSDN or Google for a basic tutorial in using Installer classes in .NET.
|
|
|
|
|
Hello All!
I have a listbox in wich I have some data. The length of data is so much that it goes out of view. I dont want to add scrolling. I want that when the user move the mouse over the data in the listbox it will appear in full just like when in Windows you move the mouse on a folder having long names it will show its size and other related information............Got it?
Please help me in this regard
Thanx
_mubashir
|
|
|
|
|
I have created a table in MS Word through VB 6.0. In the last column of the table, the row contains the database table names seperated by Commas. I need to provide hyperlink to each of the table names in the columns so that upon clicking each hyperlink, it goes to the description of the appropriate database table. While creating the hyperlink for the cell in the Word table, the hyperlink is created for the entire cell and am unable to create it for each table names separated by commas. Can anyone provide solution for this?
Thanks in Advance
Padmakumar.G
|
|
|
|
|
I need to print Headings in MS Word Document using VB 6.0, so that I can create table of contents (TOC) easily in the Word Document. can anyone help me out in this?
Thanks in Advance.
Padmakumar.G
|
|
|
|