|
Thanks, but since the printer is not a POS device, this is not going to work.
If there was a print utility that could be called from VB.NET, that would suffice, if there is no way to send text directly to a printer driver in VB.NET.
|
|
|
|
|
So what?? I shows you how to print directly to the printer without going through all the GDI stuff to draw an image of the page.
Once you can get directly to the printer, you can send it all the commands you want that are native to that printer.
|
|
|
|
|
I am doing a bar chart using a date variable and a double variable. I am having trouble reading in the date. Do I have to read in the date using seperate variables for the date?
Regards
Zeldacat
|
|
|
|
|
Hey
Post up a small snippet of code so we can see what is going wrong and trying to help you. By small I dont mean the entire code base but a simplified version of what is happening.
You could even try using a small simplified function or here is a crazy idead - test and debug the function (I have heard people do that sometimes).
Dan
At university studying Software Engineering - if i say this line to girls i find they won't talk to me
Dan
|
|
|
|
|
I am doing an Example of creating barcharts in VB.
I am using two variables
Thedate as date = Today
Theweight as double
The weight is input on a daily basis via a textbox. The date is taken from the pc's calender. I have a sample to go by, which uses integers and doubles as variables. Everything i have tried so far gets errors because of the date.
Dim NumberGames As Integer
Dim DStreak(144) As Double
Private Sub frmPlot_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Streak As Integer
'Open file, load data in arrays
FileOpen(1, AppPath() + "mar95.csv", OpenMode.Input)
NumberGames = 0
Do Until EOF(1)
Input(1, NumberGames)
Input(1, Streak)
DStreak(NumberGames) = CDbl(Streak)
Loop
FileClose(1)
picPlot_Paint(Nothing, Nothing)
End Sub
The above code is what i am trying to follow.
i hope this helps
thanks
Regards
Zeldacat
|
|
|
|
|
So where are you REALLY reading the date from?? I'm quite sure it's not a bar chart...
We'd need to see the code that you're using to read this data.
|
|
|
|
|
I am doing an Example of creating barcharts in VB.
I am using two variables
Thedate as date = Today
Theweight as double
The weight is input on a daily basis via a textbox. The date is taken from the pc's calender. I have a sample to go by, which uses integers and doubles as variables. Everything i have tried so far gets errors because of the date.
Dim NumberGames As Integer
Dim DStreak(144) As Double
Private Sub frmPlot_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Streak As Integer
'Open file, load data in arrays
FileOpen(1, AppPath() + "mar95.csv", OpenMode.Input)
NumberGames = 0
Do Until EOF(1)
Input(1, NumberGames)
Input(1, Streak)
DStreak(NumberGames) = CDbl(Streak)
Loop
FileClose(1)
picPlot_Paint(Nothing, Nothing)
End Sub
The above code is what i am trying to follow.
i hope this helps
thanks
Regards
Zeldacat
|
|
|
|
|
And the error would be???? I don't anything in this code that has anything to do with a date.
|
|
|
|
|
sorry I know what you mean. the code i showed is what i am trying to use as an example. but i got myself totally lost. teaching yourself at 52 isn't easy. but i must
Regards
Zeldacat
|
|
|
|
|
Thanks to all for the help. I have now resolved my query.
Regards
Zeldacat
|
|
|
|
|
Em dang lam chuong trinh co caro tren VB.NET bac nao co ma nguon port len cho em voi(:(chu yeu la nguoi danh voi may ay kho qua a)
|
|
|
|
|
It would be better if u ask ur prob in English
Happy Programming
-----
Abhijit
|
|
|
|
|
Abhijit@CodeProject wrote: It would be better if u ask ur prob in English
Translation:
It would be better if you asked about your problem in english.
---
single minded; short sighted; long gone;
|
|
|
|
|
It would be better if you stopped using TXTSpeak in the forums. There's over a hundred keys on the keyboard in front of you. Use them.
|
|
|
|
|
you have to search in google i think
A.E.K
|
|
|
|
|
viết tiếng anh người ta mới hiểu được chứ !
đây là cộng đồng lập trình viên trên thế giới
chịu khó nhờ ai giỏi tiengs anh hoặc tiếng anh phọt phẹt thì viết ra mấy từ mà sao cho ng rta hiểu được cậu hỏi gì chứ
bây h tìm trên google thì chắc có nhiền lếm rồi
-------------
search on google.com.vn
thanks
in forum in vietnam,there are many topic about this
|
|
|
|
|
Hi,
I have and Issue where one of my imported fields is being formatted in the datagrid view,
The code to import the file is thus:
If OpenFileDialog1.ShowDialog(Me) = DialogResult.OK Then<br />
Dim fi As New FileInfo(OpenFileDialog1.FileName)<br />
Dim sConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties=Text;Data Source=" & fi.DirectoryName<br />
Dim objConn As New OleDbConnection(sConnectionString)<br />
objConn.Open()<br />
Dim objCmdSelect As New OleDbCommand("SELECT SupplierID, SupplierDebrand, RangeID, RangeDebrand, ItemID, ModelNumber, Description, cost, Usual, Sell, SKU FROM " & fi.Name, objConn)<br />
Dim objAdapter1 As New OleDbDataAdapter<br />
objAdapter1.SelectCommand = objCmdSelect<br />
Dim objDataset1 As New DataSet<br />
objAdapter1.Fill(objDataset1, "test")<br />
DataGridView1.DataSource = objDataset1.Tables(0).DefaultView<br />
objConn.Close()<br />
End If
But my problem is sometime I have a model number like "0802.123" but in the grid it is showing it as "802.123" So how do I stop it from formatting it as a number as opposed to text?
Thanks in advance
|
|
|
|
|
Hi,
You can set the custom format for that column.You can try using the following code snippet.
Me.DataGridView1.Columns(1).DefaultCellStyle.Format = "0##.00"
You will have to set the column index on the above code.
Regards,
Allen
Allen Smith
Software Engineer
ComponentOne LLC
www.componentone.com
|
|
|
|
|
Thanks for that feedback, but unfortunatly it does not work, as the data is not always numeric sometimes it is text like "CAT 10" is there a .format that will force a text value?
Regards
Simon
|
|
|
|
|
You have to use a schema.ini file to describe each column in the file you're importing. That column is being interpreted as a numeric column instead of a text string.
Read...[^] and Read[^]
|
|
|
|
|
Thank-you very much, works a treat
|
|
|
|
|
Hi,
I inserted a textbox in slide 1 and another textbox in slide 2 of the powerpoint. How do I do the coding so that the text entered in Textbox 1 (slide 1) will auto appear (transfer over) to textbox in slide 2?
Pls help. Tks!
|
|
|
|
|
|
Thanks lots!! I know nuts about coding, luckily my friend intro' me this website! Tks! =)
|
|
|
|
|
SOrry.. I have another qns. The coding works for Powerpoint 2007. BUt when I saved the file and open using Powerpoint 2003, it doesn't works.. Why is it so? Any way to resolve the prob?? Tks lots
|
|
|
|