|
Hello,
I am developing a program, where i want to store the details of the files (like FileName, FilePath) stored in the disk (DVD/CD) including the icon of that file in the database file. While retrieving it should display the details in a windows explorer like window..
Can anyone help me?
Thanks in advance..
|
|
|
|
|
Where are you stuck? What have you tried?
better yet, to help me understand the psyche of people who post questions as such, what would be the ideal answer someone can give you?
|
|
|
|
|
I try to transfer a datagridview selected rows information to a report text box trough database but it is always showing first or last rows informations of datagridview kindly requested to answer any one could?
your reply is highly appreciated
all the best
m.a.norousta
|
|
|
|
|
Could you post the relevant code that you have so far please?
My advice is free, and you may get what you paid for.
|
|
|
|
|
can you explain it a little further that you are using which reporting tool crystal report or Ms Report or any third party reporting tool
with report textbox you mean any field on the report or what and finally are using objects /datasets or what
Best Of Regards,
SOFTDEV
Sad like books with torn pages, sad like unfinished stories ...
|
|
|
|
|
Hi all,
I have a job of separating the file name from its extension and wtitting it into a text file.
I have succeeded in that, but I find that there are few files with many separations/partitions in the file name. say for example: aaa_bbb.01.0101.pdf or aaa.01.0101.pdf
Thanks in advance.
modified 28-Nov-12 8:00am.
|
|
|
|
|
Try and split[^] them at the dot
|
|
|
|
|
|
vijay2482 wrote: sw.WriteLine(s)
This writes a line. As it says. So, instead, just write the text, not a line, and add a tab after it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
That will only work for pdf files and only if the extension is lowercased. The better thing to do would be to replace this:
Dim posn As Integer, i As Integer
Dim fName As String
posn = 0
For i = 1 To Len(flname)
If (Mid(flname, i, 1) = "\") Then posn = i
Next i
fName = Microsoft.VisualBasic.Strings.Right(flname, Len(flname) - posn)
with this:
fName = System.IO.Path.GetFilenameWithoutExtension(flname)
Then you will be guaranteed to never get the extension no matter what it is. Also, you can do without the extra temporary variable here:
Dim words As String = fName
Dim split As String() = words.Split(New [Char]() {" "c, ","c, "."c, ":"c, "_"c, "-"c})
because calling Split (or any other method) on a string does not change the original string.
|
|
|
|
|
Thanks for your suggestion.
I have tried it and it works fine.
|
|
|
|
|
Hello every one
I am trying to save more then one textbox
i found this code on youtube and it worked
but it did not when i repet the code for the other textboxs
'Save Settings Button
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Settings.SaveSet = TextBox3.Text
Settings.SaveSet = TextBox4.Text
Settings.SaveSet = TextBox5.Text
Settings.SaveSet = TextBox6.Text
Settings.SaveSet = TextBox7.Text
Settings.SaveSet = TextBox8.Text
Settings.Save()
End Sub
'Load Setting Button
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
TextBox3.Text = Settings.SaveSet
TextBox4.Text = Settings.SaveSet
TextBox5.Text = Settings.SaveSet
TextBox6.Text = Settings.SaveSet
TextBox7.Text = Settings.SaveSet
TextBox8.Text = Settings.SaveSet
End Sub
Thanks for all of your help everyone
|
|
|
|
|
Bob Beaubien wrote: Settings.SaveSet = TextBox3.Text
Settings.SaveSet = TextBox4.Text
Settings.SaveSet = TextBox5.Text
Settings.SaveSet = TextBox6.Text
Settings.SaveSet = TextBox7.Text
Settings.SaveSet = TextBox8.Text
You have one variable and you set it to each textbox in turn. You need to create a variable for each textbox. You should buy a pretty basic book and work through it, if you don't understand that.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Bob Beaubien wrote: i found this code on youtube and it worked
That's a simple coincidence. There may be better sources of programming information...
|
|
|
|
|
Can you explain
what is your object , what you are trying to achieve , you want to save these text boxes values where in memory temporarily for computing or to a database/ file system for storage or something else
Best Of Regards,
SOFTDEV
Sad like books with torn pages, sad like unfinished stories ...
|
|
|
|
|
Hi
I am trying to save the text box information for when you open the program the info is in the text box
i think i got it now
i got it working for one textbox but for more then one
i think i have to keep addeding items under progect, propertis. settings
for each text box
|
|
|
|
|
Best Of Regards,
SOFTDEV
Sad like books with torn pages, sad like unfinished stories ...
|
|
|
|
|
YES i am so smart, i am so smart S.A.M.T.R oh i meen S.M.A.R.T
so i guess i got the right ancer do i get a gold star ???
Thanks
|
|
|
|
|
His question is so clear that it's already been answered clearly.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi
I Want recognition Time BetWeen 2 Time
For Example:
Now Time is 04:00:00
And My SourceCode is :
if time>=23:15:00 and Time<=07:15:00 Then
Msgbox "ok"
End if
But 04:00:00 Not Greater Than 23:15:00 And My code Failed
Please Help Me
|
|
|
|
|
Subtract the time from DateTime.Now, to know how much time has ellapsed, in the form of a TimeSpan.
I don't see how this code would compile, is that really your code ? What is time, is it a string ? If it's a string, you've lost half the battle.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
you can use datediff also but timespan is better option depends on the your desired results
try to look at cheat sheets also just for a quick reference , u can also Google cheat sheets
here is one of the reference
http://www.addedbytes.com/cheat-sheets/sql-server-cheat-sheet[^]
T = DateDiff("n", (T1), (T2))
T = TimeSpan.Compare(t1, t2)
Best Of Regards,
SOFTDEV
Sad like books with torn pages, sad like unfinished stories ...
|
|
|
|
|
I have to design, write and test a vb program to help the user solve the "Numbrix" puzzle.
The user should have the capability to "undo" a number of steps taken in order to take another path it he current path is unworkable
so far I had this, I am able to crate a dynamic array of text boxes and load a from
Imports System.IO
Imports System.Math
Public Class Form1
Structure rect
Dim rec(,) As TextBox, val(,) As Byte, yy(,,) As Boolean
Sub disp(ByVal a As Integer, ByVal b As Integer)
Dim st As String = ""
For i As Integer = 1 To 9
If yy(a, b, i) Then st &= i.ToString
Next
rec(a, b).Text = st
End Sub
Sub comp(ByVal a As Integer, ByVal b As Integer)
Dim i, j, cnt As Byte
For i = 1 To 9
If yy(a, b, i) Then
cnt = CByte(cnt + 1)
j = i
End If
Next
If cnt = 1 Then val(a, b) = j
End Sub
End Structure
Dim xx(3, 3) As rect, done As Boolean, diff As Byte
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles MyBase.Load
Dim pt1, pt2 As Point, rec As Size
rec.Width = 47 : rec.Height = 29
pt1.X = 25 : pt1.Y = 25
For r As Integer = 1 To 3
For c As Integer = 1 To 3
ReDim xx(r, c).rec(3, 3), xx(r, c).val(3, 3), xx(r, c).yy(3, 3, 9)
pt2 = pt1
For rr As Integer = 1 To 3
For cc As Integer = 1 To 3
Dim newtb As New TextBox : Me.Controls.Add(newtb)
newtb.Size = rec : newtb.Multiline = True
newtb.TextAlign = HorizontalAlignment.Center
newtb.Location = pt2 : pt2.X += 46
If c = 2 And (r = 1 Or r = 3) Or r = 2 And (c = 1 Or c = 3) _
Then newtb.BackColor = Color.LightGray
xx(r, c).rec(rr, cc) = newtb
Next
pt2.X = pt1.X : pt2.Y += 28
Next
pt1.X += 140
Next
pt1.X = 25 : pt1.Y += 86
Next
End Sub
Private Sub LoadButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadButton.Click
Dim lin(8) As String, filRead As StreamReader, i, x, t, d As Integer
Dim openFile As New OpenFileDialog()
openFile.Filter = "txt.Files(*.txt)|*.txt" openFile.InitialDirectory = "\C:\Fall09\numbrix\numbrix\TextFile1.txt"
If openFile.ShowDialog() = DialogResult.OK Then
MessageBox.Show(openFile.FileName)
End If
filRead = New StreamReader(openFile.FileName)
diff = CByte(filRead.ReadLine())
For r As Integer = 1 To 3
For rr As Integer = 1 To 3
lin = filRead.ReadLine.Split() : i = 0
For c As Integer = 1 To 3
For rc As Integer = 1 To 3
If lin(i) <> "00" Then
x = Integer.Parse(lin(i))
If x > 0 Then xx(r, c).rec(rr, rc).ForeColor = Color.Red
x = Abs(x)
xx(r, c).rec(rr, rc).Text = x.ToString
For j As Integer = CInt(Int(Log10(x))) To 0 Step -1
If j = 0 Then xx(r, c).val(rr, rc) = CByte(x)
t = CInt(10 ^ j)
d = x \ t : x = x Mod t
xx(r, c).yy(rr, rc, d) = True
Next
End If
i += 1
Next
Next
Next
Next
filRead.Close()
End Sub
End Class
|
|
|
|
|
Please use PRE tags (as the forum guidelines dictate) so formatting gets preserved, lines get indented, and code becomes readable.
BTW: you can edit the existing message to fix this.
|
|
|
|
|