|
Regarding what line or lines in my message do you have questions?
|
|
|
|
|
it is about how you post code in a message:
which browser ?
any other additional tool ?
do you add tags such as CODE or PRE or BR ...
thanks
|
|
|
|
|
Yes, I use all three tags and I use firefox most of the time. I usally would write my messages in note pad then copy and paste it in the text area of forum or I would browse to my file.
|
|
|
|
|
|
how can make a word pad like application in vb.net using rich text box
|
|
|
|
|
Just start out with something simple, like the Richtext box, and start adding in functionality that you would like to have.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
i have already add the rich textbox and the other things
my problem is
the printing of the contents of the rich text box
i have a fair idea about that i just want to make a printdocument and i don't know how to do that
and the other problem is the ruler and the bars of the ruler how to make one of them
|
|
|
|
|
Though I understand you may be doing this project in VB since you are asking in the VB forum, here is an article in C# that maybe helpful for you in your project
http://www.codeproject.com/csharp/eRichTextBox.asp[^]
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
|
You're welcome.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
To print the content of richtextbox, try code posted here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;811401
|
|
|
|
|
|
I would to compare the value from the certain column, row of 2 different text files. I have already stored into them to 2d array. Any idea how to start from scratch so that i can compare them? It involves the complicated for loop or do while loop.
|
|
|
|
|
I don't see what the question is. If you have them in a 2D array, then use the right indices to compare the values that need comparing ? Perhaps you need to explain more.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
For example:
For File A.txt and B.txt, I have already stored the value from certain row and column of A.txt and B.txt into 2 D array by using the do while loop. For A and B, they got their own do while loop.
If i compare the value outside the do while loop, the 2d array would get the undefined value. They cannot be compared at all.
If I put both of the A and B in One do while loop, it will become complicated.
|
|
|
|
|
So, create your arrays THEN use those arrays to lookup the values you want to compare.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Q1/If this is the path to save an open Excel file running in the background
xlSheet.SaveAs("c:\My Path\tk" & Format (Me.MonthCalender1.SelectionStart, "yyyyMMdd") & ".xls")
How would I open a file using the MonthCalender1 (Change-Date) as the trigger to determine the name? e.g. "tk20070727.xls" ?
Q2/ Having opened the file (running invisable in the background), how can I pull the data from a cell to a variable?
Q3/ How do I close the invisable running .xls file in runtime?
|
|
|
|
|
So how many times are you going to post the same question(s) in one day? Yes, it's considered very rude.
I don't do Office Interop, so my experience with it is VERY limited.
But, I'd image you would find the Open method on a Workbooks collection. You'd have to pass it the complete path to the file you want to load. It looks like you already know how to generate the filename you need.
Pulling data from the cells would probably involve something about a Range object with, maybe, a Cells collection that holds a bunch of cells, and possible a Value property of each Cell .
There's a ton of examples out there. All you have to do is Google for something like "vb.net Excel workbooks", or "vb.net excel Range object", "vb.net excel retrieve cell values".
|
|
|
|
|
Thanks Dave for you compassion and understanding. I hope you have a wonderful day and everything goes the way you'd like it too.
|
|
|
|
|
You have to manualy release COM object to kill the excel process running in the background.
Say your Excel.Application object is myApp . Then use this:
<br />
myApp.Quit()<br />
System.Runtime.InteropServices.Marshal.ReleaseComObject(myApp)<br />
System.GC.Collect()
--------------------------------
txtSignature
|
|
|
|
|
Thank you very much Neoh, it is good to get someone to help with this stuff.
Some people would rather abuse Newbies than spend the same time making the world move a little faster by helping them.
Google is great but doesn't always hit the nail on the head, and asking questions for help is what I thought this site was about.
Again many thanks mate, you're a champion!!
Frank
|
|
|
|
|
No Problemo
--------------------------------
txtSignature
|
|
|
|
|
I'm populating a combobox "ChargeName" by datasource depends on the item selection of another combobox "ChargeDegree", the combobox "ChargeName" indeed displays the list of items I expected depending on the "ChargeDegree" combobox selection. However, when I select the "ChargeName" combobox to print out, let's say, on a label or on a grid cell, strangely it displays "System.Data.DataRowView", instead of the supposed item of a Charge Name I selected.
Dim sqlCharge As String<br />
Dim dbGate As New databaseGateway()<br />
Dim dsCharge As New DataSet<br />
Dim chargeDegree As String 'the degree of the charge<br />
<br />
chargeDegree = cbxChargeDegree.SelectedItem.ToString()<br />
sqlCharge = "Select ChargeName from Charge where ChargeDegree = '" & chargeDegree & "'Order by ChargeName"<br />
dsCharge = dbGate.ExecuteQuery(sqlCharge)<br />
cbxChargeName.DataSource = dsCharge.Tables(0).DefaultView<br />
cbxChargeName.DisplayMember = "ChargeName"<br />
cbxChargeName.ValueMember = cbxChargeDegree.SelectedText<br />
cbxChargeName.SelectedIndex = 0
Does anyone know why this is it?
Please Help Me. Thank You Very Much. Ryan
|
|
|
|
|
Hi,
By default the ToString returns then Namespace.ClassName of the object, you could change this behavior by overriding the ToString function (In case you design your own class), in your case try to use the following:
chargeDegree = cbxChargeDegree.Text
hope this helps
|
|
|
|
|
Thank You, but it still doesn't work. I think the problem is one of the following syntax:
cbxChargeName.DataSource = dsCharge.Tables(0).DefaultView<br />
cbxChargeName.DisplayMember = "ChargeName"<br />
cbxChargeName.ValueMember = cbxChargeDegree.SelectedText<br />
cbxChargeName.SelectedIndex = 0
The chargeName combobox does has the items I expected upon the selection on the chargeDegree comobox, but strangely the text string display is "System.Data.DataRowView".
Can anyone else help me, please?
Thank You Very Much. Ryan
|
|
|
|