|
How do I replace [path here] with it reading from a path from a textbox?
|
|
|
|
|
|
Excellent! One third the way through the proramming!
Now we just need to:
Make it consider the bits in pairs, and change them
Keep it from going over the same bits twice
Save the bits to a file.
The problem I see it this, when I open a binary file in notepad, I see characters. VB is working with the binary, and when it saves, I'm afraid if I open the file up in notepad, ill see "10101001111001" instead of characters.
Prof. Haahr's site will see the binary, and if VB saves it as 10100101, Haahr's site will see: 1111111100000000111111110000000000000000111111110000000011111111, so I want it to save 10100101 (assuming it equals "a") as "a".
You see, heres my problem. I don't trust a computer to do it's job. I wanna make sure that it will do exactly what I expect it to. I don't know if that makes me a bad program!
|
|
|
|
|
How do I make it condsider the bits in pairs, and do this to each one?
IF bit0 = bit1 then (whatever deletes both bits) ELSEIF (toss second bit)
GO ON
REPEAT IF
modified on Monday, February 18, 2008 4:22 PM
|
|
|
|
|
Steve gave you the right solution for getting your data into an array.
To work with bits though you need to learn what the AND, OR, XOR, <<, >> commands mean because computers don't know how to deal with anything smaller than a byte directly. If you google bitwise there are lots of good tutorials that will explain each of them well. The AND command will allow you to isolate the bits you want to test, then you can easily set up a condition statement to to test the number without irrelevent bits infearing. For instance you can isolate the first 2 bits like this
result = yourbyte AND mask
if mask has a binary value like this 11000000 then all the irrelevent bits will become zero and allow you to test for only 2 different numbers.
hope this helps,
Mike
|
|
|
|
|
I have created an application in which there r several forms open and when i click logout button then all the open forms should get closed and login page should get open.so, how do i close all open forms.
coolsatty
|
|
|
|
|
Application.OpenForms Gets a collection of opened forms owned by the application.
Eslam Afifi
|
|
|
|
|
but how do i close it.
coolsatty
|
|
|
|
|
iterate through them and close them
For Each form As Form In Application.OpenForms
form.Close() ' close the form
form.Dispose() ' to clean up resources
Next
Eslam Afifi
|
|
|
|
|
application.openforms is not there in vb.net.
coolsatty
|
|
|
|
|
Application.OpenForms is new to the .Net Framework 2.0 (VB 2005)
Eslam Afifi
|
|
|
|
|
then how to do in VB 2003.
coolsatty
|
|
|
|
|
Sorry, I can't help It's been a long time since I used the .Net 1.1 and I currently don't have VS 2003 installed.
Eslam Afifi
|
|
|
|
|
Dim myarray() As Integer
Dim i As Integer
For i = 0 To 15
myarray(i) = 2
Next
In the 4th line I gets an error message as under:
Variable 'myarray' is used before it has been assigned a value. A null reference exception could result at runtime.
Please correct the code ....
|
|
|
|
|
You have declared a reference for an array, but not created the array itself.
The easiest way to create the array is to specify the size (i.e. the highest index to use) when you declare the reference:
Dim myarray(15) As Integer
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
The array you are using hasn't been initialised, try
Dim myArray(15) as Integer
I find arrays cumbersome in .Net compaired to VB6 and so I tend to use ArrayLists or other collection methods instead.
An optimist's glass is half full.
A pessimist's glass is half empty.
An engineer goes and gets the right size glass.
|
|
|
|
|
How can make a 30 Days evalation copy of a windows based application which is developed in VB .Net 2003.
The thing is, after finishing 30 days of evaluation period,even though if the client changes his system's date the application should not work.
If anybody have any information,please help.
Joby Mathew
|
|
|
|
|
If somebody is prepared to change the date on their PC to run your program past the 30 day trial, then they aren't prepared to pay for it anyway.
They'll also happily run it in a VM and reinstall every 30 days...
|
|
|
|
|
I think u can use the registry
Try creating keys and assigning values when registered or unregistered
or the only way to combat this is to track from a central server and dat means all the client must be connected to the internet..rather bad
phatkin
|
|
|
|
|
Thank u very much for ur reply.I think better to go with the control over Number of Logins into the application.Anyway thank u once again for ur interest to give a reply.
Joby Mathew
|
|
|
|
|
how i transfer file from tcpserver to tcpclient?
thank's
|
|
|
|
|
You may use TCP class provided in .NET Framework
Try to search for "tcp vb.net sample" in MSDN and you will get the required sample.
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
I have a checked list box that loads the first and last name into the list box in the displaymember property. Then it loads the id into the value member property. When I complile the program it wont load the first and last name.
If I comment the code to only show the first name the it displays the following in the checked list box instead of the name.
System.Data.DataRowView
It also shows the following error in a message box.
Conversion from string "clbTeachers.SelectedIndex" to type Integer is not valid.
When I click ok on the message box it displays the name and the same message box comes up again. When I click OK then the id number displays in the list box instead of the name.
I changed selectedIndex to selectedValue and removed some quotes that I missed and I stopped getting the conversion error. Now I get an error that says specified cast is not valid.
Why is this happening?
modified on Saturday, February 16, 2008 9:39 PM
|
|
|
|
|
AAGTHosting wrote: System.Data.DataRowView
is a type string, which is the default result of ToString() for many classes.
ToString() is called automatically by a lot of Controls to visualize an item
that is not a natural string.
Where is your data ("first and last name") coming from? an array? a list? a database?
why don't you show the relevant code?
clbTeachers.SelectedIndex isn't a string, so you can't apply a string-to-int conversion
to it. SelectedIndex is an index, hence an int; it does not need a conversion!
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
The data to fill the list box comes from a database. I use a data adapter to get the info from the database and then I fill a dataTable and get the info from the data table to the list box with the following code.
' fill the teachers checked list box<br />
clbTeachers.DataSource = dtTeach<br />
clbTeachers.DisplayMember = "teach_fname" ' & " " & "teach_lname"<br />
clbTeachers.ValueMember = "teach_id"
|
|
|
|