|
There is nothing in the .NET Framework that will repair a broken database.
|
|
|
|
|
|
|
At a guess I would suggest you have managed to corrupt your MDB. There used to be a repair/compress tool in Access you might look into that.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
that is not work I try it but no result
|
|
|
|
|
Hello,
I'm trying to drag and drop an image (picture) from a column on the left to a column of blank pictures on the right, so I can drop over the blank picture with the original picture. Card game actually.
Image1(52) are the pictures of cards on the left
Hearts(12) are the hearts suit on the right
Clubs(12) also; I haven't finished setting up Spades or Diamonds yet.
Here is the code. I cannot get it to work; the images on the left won't move. Just receive a black circle with a diagnal line through it. Any ideas on how I can solve this would be excellent. Much appreciation in advance.
Private Sub Image1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Image1.MouseDown
Dim Index As Integer
Index = 0
For Index = 0 To 51
DoDragDrop(Image1(Index), DragDropEffects.Copy)
Next
End Sub
Private Sub Image1_DragEnter(ByVal sender As Object, ByVal e As DragEventArgs) Handles Image1.DragEnter, Hearts.DragEnter, Clubs.DragEnter 'Diamonds.DragEnter, Spades.DragEnter
Dim Index As Integer
Index = 0
For Index = 0 To 51
DoDragDrop(Image1(Index), DragDropEffects.Move)
Next
End Sub
Private Sub Image1_DragDrop(ByVal sender As Object, ByVal e As DragEventArgs) Handles Image1.DragDrop, Hearts.DragDrop, Clubs.DragEnter ' Diamonds.DragEnter, Spades.DragEnter
Dim Button As Short
If Button = VB6.MouseButtonConstants.LeftButton Then
Hearts(12).Image = Image1(0).Image
Hearts(11).Image = Image1(1).Image
Hearts(10).Image = Image1(2).Image
Hearts(9).Image = Image1(3).Image
Hearts(8).Image = Image1(4).Image
Hearts(7).Image = Image1(5).Image
Hearts(6).Image = Image1(6).Image
Hearts(5).Image = Image1(7).Image
Hearts(4).Image = Image1(8).Image
Hearts(3).Image = Image1(9).Image
Hearts(2).Image = Image1(10).Image
Hearts(1).Image = Image1(11).Image
Hearts(0).Image = Image1(12).Image
Clubs(12).Image = Image1(25).Image
Clubs(11).Image = Image1(24).Image
Clubs(10).Image = Image1(23).Image
Clubs(9).Image = Image1(22).Image
Clubs(8).Image = Image1(21).Image
Clubs(7).Image = Image1(20).Image
Clubs(6).Image = Image1(19).Image
Clubs(5).Image = Image1(18).Image
Clubs(4).Image = Image1(17).Image
Clubs(3).Image = Image1(16).Image
Clubs(2).Image = Image1(15).Image
Clubs(1).Image = Image1(14).Image
Clubs(0).Image = Image1(13).Image
e.Effect = DragDropEffects.Link
If e.Effect <> DragDropEffects.Link Then
e.Effect = DragDropEffects.None
MsgBox("This card does not belong here.")
End If
End If
End Sub
|
|
|
|
|
Do you have the AllowDrop property of your blankImage set to true .
Note, I haven't read your code yet. Please edit your original post and put the code between
<pre>
your code
</pre>
tags and format it a little, indentation etc., to make it more readable.
You are likely to get more responses, if the code is easier to read.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks for the advice. I didn't have the attribute AllowDrop set to True, so I changed it, but it didn't make a difference. I still cannot get the images, image(0-51) on the left to move or even be selected. I am trying different things, but here is the code and some edited out for testing purposes.
By the way, I formatted this with indentation, but when I post it, it comes up all the way to the left. Any way I can change this?
Private Sub Image1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Image1.MouseDown
Dim Index As Integer
For Index = 0 To 51
Image1(Index).DoDragDrop(Image1(Index), DragDropEffects.Copy)
Image1(Index).DoDragDrop(Image1(Index), DragDropEffects.Move)
' DoDragDrop(Image1(Index), DragDropEffects.Move)
Next
End Sub
Private Sub _Image1_DragEnter(ByVal sender As Object, ByVal e As DragEventArgs) Handles Image1.DragEnter, Hearts.DragEnter, Clubs.DragEnter 'Diamonds.DragEnter, Spades.DragEnter
Dim Index As Integer
For Index = 0 To 51
Image1(Index).DoDragDrop(Image1(Index), DragDropEffects.Copy)
Image1(Index).DoDragDrop(Image1(Index), DragDropEffects.Move)
Next
' Dim Index As Integer
' Index = 0
' For Index = 0 To 51
' If (e.Data.GetDataPresent(DataFormats.Bitmap)) Then
' e.Effect = DragDropEffects.Move
' End If
' Next
End Sub
Private Sub Image1_DragDrop(ByVal sender As Object, ByVal e As DragEventArgs) Handles Image1.DragDrop, Hearts.DragDrop, Clubs.DragEnter ' Diamonds.DragEnter, Spades.DragEnter
Dim Button As Short
Dim Index As Integer
For Index = 0 To 51
If Button = VB6.MouseButtonConstants.LeftButton Then
Image1(Index).DoDragDrop(Image1(Index), DragDropEffects.Copy)
Image1(Index).DoDragDrop(Image1(Index), DragDropEffects.Move)
Hearts(12).Image = Image1(0).Image
Hearts(11).Image = Image1(1).Image
Hearts(10).Image = Image1(2).Image
Hearts(9).Image = Image1(3).Image
Hearts(8).Image = Image1(4).Image
Hearts(7).Image = Image1(5).Image
Hearts(6).Image = Image1(6).Image
Hearts(5).Image = Image1(7).Image
Hearts(4).Image = Image1(8).Image
Hearts(3).Image = Image1(9).Image
Hearts(2).Image = Image1(10).Image
Hearts(1).Image = Image1(11).Image
Hearts(0).Image = Image1(12).Image
Clubs(12).Image = Image1(25).Image
Clubs(11).Image = Image1(24).Image
Clubs(10).Image = Image1(23).Image
Clubs(9).Image = Image1(22).Image
Clubs(8).Image = Image1(21).Image
Clubs(7).Image = Image1(20).Image
Clubs(6).Image = Image1(19).Image
Clubs(5).Image = Image1(18).Image
Clubs(4).Image = Image1(17).Image
Clubs(3).Image = Image1(16).Image
Clubs(2).Image = Image1(15).Image
Clubs(1).Image = Image1(14).Image
Clubs(0).Image = Image1(13).Image
e.Effect = DragDropEffects.Link
Image1(Index).DoDragDrop(Image1(Index), DragDropEffects.Link)
Else : MsgBox("Test")
End If
Next
' If e.Effect <> DragDropEffects.Link Then
' e.Effect = DragDropEffects.None
' MsgBox("This card does not belong here.")
|
|
|
|
|
Nevermind on the format, I think I figured it out.
|
|
|
|
|
ymilan wrote: I think I figured it out
Good for you well done.
For future reference, on the formatting thing there are two options
1. Type <pre> on the line above your code, and </pre> on the line after.
2. Next time tou post a message look just below the typing area, on the line above the emoticons, see the
code block , well either click on it first (it puts the tags in for you) then paste your code between the tags, or paste your code, select it all then click the code block widget.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I am trying to use an insert into command, but getting error in insert statement. Can anybody please tell me whats wrong with following code:
Dim cmd As OleDbCommand = New OleDbCommand("INSERT INTO [Joint Coordinates](Joint, CoordSys, CoordType, XorR, Y, Z, SpecialJt, GlobalX, GlobalY, GlobalZ, GUID) Values('" & dgr1.Cells(0).Value & "','" & dgr1.Cells(1).Value & "', '" & dgr1.Cells(2).Value & "', '" & dgr1.Cells(3).Value & "', '" & dgr1.Cells(4).Value & "', '" & dgr1.Cells(5).Value & "', '" & dgr1.Cells(6).Value & "', '" & dgr1.Cells(7).Value & "', '" & dgr1.Cells(8).Value & "', '" & dgr1.Cells(9).Value & "', '" & dgr1.Cells(10).Value & "')", con)
|
|
|
|
|
Maybe it's because the last parameter is expecting a GUID and you're supplying a string? Obviously I could be wrong but worth looking at
|
|
|
|
|
Rewrite this to use a parameterized query instead of the unsupportable monstrosity this is and it would be easier to fix.
Google results for "parameterized query[^]".
|
|
|
|
|
|
Hi,
I have a datagridview, and it's column(3) contains datetime field from datatable, selected from SQL-Query.
I want to set the culture info as "en-GB" to that date field.
is it possible? I tried by
dim dtbf_52 as new datatable, secidexp As New DataGridViewTextBoxColumn
ci = New System.Globalization.CultureInfo("en-GB")
dtbf_52.Locale = ci
Mydatagrid1.DataSource = dsf_52.Tables(0).DefaultView
With secidexp
.MaxInputLength = 10
.DataPropertyName = "sec_id_expiry"
.HeaderText = "ID EXPIRY DATE"
End With
but it's not getting the dd/MM/yyyy format for date field. So, How To set the culture info to this field?
Thanks Again
|
|
|
|
|
I don't know if this is of any help in your situation, but I have just been reading the MSDN documentation for DateTime again, for something of my own. Anyway, are you aware that the DateTime structure now has a Kind property (DateTimeKind enumeration) which can force it to LocalTime, amongst others.
I haven't finished reading all of it yet, but perhaps you might want to have a look for yourself.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
hi can anybody give me the vb.net code to send the aspx page content to a particular email id on submit
thanks
giri
|
|
|
|
|
|
you found the right forum, although you shouted there, so why cross post ?
We tend to give more help to people who show signs of trying to help themselves.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hello,
I'd like to know if there is an easy way to subtract two times, e.g:
HH:MM:SS,DDD
00:00:53,040
00:00:48,600
____________ -
??:??:??,???
I am now splitting the times (.split(":") ), putting the values back together as one decimal number, subtracting, and placing the ":"'s back (which is the hardest part). Now there must be an easier way to do this, but I don't know how. Somebody please help me out on this one?
Thanks in advance,
Zaegra
Motivation is the key to software development.
|
|
|
|
|
DateTime, Parse, Subtract
|
|
|
|
|
Use the time span class TimeSpan instead of DateTime
Natza Mitzi
|
|
|
|
|
Natza Mitzi wrote: Use the time span class TimeSpan instead of DateTime
And how exactly would that help the OP where Lucs answer wouldn't?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Not true. You still have to use the DateTime class and the RESULT of the Subtract would be a TimeSpan.
|
|
|
|
|
Yes, that's true. Thanks all for your reply, I will try this tomorrow. Always nice to know that there are people willing to help you out!
Motivation is the key to software development.
|
|
|
|
|