|
Hi Martyn. That is a very broad request for help. How new are you to programming in general, and to .NET programming in particular? Would you be helped at this point to get a list of recommended reading on the subject?
As you go along, if you get to a specific point in your coding that is causing difficulty, or have a question about a more specific area in your development, post it and I'm sure folks will try to help. It's just a tough thing to answer such a broad question, beyond offering links you could visit or recommendations for books, that sort of thing.
|
|
|
|
|
Hi
How to make property indexers in VB .NET...
Against my will, I am standing beside my own shadow!
-------------------
Therez No Place like ... 127.0.0.1
|
|
|
|
|
The following should work:
Public Property Notes(ByVal index As Integer) As String<br />
Get<br />
Return m_Notes(index)<br />
End Get<br />
Set(ByVal Value As String)<br />
m_Notes(index) = Value<br />
End Set<br />
End Property
The when you're using the property:
myClass.Notes(2) = "Some message!"
Hope this helps.
Dan Morris
|
|
|
|
|
he he he he....
I want to do
myClass(2) = "Some message!"
Anyway, thanks for your time... I appreciate it
fadee
-------------------
Therez No Place like ... 127.0.0.1
|
|
|
|
|
I think you want to assign a property as Default . Try this page on MSDN[^].
|
|
|
|
|
Meeeeeeeerci
-------------------
Therez No Place like ... 127.0.0.1
|
|
|
|
|
Add a "Default" to that property and then you can call it as myClass(2) = "SomeMessage".
Default Public Property Notes(ByVal index As Integer) As String
Get
Return m_Notes(index)
End Get
Set(ByVal Value As String)
m_Notes(index) = Value
End Set
End Property
|
|
|
|
|
somebody please about how to store a video files and play it into a web application (just like Yahoo!Movies site)
i'm kinda new on this thing
given2fly
|
|
|
|
|
What books or articles have you already read/researched to learn about web development?
What you're describing could be as simple as:
1) - create files in .avi, .mp3, .mov, or other video format
2) - store those files in a directory on a web server
3) - create simple html page (wouldn't really need asp.net for this) with <a href="xxxxxx.avi">MyFile</a> kinds of tags.
|
|
|
|
|
I am creating an MDI applicalion using VB.NET and I need to know how to restrict opening only one instance of each child form. Currently everytime I click on a child form it opens a new instance of it. If an instance of a particular child form is open and I click to open again it shouldn't let me.
Your HELP is greatly appreciated.
|
|
|
|
|
Hi. I'm not sure I understand what you mean. In your MDI application, are you clicking a menu item to instantiate a child form? If that's the case, then it should be simple in your parent form to maintain a private variable that can hold the child form. In the menu item code to open the child form, check if the private variable is nothing ; if it is, set it to a new instance of your child form. If it isn't, then don't create a new child form instance, just use the Activate() method of the child form in the private variable to bring it to front. Something like this:
...
Private _childForm as MyChildFormClass = nothing
...
Private Sub OpenMyChildForm()
If (_childForm Is Nothing) Then
_childForm = new MyChildFormClass()
_childForm.Show()
Else
_childForm.Activate()
End If
End Sub
|
|
|
|
|
Anybody out there who knows how to save Documents created in Ms Word or any other Word Processor in a database instead of a folder and more specifically in MsAccess, using VB.NET?
Also, I need to save different kind of Images or pictures in a database (MsAccess)as well.
Your help is greatly appreciated and desperately needed. Thanks in advance
Ted
|
|
|
|
|
respected sir/madam,
please tell me how to save and scan image with VB6 acting as a front end and Access as a backend.note that i have to use a Adodb control
praveed
PRAVEED
|
|
|
|
|
When I use the notify icon on my form how can i get it to keep the form hidden when the program starts up?
|
|
|
|
|
You can implicitly open a form without showing it.
I keep all pictures i use in one form and use them from there:
Me.Icon = frmPictures.Icon
or
Me.tvwArticles.ImageList = frmPictures.imlNodePics2
Hope this helps
Grtz, Guus
|
|
|
|
|
I want to kill an executable from my VB application. I can't use window handles and WMI. Any suggestion will be great!
Thanks
Shyam
|
|
|
|
|
In VB, your going to need either the ProcessID or the Window Handle to kill the process, so you can send the WM_CLOSE message to the top level window.
In VB.NET, you can use the System.Diagnostics.Process class to kill the process you want.
RageInTheMachine9532
|
|
|
|
|
email me to send good program for you
hmdfar@yahoo.com
|
|
|
|
|
I currently have a timer that uses an array to see if there are specific exe's running on my machine.
Dim strProcArray() As String={"notepad","calcualtor"}
Dim i As Integer
For i=0 To UBound(strProcArray)
buildProcess(strProcArray(i))
next i
End Sub
So here is my question?
Is it possible to use a data reader (SQL SRVR2K) to to query a table with exe file names in it and loop through that as my array? Is a data reader the right choice? If possible a sample would be great.
Regards
|
|
|
|
|
Dim conn As New SqlConnection(''''YourConnectionStringHere)
Dim cmd As New SqlCommand
Dim dr As SqlClient.SqlDataReader
With cmd
.Connection = conn
.CommandType = CommandType.Text
.CommandText = "SELECT ExeName FROM tProcessNames"
.Connection.Open()
dr = .ExecuteReader(CommandBehavior.CloseConnection)
While dr.Read
buildProcess(dr.Item("ExeName").ToString)
End While
End With
dr.Close()
If I understand you right that should do it. Hope it helps
|
|
|
|
|
Hi guys.
Am working on an app that needs to dump some product codes into a col in Excel (2K3). Unfortunately, some of the prod codes are numeric, some textual. Naturally, when adding through code, Excel left justifies the text ones, and right justifies the numerics.
Have tried to add a "'" before the data, and this does in fact cause excel to L-Justify the data, however, in 2K3, it causes an error smart tag stating that "the number in this cell has been formatted as text or is preceded by an apostrophe"
What I'd really like to do is format the entire Column as a Text only column - any ideas how to do this from code - is simple using the Excel front end, but can't find a way to do it from code....any ideas?
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Here is how I format columns in excel using a CExcel class module:
Set objExcel = New CExcel
With objExcel
.OpenExcelFile strFilename, "Visit List"
.StoreExcelRange "A1", lngRecsProcessed + 3, 13, varDataArray
.FreezePanes "A3", True
.SetExcelRowBold 1
.SetExcelCellWidthAutoFit
.FormatColumn "A", "000000000"
.FormatColumn "E", "$#,##0.00"
.CloseExcelFile
End With
Set objExcel = Nothing
Here is the actual code in the FormatColumn
m_objWorksheet.Columns(p_strColumn).NumberFormat = p_strFormat
To see exactly what code excel uis doing you could record a macro in Excel as you format the column. The code you need will be in side the macro code and is easily migratable to VB
|
|
|
|
|
Yeah - appreciate your help, but what I was after was something allong the following lines:
oWorkSheet.Cells(lRow,lCol).Errors(xlNumberAsText).Ignore = True
Thanks for the help tho....
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Need Help! I created a program complete with a Set-up disk that created a start up short cut. The trial set-up ran and worked great on my Desk Top that it was created on which has a copy of Visual Basic.net loaded, (Windows XP)however when I attempted to run it on my laptop(Windows 98) it was a no go. When I loaded the disk the setup ran fine but when I attempted to run the program no luck. I had downloaded the Dotnetfx.exe file onto my laptop. Here is the message I get: "common language runtime debugging service application has generated an exception that could not be handled. Process id = 0xfff50 aaf[-718161}, Thread id = 0xfffb35b3{-313933}. Click OK to terminate application. Click cancel to debug the application." I tried clicking cancel and got the following message. "registered JIT debugger is not available. An attempt to launch a JIT debugger with the following command resulted in an error code of 0x2 (2). Please check computer settings. cordbg.exe! a 0xfff50 aaf. Any ideas how to make this work so I can distribute it? This is the first program I have written with .net!
|
|
|
|
|
Hello guys,
I'm novice in VB 6.0 but have some skill in VC++.
I'm developing COM-server using Visual C++ and "thin client" in VB 6.0 ("late binding").
One of function is present in COM-server as follows:
[id(5), helpstring("method Encoder")] HRESULT Encoder([out] long * Result, [out] long * LastError);
As you see, method "Encoder" receives two pointers to long data type. I can invoke that method from client written on Visual C++, but I can't do that on VB.
Is it possible to call method "Encoder" from VB Client? How?
Or I need to rewrite my COM-server and include two separate methods:
- get_EncoderResult
- get_EncoderLastError
?
Yours sincerely,
Alex Bash
|
|
|
|