|
The more I think about it ...
You can't use the RichTextBox control for this. You'll have to write your own control, POSSIBLY inheriting from the RichTextBox control. Your going to have to supply your own code for determining exactly where the cursor is and when the cursor is in a ReadOnly field or not. You WILL essentially be writing your own editor control. I don't know of, and can't find, a control with the support your looking for, so it looks like you'll be writing it from scratch.
RageInTheMachine9532
|
|
|
|
|
If this "read only" text is a header or footer, you can use a borderless label to hold the non-editable text. You will have to parse the RTF file to extract the text but you must be doing that if you are highlighting it.
The remaining text will go to the RichTextBox. The RichTextBox will also be borderless and both will be in a "frame" to make them appear as one.
If "to err is human", programmers must be superhuman...
|
|
|
|
|
hello, i am a student studying in one college in malaysia. now i facing one problem in my project that is how can i control or write an simple system to control the network bandwidth?? or the vb.net it self have the build in function or libraries that we can use it to control the bandwidth in the network enviroment? i mean that when you are the server, then you can control the bandwidth in your network workstation( mean sender to receiver)
thanks
|
|
|
|
|
soon hoo wrote:
simple system to control the network bandwidth
This will be anything but simple. You would probably have to write a filter driver to get the kind of control you want. Brush up on the Windows DDK, kernel debugging, writing and testing drivers, ... There is no Windows API to do this. Your driver will have to sit between the protocol driver and the network card driver. Here you could control the pacing of what is sent out to the network card. You would have to include some kind of DeviceIoControl interface so you can tell your driver what to do, like at what speed you want packets to be sent.
RageInTheMachine9532
|
|
|
|
|
Another place to look is the "Quality of Service" layer in Windows.
(Got the correct thread this time!)
If "to err is human", programmers must be superhuman...
|
|
|
|
|
sorry for the cheesy topic name....
Anyway, i have project with a fairly low data-volume. I am running it off of an access database at the moment.
I believe this makes it less portable as the user must have access to use it that way (right???). would i be better off just using a flat file? we're talking about three small tables with a an average of about 6-7 complete records.
thanks
serenity now, insanity later - lloyd braun
|
|
|
|
|
Hi there. Access .mdb files are actually very good for low volume, desktop (i.e. non-shared) databases. Your code just needs the Jet provider installed on the client machine - which is a standard part of MDAC (as opposed to a full copy of Access). So you're probably just fine using it.
Of course, with only six or seven complete records you may do just fine to use an XML file to store your data. If you're using .Net, you could read the file into an XmlDataDocument and treat it as either an XML document or a DataSet.
|
|
|
|
|
Another place to look is the "Quality of Service" layer in Windows.
If "to err is human", programmers must be superhuman...
|
|
|
|
|
OOPS... Wrong thread! (See thread above)
If "to err is human", programmers must be superhuman...
|
|
|
|
|
How do I open the Dos window and run a batch file within a VB6 application. I have found code that runs batch files, but it does not show the Dos prompt. I need to somehow in VB6 open the Dos console and run a batch file where they have a chance to enter a password for sftp. Anyone have any ideas?
I am using OpenSSH sftp and so far have built a batch file they have to access from their desktop and enter a password and run a whole bunch of other commands. It is very confusing to them because they do not have much computer experience.
-Garrett
|
|
|
|
|
Ask for the "Username" and "Password" in your VB program. You would shell your BAT file with the Username and Password as command arguments. In the BAT file run the DOS program and pipe the command arguments (%1 and %2) to the console to supply the signon. It's been way too long since I did a batch file so I have forgotten the syntax, just remember you can do it.
If you can use HTTPS, you can do it all from within VB using the Inet OCX control in VB 6 Pro.
If "to err is human", programmers must be superhuman...
|
|
|
|
|
I initially had pictures that acted as buttons to move forward and backwards within a list of pictures that I have contained in an arrayList. The code that I had on the picture click events worked, but then removed the pictures and used buttons instead and can no longer get the screen to refresh.
This is what I had before for the picture click events
<br />
If currentPage > 0 Then<br />
currentPage -= 1<br />
Me.frmMain_Paint(Me, New System.windows.Forms.PaintEventArgs(Me.CreateGraphics, New Rectangle(0, 0, 0, 0)))<br />
End If<br />
This is probably not a good way of doing it, but it worked
Does anyone know how to do the same with buttons. Thanks
|
|
|
|
|
Public Sub CalcDaysWorked()
Dim I, X As Integer
For I = 41 To 1 Step -1
If (FrmCalendar.TxtDate(I).Text = "1") Or ((FrmCalendar.TxtDate(I).Text = "2") Or (FrmCalendar.TxtDate(I).Text = "3") Or _
(FrmCalendar.TxtDate(I).Text = "7")) Then
FrmCalendar.TxtDaysWrkd.Text = (Val(X))
Exit Sub
Else
If FrmCalendar.TxtDate(I).Text = "W" Then
X = (X + 1)
Else
If (FrmCalendar.TxtDate(I).Text <> "1") Or ((FrmCalendar.TxtDate(I).Text <> "2") Or _
(FrmCalendar.TxtDate(I).Text <> "3") Or (FrmCalendar.TxtDate(I).Text <> "7")) Then 'IGNORE IT
I = (I - 1)
End If
End If
End If
Next I
FrmCalendar.TxtDaysWrkd.Text = (Val(X))
FrmCalendar.TxtDaysWrkd.Refresh
End Sub
BAsically this is part of an employees attendance/work record it keeps track of points(1,2,3 or 7)
days worked"w"
and some misc info that need not be tracked for this calculation
thus the I=I-1 'to ignore the entry
I need to calculate the days worked (my w's) after the last occurance of an infraction(1,2,3 or 7)
My code works 100% however i forsee an error if a "w" is enetered on the last day of the month
This is because the x values is only calulating on ever other loop through the code
The problem is in the above code..When I debug it it gets called on correctly everytime but the "x" value is not incrementing by 1 every time!
Greg S
|
|
|
|
|
I have one form. There is one datagrid in that. When I click on a button to add data, one form will show. I want when I click on Close button on Form 2, datagrid value of Form 1 will change. How I can refresh datagrid source from the other form ? Please help me. Thanks
|
|
|
|
|
Well the problem I am having right now is as follows:
I am building a MDI application. In my application there are one mother (MDIContainer form) and two other children forms. The first child form has a listview control with checkboxes in which rows of a specific table (rows with status flag = 0) are shown and a button. The user checks a row and then presses the button. The second child form shows and display detailed information of the selected row. There is also a button to approve this record. Once the user presses the approve button the status flag of this row is set to 1.
What I want to do is the following:
Once the user presses on the approve button of the second child form and then if he switches to the first child form through selecting its name form the window menu of the mother form I want to show him the updated list (i.e. the approved row to be excluded).
How can I do that? I really appreciate your help.
Many thanks.
|
|
|
|
|
There are two ways you could try to do that. The first would be to declare all the controls on both child forms as Public. Then, you could access controls from the other form.
Your second option would be to create a module that would contain variables, and depending on the variables, the listview would update.
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
ive been wondering along time.
does anyone know how to use MIDI instruments, etc, to create notes for output to speakers, in VB.net?
it seems impossible, no one has said anything about it.
------------------------
Jordan.
III
|
|
|
|
|
Nadroj wrote:
it seems impossible, no one has said anything about it.
I'm sure someone knows how to do it, but not me. Have you tried searching MSDN or Google?
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
iv been searching online for quite a while then gave up. i can only find examples in vs.net for like c++, c#, not vb.net
anyways, thanks alot for your input!
------------------------
Jordan.
III
|
|
|
|
|
Nadroj wrote:
for like c++, c#, not vb.net
Use the C# stuff and convert it over. Should not be that hard.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Ray Cassick wrote:
Use the C# stuff and convert it over. Should not be that hard.
This is true. I never really learned C#, but I know JavaScript (the syntax is very similar).
All you have to remember when converting from C# to VB.Net, is that you declare the data type defore the variable.
Examples:
(dim i as integer) in VB.Net is (int i = 5) in C#
(sub hello(byval world as string)) in Vb.Net is (void hello(string world)) in C#.
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
Because I am a lazy programmer (there is an oxymoron right?) If the code is long and I am crunched for time I always start out with a quick conversion tool. It atleast gets me 90% there most of the time.
Try this one out[^]
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Yes, C# to VB.Net converters can usually convert a good amount of code decently. There are still some things that are not converted correctly (attaching events, single line if...then, etc.) but converters are a good time saver. Especially if you are a lazy programmer like Ray or me
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
Looking for code to pass information from Form2.textbox1 back to Form1.label1
Process - Press Form1.button1 to show Form2,
Enter information into Form2.textbox1,
Press Form2.button1 to display information from Form2.textbox1 to Form1.label1.
Thnaks in Advance!
Form1 consists of <Startup Form>
Label1
Button1
For2 consist of
textbox1
Button1
|
|
|
|
|
The simplest way is to set the access modifier of the textbox to public or friend, then set
label1.text = textbox1.text
"if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler.
Support Bone
It's a weird Life
|
|
|
|