|
Load the text file into memory, search for and replace what you want using normal array and string operations, then write the modified file back out.
If your file is too big to fit in memory, you'll have to use other techniques described in this article[^].
|
|
|
|
|
hi everyone,
1 m newbie for Drawing class .i created PNG through programmatically.Everything in fine Except Width & height of PNG. i draw a PNG based on string, input by User
at starting time I fix the size(height & Width) of PNG. but even for single character it takes same size as i specified. whether there r any option to remove White pixcel (where red ,green,blue equal to 255 for row from top or bottom ,and for any column from Left or Right)
any help will be appreciated
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
You already asked this question and you already got your answer. You cannot reduce the size of the image because PNG is already a compressed format.
|
|
|
|
|
sorry sir for asking same question once again.
i m newbie in Drawing class . so i don't described my problem in correrct manner.so i post same question once again.
by the way i find the solution to reduce the PNG image to 150 Bytes(before it takes above 1KB for single word of some character)
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Hi,
Actually, We are receiving CSVfiles over FTP,when we receive a CSV file, we have to read the file information (number of rows in the file)after that we have to parse the CSV file and we have to compare both row count in the header and number of rows in the CSV file if both are equal then we have to insert that file into database other wise we have to reject it.
Here my problem is I know how to parse CSV file, Now I want to know how to read the CSV header file, the problem is I haven't look at a CSV file with header thats why I am unable to continue. do the need full help
Thanks and Regards,
sudhakar venati,
Mob: 0 984 55 989 71.
|
|
|
|
|
There is no header file for a CSV file. There is a header row, which would be the first line of the CSV file. You read it and parse it the exact same way you would any other line in the file.
|
|
|
|
|
can any one tell me how can i make a proceduers in vb2005
and how can i call it from any other place
thanks
|
|
|
|
|
Private Sub MyProcedure()
<BODY>
End Sub
Now call this MyProcedure() from any event inside the form:
Private Sub Form_Load()
Call MyProcedure
End Sub
If you want this Procedure to be accessible in the whole project, you will have to declare it as Public.
Hope this helps....
The name is Sandeep
|
|
|
|
|
thanks u very much
it helped me a lot
|
|
|
|
|
hi,
I want to display report on VSPrinter component of Vb6.0.
Pls send me the code if u r having???
GIRISH
|
|
|
|
|
There's no such object as VSPrinter that comes with VB6. If you're using a third party control, you'd have to go to the manufacturers site for support on it.
|
|
|
|
|
I want some Demos and tutorials of Crystal reports in vb 6.0.
Pls send me the links for the same.
Thanks !!!
GIRISH
|
|
|
|
|
If you have installed Crystal Report in your machine, then no doubt you will get the Help with it.
The name is Sandeep
|
|
|
|
|
Hey guys, I'm having an issue with the windows CheckedListBox control. I set it to only be able to select one row at a time, however it still allows multiple checked rows, just not multiple highlighted rows, anyone know of a way to be able to only check a single row?
Thanks for any help,
Pablo
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
Polymorpher wrote: however it still allows multiple checked rows
This is the correct behaviour, since selected items are the highlighted, not the checked ones. IMHO you have to explicitely uncheck the previuos checked item(s) (the CheckedListBox.CheckedIndices will be handy for the purpose) to obtain the aimed result.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I want to convert VB.Net .
Vb 6.0 code
m_strSql = "Select Top 0 From TableName"
aCmd.CommandText = m_strSql
aRec = aCmd.Execute
Select Case aRec.Fields(0).Type
Case ADODB.DataTypeEnum.adVarChar
MsgBox "String"
Case ADODB.DataTypeEnum.adSmallInt
MsgBox "Integer"
end select
Dim dt As DataTable = New DataTable
Using reader As IDataReader = db.ExecuteReader(m_strSql)
dt.Load(reader)
End Using
Select Case dt.Columns(0).DataType
?? case system.char ??
MsgBox "String"
end select
system.char is why can't be use as an expression.how can i know dataType ???
thanks all.
|
|
|
|
|
There may be an easier way but you can convert the type name to a string and compare using that
eg
Select Case typeof(myobject).ToString
Case GetType(String).ToString
Return "This is a string"
Case GetType(Integer).ToString
Return "This is a number"
Case else
return "Unhandled type: " & typeof(myobject).tostring
End Select
What that is doing is getting the string definition of the 'myobject' and then comparing that to the string values of the types of integer, string, etc
There is probably a better way of doing this but it should work OK.
|
|
|
|
|
Hey all:
I have written a code that will export my data from Datagrids to Excel. It is taking sometime to write the data in excel file. I thought it would be better if I could provide some visual feed back to user like in progress bar or any other when my application writes data in Excel.
Can any body help me how to set the inteval and how can know that excel application is opened from the code?
Others type of suggestions for achieving my tasks is highly appreciated.
|
|
|
|
|
Hi,
Don't know if this will help, But I have used this a few times in excel to show a progress in the status bar...
Sub StatusProgress()
'
' Progress Application Statusbar
'
Dim intIndex As Integer
Dim sngPercent As Single
Dim intMax As Integer
intMax = 100
For intIndex = 1 To intMax
sngPercent = intIndex / intMax
ProgressStyle sngPercent
DoEvents
'------------------------
' Your code would go here
'------------------------
Sleep 100
Next
Application.StatusBar = False
End Sub
Function ProgressStyle(Percent As Single)
' Progress Style
' Application Status bar
' Pulsing
'
Dim strTemp As String
Dim intIndex As Integer
Dim intLen As Integer
intLen = 21
intIndex = Int((Percent * 100) Mod intLen)
strTemp = String(intLen, txtPg7a.Text)
If intIndex > 0 Then
Mid(strTemp, intIndex, 1) = txtPg7p.Text
End If
Application.StatusBar = "Processing " & strTemp
End Function
Cheers,
Stefan.
All answers have a question? All code has an end.
|
|
|
|
|
Opps,
Adjustments to above code...
Replace 'txtPg7a.Text' with "o" and replace 'txtPg7p.Text' with "•"
Sorry..
Cheers,
Stefan.
All answers have a question? All code has an end.
|
|
|
|
|
Hey I repalced whatever you have told me but I still get some compile errror?
What exactly o and . are doing?
and it also gave me some erros on other parts of code. Is the code written in VB.NET?
|
|
|
|
|
Hey,
Sorry forgot to declare 'Sleep'
Place this at the top of your module
Option Explicit<br />
<br />
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long )
The "o" and "." are use to show a progress in the status bar, the "." runs along the "o" to give you the progress.
Hope this helps.
Cheers.
Was written in Visual basic
"All answers have a question? All code has an end."
|
|
|
|
|
Hi,
Is it possible to have multiple thumbs along a slider control, if so can anyone direct me as to where I can find informantion on how to do this..
Thanks in advance!
Stefan.
All answers have a question? All code has an end.
|
|
|
|
|
No, using the standard TrackBar control, it isn't. You'd have to use a 3rd party control that offers this functionality, or write your own version, or use two trackbars coordinated to show a minimum and maximum range.
|
|
|
|
|
Thanks much appreciated!
"All answers have a question? All code has an end."
|
|
|
|