|
I am looking for example that shows me how to write a file joiner or splitter.
Can you show me some examples about that and about md5 checksum as well.
Thanks a lot!
|
|
|
|
|
|
How can i do for this think:
* send a file via serial rs232 interface
* get the data after transfer via rs232 interface
* and how can i save a file after that
And who knows what's:
* the form of file/data that i will receive after
Lets assume i am using two PC for this jobs.
thanks!
|
|
|
|
|
First, sending files over serial port is very ineffecient. If it's mission-critical be sure to use an error-correcting protocol such as XModem or ZModem, otherwise one transmit error and you're messed up.
Use the System.Io.Ports.SerialPort class[^] for basic sending/receiving.
|
|
|
|
|
Hi,
I've been messing with this for a while and am obviously missing something but i just don't see it :s...
I'm trying to do a drag drop between 2 listviews and want to drop on a specific location.. Although i think my code is right (which it obviously isn't :p) .. it always returns index -1 on the droplocation..
my code:
Private Sub LVPlaylist_DragOver(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles LVPlaylist.DragOver
' Retrieve the client coordinates of the mouse pointer.
Dim targetPoint As Point = LVPlaylist.PointToClient(New Point(e.X, e.Y))
' Retrieve the index of the item closest to the mouse pointer.
Dim targetIndex As Integer = _
LVPlaylist.InsertionMark.NearestIndex(targetPoint)
'just some visual feedback to see where I am dragging.. -1 always anyways..
LblTargetIndex.Text = LVPlaylist.GetItemAt(targetPoint.X, targetPoint.Y).ToString
' Confirm that the mouse pointer is not over the dragged item.
If targetIndex > -1 Then
' Determine whether the mouse pointer is to the left or
' the right of the midpoint of the closest item and set
' the InsertionMark.AppearsAfterItem property accordingly.
Dim itemBounds As Rectangle = LVPlaylist.GetItemRect(targetIndex)
If targetPoint.X > itemBounds.Left + (itemBounds.Width / 2) Then
LVPlaylist.InsertionMark.AppearsAfterItem = True
Else
LVPlaylist.InsertionMark.AppearsAfterItem = False
End If
End If
' Set the location of the insertion mark. If the mouse is
' over the dragged item, the targetIndex value is -1 and
' the insertion mark disappears.
LVPlaylist.InsertionMark.Index = targetIndex
End Sub
Private Sub LVPlaylist_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles LVPlaylist.DragDrop
Dim MyItem As ListViewItem
Dim MyItems() As ListViewItem = e.Data.GetData("System.Windows.Forms.ListviewItem()")
Dim i As Integer = 0
Dim targetIndex As Integer = LVPlaylist.InsertionMark.Index
For Each MyItem In LVfiles.SelectedItems
'is -1 ALWAYS so put it at the top...
If targetindex = -1 Then targetindex = 0
'TODO: make sure the targetindex get's ++ for every item dropped
Dim newitem As ListViewItem = MyItem.Clone
LVPlaylist.Items.Insert(targetindex, newitem)
Next
End Sub
So what am i Missing
|
|
|
|
|
hi,
i'm using VS2008 and work on vb.net wondows application, i have problem here, i'm now using rs232 to display a picture on a board that have LED that have three color in a pixel, the problem now is i need to code a picture in bitmap and take all it's color in pixel and display it to the display board... i'm new in using vb.net graphic..
so, how can i read a bitmap and write it into a picturebox(for example)..
i'm confusing in searching where they all talk about setpixel and getpixel..
or there any reference that same with my problem..
please, in urgent project..
|
|
|
|
|
Does any one know how I would get some data from a MsSQL database and upload it to MySQL hosted server
Situation
I’m running Symantec backup exec on a few severs and they email me notifications of what’s happened in the back up but there are too many to start filling away!!! The program uses MsSql to store the information I want to upload it to mysql hosted sever. I can tell backup exec to run a command after backup
any ideas guys
|
|
|
|
|
You want this automatically or want to do it manually ? You want incremental or just replace all the data on the hosted server ?
If you want to go automatic.. One of the best tools i've seen (opensource) in a long while is Jitterbit (http://www.jitterbit.com/[^]).
This is a piece of software that let's you do database integration on a drag-drop basis. You can go pretty advanced with it, and it connects to just about any database and "transforms" your data, based on a query to just about any other. It can handle webservices, txt or other files, etc .. etc.. and can be schedules to do inserts/updates ever x times ...
Might be worth taking a look at.
|
|
|
|
|
Nice one. Never heard of it before, but it looks impressive. I think I'll try it out on a few systems I have.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Well.. i got 2 of them running in production (on Windows 2003 Server) doing data transformation between ms-sql, MySql , XML and a couple of webservices. Never failed me once so i highly suggest it.
Currently testing the same functionality on a Linux Box in our testenviroment.
Enjoy !
|
|
|
|
|
automatically & incremental
|
|
|
|
|
Well.. then it is definately worth taking a look at.. if you don't trust applications like this, i'm afraid you'll be writing your own data transformation tools....
Do Or Don't, there is no "try catch ex as exception end try"
|
|
|
|
|
I am sending appointment to outlook 2003 using vb.net, i am able to send appointments but the problem is that on my local machine appointment comes with reminder checkbox checked but to reciepents the reminder checkbox remain uncheck. how to get that checkbox checked.
plz suggest a solution.
below is my code:
Dim oApp As Outlook.Application = New Outlook.Application()
Dim oAppt As Outlook._AppointmentItem = oApp.CreateItem(Outlook.OlItemType.olAppointmentItem)
oAppt.MeetingStatus = Outlook.OlMeetingStatus.olMeeting
oAppt.Subject = "Call Follow Up"
oAppt.Body = "Call Report"
oAppt.Location = "Mumbai"
oAppt.Start = Convert.ToDateTime(mdate & " 3:15:00 PM")
oAppt.End = Convert.ToDateTime(mdate & " 6:30:00 PM")
oAppt.ReminderSet = True
oAppt.ReminderMinutesBeforeStart = 5
oAppt.BusyStatus = Outlook.OlBusyStatus.olTentative
oAppt.IsOnlineMeeting = False
oAppt.AllDayEvent = False
Dim oRecipts As Outlook.Recipients = oAppt.Recipients
Dim oRecipt As Outlook.Recipient
oRecipt = oRecipts.Add(email)
oRecipt.Type = Outlook.OlMeetingRecipientType.olRequired
oRecipts.ResolveAll()
oAppt.Save()
oAppt.Send()
oApp = Nothing
oAppt = Nothing
oRecipts = Nothing
oRecipt = Nothing
Thanks and Regards
Aamir
|
|
|
|
|
All,
In my application there is a form with multiple tabs. Each tab contains textboxes, buttons & grids. I want to lock all the controls (else make readonly) in that form. How i can achieve that? Any inputs would be appreciated.
Thanks in advance
Sebastian
|
|
|
|
|
run thru all the controls using me.controls
check if the controls are container controls using control.haschildren
TRUE: run thru those controls and do the same check
FALSE: set enable / lock / readonly (according to what you want) based on the type of control it is (a select case with a gettype(control).tostring (case gettype(textbox).tostring) should do it)
in the true part I sugest you call a second function (since the check there has to be able to call itself again)
so in code it would look something like this
for each c as control in me.controls
if c.haschildren = true then
subfunction(c)
else
c.enable= false
end if
next
subfunction (subc as control)
for each c as control in subc.controls
if c.haschildren = true then
subfunction(c)
else
c.enable= false
end if
next
(this is out of my head and not tested mearly as an illustration)
or you could just lock the containers controls (this will lock all controls in it) but that's not as nice
hope this helps
|
|
|
|
|
Thanks for your reply...
Now the problem is , this code will disable the form also(i.e. the minimze, maximize & restore buttons of the form); How i can resolve this issue...
Please suggest...thanks in advance...
Sebastian
|
|
|
|
|
can you post the code you used so I can have a better picture of what is going on
from what you said I think you locked the first iteration aswel (this is the form)
see if you past the form to the subfunction or not
first step is to iterate thru all the controls in me.controls
second step is to check if those controls have children
thirth step is to lock the control
without you'r code I can't really tell you more
If you post you'r code (just the 2 functions for locking) here I'll see if I can find the mistake
PS: sorry for the late answer but I was out the whole weekend
|
|
|
|
|
private void button1_Click(object sender, EventArgs e) { foreach (Control cntl in this.Controls) { if (cntl.HasChildren) { lockControls(cntl); } else { cntl.Enabled = false; } } }
private void lockControls(Control subcntl) { foreach (Control Ncntl in subcntl.Controls) { if (Ncntl.HasChildren) { lockControls(Ncntl); } else { Ncntl.Enabled = false;
} } }
Thanks
sebastian
|
|
|
|
|
I can't seem to find anything wrong with this code
have you tryed to debug step by step and see when and where the form gets locked?
besides that you might want to dubble check you form property's to make shure you don't lock the form there
I'v tryed your code in a fresh project at my end and it works perfectly (form doesn't get disabled) so my suggestion would be to check if you don't disable you'r form somewhere else (in designer or code)
hope this helps
|
|
|
|
|
Here the problem is , this code will disable the form also(i.e. the minimze, maximize & restore buttons of the form); How i can resolve this issue...provided...I am not disabling the form anywhere else...
Thanks once again
|
|
|
|
|
I can't tell you what could be wrong with it since I can't duplicate the problem
I created a new project added several controls to a form
copy - pasted your code excatly and ran the form
the form doesn't get disabled so I don't think there is anything wrong with this code
as a last resort you could always add the following code at the end of the function:
me.enable=true
|
|
|
|
|
hi all,
In my vb6 application, i will use Date to get the current date and store it into my database.But sometime when i check in the database, the date will be different from what i see in my computer date. I am not sure what was happen.
Any help are welcome,Thank you.
Note:In my situation, i have 2 (A and B), which application B will map to application A's database where both of them will get the wrong date.
regards
cocoonwls
|
|
|
|
|
Check the Date format used in DB to store date and the format in which you are sending / displaying...
In VB6 you can use "format" command to format ur date before you send / display
Good luck
|
|
|
|
|
hi nisharsh_k,
Thanks for reply. May be i am not describe my question clearly.
For example, the system date is 19-06-2008, but i will get the date 11-05-08 in my database.
So, according to your suggestion, is "format" can be apply in this situation?
Thank you in advance.
regards
cocoonwls I
|
|
|
|
|
i think format will help u in this situation
As you had written...
cocoonwls wrote: For example, the system date is 19-06-2008, but i will get the date 11-05-08 in my database.
Hear ur system date format is "dd-MM-YYYY"
cocoonwls wrote: 19-06-2008
and ur DB date is "dd-MM-YY"
cocoonwls wrote: 11-05-08
this indicates that when you send date in a query it is not treated the way you expect as it is too long.... i am not sure how ur DB is looking at it (truncating or something) and storing it differently
good luck
|
|
|
|