I am attempting to write a function to Shift Right bits.
Private Function ShiftR(ByVal Number As Long, ByVal Shift As Integer)
Dim nIndex As Integer
For nIndex = 1 To Shift
Number = Number / 2
The problem is is it works up to a point. Consider this:
How do I make a Label Flash. What I want to do is have a Label Flash on command. Such as when I am updating data, I want to make a Label visible and have it Flash until the updating is complete, then I will make it invisible.
Is there a way to turn off/on Tabs under progam control. I have a project that will have multi-Tabs and don't wish to have all of them showing at the same time, only those that I am using at the moment.
A little more info on what I want to do. I have three main tabs TabPage1,2,3
I have a couple of USER CONTROLS that I have textboxes on. I want to send text to these textboxs from the main form. I have it set up as follows
Private fOpGen As New GenReg1 '<- user control form
If sDone = "00" Then
Me.TextBox2.Text = "Test1"
fOpGen.TextBox1.Text = "Test1"...
I have a problem that hopefully someone can tell me what I am doing wrong or a better way to do this. I am sending commands to a device using RS232. When I get the return, it looks OK, but having a problem displaying the results.
First here is the RS232 return routine in the Main Form...
Can someone show the simple way to bit masking under VB.NET. I have regesters that I need to be able to determine which bit has been set and which has not. I tryed this but with mixed results
Dim nMask as Integer
Dim nResult as Integer
nMask = &H111
nResult = nMask AND nInput
I have declared a string at the top of a program. In a subroutine I bring in
the RS232 chars and put then into the string.
After I have done what I want with the data, I need to reset the string
so that then next RS232 access does not get added to the end of the
So how do I reset...
I have a project which needs to read/write existing INI files. I have the code to Read/Write INI files, except it’s not clear how to extract elements. Below is the code to read in text values and int values, but it is not clear How to access each element call by the variable “s”.
Under VB.NET how do I access the current path. Do I use
Newpath = "..\<Current Directory>"
or do I use a funciton that access current path like I used to under VB 6.0
Newpath = Path + "<Current Directory"
I tried using "..\<Current Directory>", it did not seem to work. It compiled
Can someone give me a reference to a article or code that will allow me to Read/Write Binary Files. I have code for reading INI and XML files, but from what I understand you can not Write INI or XML files from VB.NET. So need to use Binary files for reading/configuration files.
I have seen in other Applications where a there was a Form that has multi text/combo boxs on the left side and a large textbox on the right with a ADD and REMOVE buttons inbetween. Is there a control that makes this or do I need to create this from scratch.
I don't mind making this from...
I am setting up TabPages and want to display and lock a form onto a
TabPage screen area. That is when I select a TabPage, I want to display a pre-defined Form on that TabPage. I know how to set the start positon for the Form but how do I lock it in place, so that if I move the Application around...
Now I have a different but similar problem.
I want the second window to call a subroutine in the main form.
In the second form I setup
Private fOMain as Form1
PrivateSub TermSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TermSend.Click
I am trying to pass the same data to two different forms and textboxs. Both forms contain subroutines
Form1 - Main
Private Sub WriteMessage(ByVal message As String, ByVal linefeed As Boolean)
Me.TextBox2.Text += message
If linefeed Then
Me.TextBox2.Text += vbCrLf
I know this sounds like a newbi question but I am modifying a existing VB.NET program. I want to take the existing output to a textbox on frmMain and reroute it to a textbox on a moduless form. I have seen examples of getting data from a second form and displaying it in frmMain, but for the...