|
I have a Multi Line Textbox. User will input address information.I wantta set cursor to new line, when user press enter key. I try following code to achive but it always set cursor to first line. what do u offer me :S
protected sub txtAddress_KeyUp(........) handles txtaddress.keyup<br />
if e.key= keys.enter then <br />
txtaddress.text &= envoirenment.newline<br />
endif<br />
end sub
-- modified at 4:17 Monday 5th September, 2005
|
|
|
|
|
You're doing it the hard way. Why not just set the AcceptsReturn property of the TextBox to True? It'll accept the Enter key as a newline by itself.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I solve problem : AcceptReturns=TRUE is OK
|
|
|
|
|
hello all,
any one know, how to develop OCR in VB.NET
thanx
|
|
|
|
|
In theory, I guess you could do this, but why not use a language more suited to this sort of work ( that would be C++ ).
Amazon has some good books on this. It's just not the sort of question that can be answered in a reply to an online forum.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
2 questions:
1st, how can you open a binary data file in vb.net?
2nd, is there anyway of working out the structure of the binary file, the formatting of data inside it i mean?
I have a data file for a program and I'm interested in editting it. I'm guessing its a binary file.
Any ideas?
|
|
|
|
|
andymknight wrote:
1st, how can you open a binary data file in vb.net?
With a BinaryReader.
andymknight wrote:
2nd, is there anyway of working out the structure of the binary file, the formatting of data inside it i mean?
Two ways spring to mind - first you can check the file extension and assume it is valid, second you can read the file and compare it to known file formats to see if it matches any of them.
andymknight wrote:
I have a data file for a program and I'm interested in editting it. I'm guessing its a binary file.
Wow - that's vague ? What does it contain ? Why do you need to edit it ? Have you tried opening it with notepad or a hex editor to see what's inside ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
It wont be any recognisable format. Its a data file for a game, which contains events.
I'm hoping to be able to access this data to build an addon to analyse the data.
Viewing it in notepad shows no reasonable structure, as it use unreadable ascii codes.
|
|
|
|
|
In that case, if the format is unknown ( have you tried google ? ) then the logical next step is to grab a hex editor, then edit the file, one byte at a time, and see what changes in the game, so you can document the file format. Remember to try more than one file, it's very possible that a byte number x = no. of lives approach won't actually work, the file format may well be looser than that.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
ouch, this could potentionally be months and months of pain steaking interrogation.
|
|
|
|
|
yep, I'm afraid so...
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hellow to all agine ..
i have a datagrid in my program ..
i add some data and do some changes ..
i wana put a button that say refresh ...
that will update the datagrid with the changes ..
i try to use the datagrid1.update option ..
it's not working for me !
how can i do it ..
thxx a lott
|
|
|
|
|
If you want the datagrid to reflect changes in the data source, rebind. If you want the data source to reflect changes in the grid, you need to go through the rows and check which ones have been added/changed/removed, then update the source accordingly.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
so , how can i do this in vb code ?
|
|
|
|
|
Hi.
I have several combo boxes on my form that are used to select a date.
When i initialize the form i am using the additem command for each combobox, even though i am adding the same thing over and over again( days 1- 31, months 1-12, year 2001-2007.
i have three seperate comboboxes to select the day , month and year.
now,, i am currently using additem for each day,month,year (50 additems) for each combobox (3) for a total of 150 lines of code. can i not use additem and apply it to all three comboboxes at once(group them somehow). this doesn't work but it may give you an idea of what i am trying to accomplish
with combobox1_days and combobox2_days and combobox3_days
.additem 1
.additem 2
.
.
.additem 31
end with
your help would be appreciated
thanks
vb addict.
|
|
|
|
|
You can in fact hard code the values into the form designer, and not do this in code at all.
You can also write for loops to put numbers in, and 'group' it that way.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You can index your combo boxes. To do this, add a combo box (e.g. combobox_days) to your form. Set its Index property to 0 or Copy, Paste, and press Yes when it asks you if you want to make an array. Do either one of these until you have all of the combo boxes you want. To add the items for the days:
Dim intCount As Integer
For intCount = 1 To 31
combobox_days(0).AddItem intCount 'This will add each day (1 through 31) to the 1st combo box
combobox_days(1).AddItem intCount 'This will add each day (1 through 31) to the 2nd combo box
combobox_days(2).AddItem intCount 'This will add each day (1 through 31) to the 3rd combo box
Next intCount
Or to comply with your message:
Dim intCount As Integer
'This loop adds duplicate information to all combo boxes with the name of combobox_days
For intCount = 0 To (combobox_days.Count - 1)
combobox_days(intCount).AddItem 1
combobox_days(intCount).AddItem 2
combobox_days(intCount).AddItem 3
...
Next intCount
Their is an ActiveX control named DTPicker that you can use by going to Projects, Components..., and selecting Windows Common Controls-2 6.0
|
|
|
|
|
thanks so much. i didn't know i could use a loop to fill in all the cb's values.
soooo much more efficient than how i was coding it...thanks again.
|
|
|
|
|
hellow to all ..
is there a way that i can change the datagrid titels in the coloms with out changing it in the tabel ...
i wana show the coloms names diffrent than there real name in the database ..
but i do not wana change it in the database manuale ..
is there a way ?
thxx !
|
|
|
|
|
In this control, there is any way to obtain the number of the line that the cursor is?
Thanks
|
|
|
|
|
Dim RowIndex As Integer
RowIndex = RichTextBox1.GetLineFromCharIndex(RichTextBox1.SelectionStart) + 1
progload
|
|
|
|
|
Could you tell me what books like Real World .NET Application ?
The book has some good application for learning.
Thanks in advance
|
|
|
|
|
Please don't ask the same question to every forum. I'm not even sure what the question is - you want a book on how to write real world applications in .NET ? The patterns and practices series from Microsoft has some good titles, but without knowing your current level of knowledge, it's hard to know what to recommend.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Dim c As Color = CType(TypeDescriptor.GetConverter(GetType(Color)).ConvertFromString(GetSetting("A", "B", "C", -1)), Color)
|
|
|
|
|
I take it there is a question in here somewhere?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|