|
Yes, you could call it a reserved word. The '#' character has the following uses:
As a Double type specifier. These two statements are identical:
Dim myDbl As Double
Dim myDbl#
and this will denote the number should be treated as a Double:
myDbl = 123.45#
As the prefix to a compiler directive:
#Const Version = "1.0"
#Region "This is a Region directive"
#EndRegion
RageInTheMachine9532
|
|
|
|
|
Hi,
I want to make some of the Text of RichTextBox i have used in my project, readonly or non editable, can anyone please help me
thanks
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
Try setting it's Enabled property to false...
Can still set and get text through code, but the user can't do anything with it at runtime.
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Yes thats what i want, i want to only make some text to be enabled false and user will not be able to edit it at runtime, rest all text he can edit and make changes. have got those text which are to be make readonly by highlighting it with different color no just have to make it non-editable.
thanks
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
In that case, you'd have to derive a new RichTextBox control and supply your own code for tracking which sections of text are ReadOnly. With the current RTB control, this isn't possible. The problems I see are how your going to track the sections of text that are ReadOnly and where this information is going to be stored with the document. Another problem is that a user can simply open the entire document in WordPad and your ReadOnly information will no loner be ReadOnly.
RageInTheMachine9532
|
|
|
|
|
i already have those words which are to be enabled false, as they will be delimited by special characters which will not be used by the user when he will be writing that template in RichTextBox, other thing is i will b storing that file in database henceforth it will not be opened in any other editor except mine, then fields which i am making enabled false will be dragged from say listbox to the richtextbox. its just like mail merge sort of application, in MS.Word. i am not able to write the Readonly Property for RichTextBox. if i can get a start.
thanks
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
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
|
|
|
|