|
Hi forum members ,
I want to write a VB code that read .pst(outlook) file
can any help me in that ?
should I convert the file in other extension first, or I can read it directly?
Regards,
mesho
|
|
|
|
|
You might wanna have a look at MAPI function.
|
|
|
|
|
thank you killerp very much
|
|
|
|
|
hi all,
i am not too much familier with registry programming. I want to simply create a key under any Root key as follows
dim regKey as RegisteryKey<br />
regKey = Registry.LocalMachine.CreateSubKey("testKey", RegistryKeyPermissionCheck.Default)<br />
regKey .Close()<br /> above code is too simple but it give error "The parameter is incorrect".
Please suggest me where I am wrong ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
You're not allowed, by Windows, to create subkeys directly under HKEY_LOCAL_MACHINE. You have to create them in a subkey of the root key. Even then, you're limited to where you can do that.
Since you're new to this and don't really know what you're doing, I'd suggest doing your experimentation under HKEY_CURRENT_USER\Software\ instead. You'll minimize the damage you can do if you screw up.
|
|
|
|
|
Hello!
Does anyone know if it's possible to dynamically create Collections in VB6?
I wanted to dynamically create as many Collections as the user needs/wants.
Just like TextBox1(0), TextBox1(1), and so on.
Is it possible?
Regards
|
|
|
|
|
yes.
Dim x(13) As New Collection
x(1).Add "1,1"
x(1).Add "1,2"
x(2).Add "2,1"
x(3).Add "3,1"
Debug.Print x(1).Item(1)
Debug.Print x(3).Item(1)
it´s also possible to do this dynamically:
Dim x() As New Collection
ReDim x(13)
x(1).Add "1,1"
x(1).Add "1,2"
x(2).Add "2,1"
x(3).Add "3,1"
ReDim Preserve x(17)
x(17).Add "17,1"
Debug.Print x(1).Item(1)
Debug.Print x(17).Item(1)
|
|
|
|
|
Hi Thomas,
Thank you very much!
I declared in a module
Public m_Collection() As Collection
And in my form: (i needed to "Set" in order to work)
Private Sub Command1_Click()<br />
For i = 0 To 13<br />
Set m_Collection(i) = New Collection<br />
m_Collection(i).Add "1234"<br />
Next i<br />
End Sub
It work perfectly
Thanks!
Best Regards!!
|
|
|
|
|
Or simple way of doing it is, Changing Index to 0 for the component in Properties Window.
For Example,
Add & Select Text1, and goto Properties and in Index type 0.
Now when you want to create new one's just use following code, it's much simple.
<br />
Private Sub LoadTextBox()<br />
'Get the number of Textbox User wants or needs<br />
Dim itext As Integer<br />
itext = InputBox("Enter how many text box you want")<br />
<br />
'Now let's create and show them on form<br />
<br />
Dim i As Integer<br />
For i = 1 To itext<br />
Load Text1(i)<br />
Text1(i).Visible = True<br />
'the lines below show new created textbox rightBelow eachother, like Table<br />
Text1(i).Left = Text1(0).Left<br />
Text1(i).Top = Text1(i - 1).Top + Text1(i - 1).Height<br />
Next i<br />
<br />
<br />
End Sub<br />
Hope it helps...
|
|
|
|
|
Hi!
Thank you very much for replying!
Best Regards
|
|
|
|
|
Hi
to all
Please suggest me somthing how can i
edit the datagridview with populating combobox
Thanks in advance.
|
|
|
|
|
|
hi guys
i want to display a form before my application start,
i am writing code in the application events,
Protected Overrides Function OnInitialize(ByVal commandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String)) As Boolean
Dim sfrm As New sp
sp.Show()
Return MyBase.OnInitialize(commandLineArgs)
End Function
problem is that controls of the sfrm are not shown ,, why ?
thanks in advance
hello
|
|
|
|
|
You are calling show, when you need to call ShowDialog, to show the form so that your app stops and waits for the form to close
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
If you are displaying this screen simply as a splash, and if you are coding in VB, you can specify a Splash Screen in the Project Properties screen in the Application area. I do not believe this is available for C# though. Then you don't have to worry about this code at all, it will be handled for you.
Hope this helps.
|
|
|
|
|
I have problem with this Code
I want to display stopwath in the textbox with format "h:m", but it cannot run....!
Any body can make this Code perfect...?
Dim timePerParse As Stopwatch<br />
Dim jam1 As String<br />
stp = Stopwatch.StartNew<br />
jam1 = Format(timePerParse, "h:m").ToString<br />
Me.TextBox2.Text = jam1
Thanks at all
Best Regards,
Ahmad Rifai Yusuf
|
|
|
|
|
Ahmad Rifai Yusuf wrote: Dim timePerParse As Stopwatch
You haven't instantiated StopWatch class. Read the documentation[^]
|
|
|
|
|
I need to get the contents of a certain column of a list view from a form and put the contents of that column in the database.
How do I get the contents of a particular column of a list view?
|
|
|
|
|
Hello,
You cannot retrieve an item from the ListView using Column collection. You have to be specific
to a row or the ListViewItem. Each row is a ListViewItem with the values in each column as
subitem.
Try this line of code:
Msgbox(Me.ListView1.Items(0).SubItems(1).Text)
In the above code, Items is each row, and SubItems is each column value.
I hope this helps.
Regards,
Allen
Allen Smith
Software Engineer
ComponentOne LLC
www.componentone.com
|
|
|
|
|
How do I get the row value when the user selects the row from the list view?
|
|
|
|
|
Does each subitem have an index or id?
If so, how do I get the index of each subitem?
|
|
|
|
|
Hello
I would like to be able abort a function or sub when i push a button (Stop). Assume for example that
I have made an app that searches for files, and by "mistake" I enter a search argument like *.*
on a very large disc that has a very large number of files. Or maybe I just want to quit searching....
I was thinking about something like this (pardon my outrageous pseudo pseudo code)
Function SearchForfiles (some params) as SomeType<br />
<br />
here is lot of code (recursive stuff, loops and what have you)<br />
<br />
'here comes the thing I'm looking for:<br />
<br />
If (user presses the button Stop) Then<br />
Exit Function or Sub<br />
End If<br />
<br />
End Function (End Sub)
And after the user has pressed the stop button everything is normal again and he can do a wiser
search this time. So the main question is how to stop the execution of a sub routine without ending the app,
and the second question is how the function/sub is supposed to know that the user pressed a button
I hope you understand what I'm Looking for
Bye for now
Tim
|
|
|
|
|
You need to research multi-threading. You could start by researching the background worker control.
Hope this helps.
|
|
|
|
|
I found a solution myself. It's so ridiculously simple that discarded it first as TOO ridiculous. anyway here it is.
Inside the the recursive function that searches for files i have this statement:
<br />
'txtStop is an invisible textbox<br />
If txtStop.Text = "0" then<br />
Exit Function<br />
End If <br />
<br />
On the form I have a button with the caption "Stop search" and the button code is:
<br />
Private Sub btnStopSearch_Click()<br />
Me.txtStop.Text = "0"<br />
End Sub<br />
Ain't it ridiculous! Thanks for the tip though about the multi threading
|
|
|
|
|
What you're doing now is pretty obvious, the trouble is, if the processor is really busy, the UI is not going to be responsive, and so the button press won't always register.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|