|
hi everyone,
I have one problem while using this split function in vb.net.
actually my requirement is i have a valuepath of my treeview control.
and i have to split it in a reverse direction.
Ex.
M002/67/03/26/21.....
i want this to be split in reverse like i have to get the date of 21 next 26 next 03 like that
hope u all understand my need..
waiting for ur replies...
thanks
Prasad.M
|
|
|
|
|
You cannot split in reverse... You should split the string, and than either loop through the array in reverse order, or reverse the array and loop through the array
|
|
|
|
|
is there any possible way to record the printed job, doc name, user, date/time with vb 2008.. i haven't reached deep enough to vb 2008, so pls help me
|
|
|
|
|
|
well.. first,, thanks anyway.. Mr..Jones
i've got some idea according to your reply.. it's also better to get a complete project which connects to the database and records the user_info/printed date_time/doc_info/ bla bla bla.... wow.. i know i am expecting too much..i am just expressing my needs actually. i am gonna try it anyway.. just let you know to share with me when you found something related to my desire.. every reply from you will be highly appreciated..thanks and bye
back to vb
|
|
|
|
|
aungthiha wrote: it's also better to get a complete project which connects to the database and records the user_info/printed date_time/doc_info
That sounds like the Printer Usage Monitoring Application[^] then.
|
|
|
|
|
it's so great to see that powerful application.. and another thing is i've found a component called PrinterMonitorComponent(the one you posted on another subject..) it's also useful for me.. now i am using that component but not effectively yet. coz i don't have sql server yet so that i can't run the app you shared me.. thanks anyway. one more thing do you have some code which expresses about PrinterMonitorComponent. keep smile... thanks
|
|
|
|
|
hello
i am a computer engg student of final year.
so i making a project in final year.
i have choose any one of below. this project in vb.net 2005
1: antivirus
2: datasecurity
3: bluetooth hacking the mobile
4: compiler
5: data hidden in image
6: 8086 compiler
7: database managment system like oracle,ms acess
so plz give me some idea abt my above project.and related website.
reply me immediate. the last date is comming soon.
|
|
|
|
|
I think picking one of the items in the list strongly differs per person. I would chose a database management system because I think i'm best at that topic, compared to the others in the list. However someone with loads of knowledge of virusses may pick the antivirus. It would be a nice poll on CP's main page
The one and only related website of course is codeproject![^]
|
|
|
|
|
|
hello,
i am making a dataconvertor in vb.net 2005.
i want to change my datagridview column's style at runtime from combobox to textbox. i have used cell template and other property.but couldnot get solution.
when i click in column then it become textbox.and when i leave that column then it become combobox.
i have used database in that datagridview.
note: change column type without combobox's view poperty.
|
|
|
|
|
HELP!!! rs.fields(i).value is destructive
VB6. ODBC, ADO, SQL Server
I think that I am going crazy.
1 program seems to get this problem intermittantly.
I can only read the data once. They it goes to null
ODBCRS.Close:Set ODBCRS = ODBCCon.Execute(SQLString, iRecordsAffected)
? ODBCRS.Fields(93).Value,ODBCRS.Fields(93).Value
Sergio Null
Even ? ODBCRS.Fields(94) will charge field 93 to nulls
It does NOT happen on all fields. Field 94 in this case works fine.
What am I missing?
Help!!!!!!!!!!!!!
Jack
|
|
|
|
|
When you read blob fields (text, image, et.c.) from a recordset, they have to be read in the exact order that they come in the recordset, i.e. row by row, field by field, and each field can only be read once. If field 93 and 94 are blob fields, you have to read field 93 first, then field 94. If you read field 94 first, you skip past field 93 so it's discarded.
The reason for this is that the data for those fields can be much larger than the input buffer, so the data is sent in a separate stream. You can only read the data for the blob fields in the order that it comes in the stream.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
So text fields are blobs.
And blobs are ugly!!!!
So if it were vartext instead of text it would work???? Since we do not have control of the database we have to live with it.
This makes the programming extremely ugly because we need all the fields and then also need specific fields. This will require scanning the names to find the fields offsets for the fields we need.
But this does explain a lot even though I don't like it very much.
Thanks.
Jack
|
|
|
|
|
QBTeKcom wrote: So if it were vartext instead of text it would work?
Yes, the varchar data is sent in the buffer.
QBTeKcom wrote: This makes the programming extremely ugly because we need all the fields and then also need specific fields. This will require scanning the names to find the fields offsets for the fields we need.
That's not extremely ugly at all. That's basically what the recordset does every time you access a field by name, that's why it's faster to access the fields by index.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi
I am uploading a text file on a Linux server but after uploading when I download the same file again (to download again I am using CuteFTP) and open it then I see that there are an extra line breaks after each line.
I am using FtpWebRequest method to upload the file while UseBinary is set to true.
Can you please help me out asap?
Regards,
MAP Tiger
Tiger Softwares
Software Designer and Developer
VB.NET, ASP.NET, VFP
|
|
|
|
|
This sounds like it could be a problem with the editor you are using.
Linux (and most unix like os) use LF (linefeed, chr(&h0a)) to signify a new line.
Windows uses CRLF (Carriage Return+Line Feed, chr(&h0d)+chr(&h0a))
I suspect that some editor you have used has converted from the Linux newline format to the windows newline format.
If you could do a hex dump of the file at all stages, and check for the line breaks you should be able to see where this is happening.
(oh, and CuteFTP is also set to use Binary for the specific file format you are using isnt it? )
|
|
|
|
|
Hi
Thanks for the reply.
Well I figured out that it was due to binary mode set to true so I just switched off binary mode and switched on passive mode and my problem solved.
Problem was due to Linux server as it was manipulating the file if uploaded through binary mode and the file was huge too, and passive mode just did the trick so I am happy now.
Regards,
MAP Tiger
Tiger Softwares
Software Designer and Developer
VB.NET, ASP.NET, VFP
|
|
|
|
|
I need to center a picture box in the exact middle of my windows MDI Parent form. Can anyone tell me the easiest way or best way to do this through code. Thank you!
|
|
|
|
|
The client area of an MDI form is an ordinary control, although it is not directly exposed by the form. This is a method I have in Class Toolbox:
Public Shared Function GetMdiClient(ByRef MdiForm As Form) As MdiClient
Dim Client As MdiClient = Nothing
For Each C As Control In MdiForm.Controls
Client = TryCast(C, MdiClient)
If Client IsNot Nothing Then Exit For
Next
Return Client
End Function
With that, you can then use this code:
Dim MC As MdiClient = Toolbox.GetMdiClient(MyMainForm)
If MC IsNot Nothing Then
PictureBox1.Top = (MC.ClientRectangle.Height \ 2) - (PictureBox1.Height \ 2)
PictureBox1.Left = (MC.ClientRectangle.Width \ 2) - (PictureBox1.Width \ 2)
End If
Using this technique, you can do things like change the background color of the MDI client area. MdiClient exposes a BackgroundImage property, which might allow you to dispense with the PictureBox entirely.
Edited to fix another bug
modified on Wednesday, July 30, 2008 3:41 PM
|
|
|
|
|
I already am using a backgroundimage with the backgroundimage property. I just need another image ( a logo ) to overlay the background image and always be in the center of the MDIForm. I am about to attempt to try your method, I appreciate your response and I will let you know if it works or not. Thanks again!
|
|
|
|
|
I tried what you wrote and for some reason it isnt liking this line of code :
Dim MC As MdiClient = clsGetMDI.GetMdiClient()
I get a squiggly under clsGetMDI.GetMdiClient. I changed the name of the class by the way from toolbox to clsGetMDI. It is saying argument not specifyed for the parameter frmMainMDI in the public function getmdiclient etc. frmMainMDI is the name of my MDI Parent form. I have the exact same code you do except I replaced MDIForm with the name of my actual MDI form and I have a different class name where the function is located, that is it. Other than that I am using the exact same code.
Any thoughts????
|
|
|
|
|
You need to pass in the the form. Sorry about that.
|
|
|
|
|
Ok gotcha, it is working fine now. Thank you for your help. You saved me a major headache... Thanks!!!!
|
|
|
|
|
DataGridViewTextBoxCell has a single constructor, which takes no parameters. I would like to extend it to have a constructor with an object parameter, which will set its value in one statement, like this:
DGVRow.Cells.Add(New DataGridViewTextBoxCell(StartingValue)) The extension method should look like this:
Public Module Extensions
<Extension()> _
Public Sub New(ByVal this As DataGridViewTextBoxCell, ByVal Value As Object)
this.Value = Value
End Sub
End Module This produces error squiggles under Public ("Shared 'Sub New' cannot be declared 'Public'") and New ("Shared 'Sub New' cannot have any parameters.") Using any name other than New eliminates the errors.
Can what I want to do be done without subclassing?
|
|
|
|