|
|
Thanks for the link, I apreciate it
Pablo
|
|
|
|
|
How to export datagrid datas to MS Word in VB.net
|
|
|
|
|
I don't think it is possible in .net.if u got the anser mail me at trickyuk001@rediffmail.com
try to be the best... whereever you go,
|
|
|
|
|
How to set Textbox text on a crystal report at runtime ?
Dim cr As CRAXDDRT20.TextObject
cr = crReport.Section1.ReportObjects.Item("Text3")
cr.SetText(strEmpName)
a.CrystalReportViewer1.ReportSource = crReport
a.Show()
error : specified cast is not valid
Farah
|
|
|
|
|
farhha wrote: error : specified cast is not valid
On what line of code does this error occur? In any case the error description is telling you what the problem is.
...Steve
|
|
|
|
|
I would like to know on how to start an existing windows service programtically (using Visual Basic). After starting the service, I would also like to check the error code that it returns to verify that the service has indeed started.
Can I check a registry key to see of a specific windows service is currently running? If not, is there a programatic way to check if a specific windows service is currently running or not?
Thanks in advance
-- modified at 0:13 Wednesday 7th December, 2005
|
|
|
|
|
|
Thanks Dave.
This code is using the 'System' and 'ServiceControlManager' classes to work with the existing services. I am looking for Win32 API way of checking the status of the service. This is because, I want to use the Win32 API (Declare and code) in Lotus Notes (LotusScript). Generally, LotusScript can use Win32 API similar to a VB code where you DECLARE the Win 32 API function with the arguments and then call that function within the code.
Thanks
Ravi
|
|
|
|
|
Doing it the hard way?
A 10 second search on Google for "vb6 start stop service" revealed this example[^].
10 seconds is a lot quicker than 12 hours in a forum, isn't it?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Have anyone experience, delete key is not functioning on TextBox
So weir, on other forms TextBox is working fine.
Any comment?
|
|
|
|
|
I have an service that I developed that loads a COM library on startup. The application has been running on a machine for several months on a server, but on at least 3 occasions (on 2 different machines) I have recieved a "Cannot create ActiveX component" exception. In order to get the program to run I had to uninstall\reinstall the DLL. Apparently there is something that is happening were the registry entry for the library is either lost or corrupted (I suspect). Anyone have any ideas how I could work around this? The library is redistrubutable, maybe I could re-register it when I load the service? Any ideas would be appreciated, I'm at a loss why after a few months of operation all of a sudden I would be unable to load the library file.
Uptight Ex-Military Republican married to a Commie Lib - How weird is that?
|
|
|
|
|
i am currently having a problem in visual basic .net 2005, while trying to put comboboxes in a datagrid.
I am populating the datagrid with a database table. After i bind this data, i would like to change one of the cells to a combobox. Can someone help me out or point me in the right direction?
anything would be appreciated
|
|
|
|
|
Check this link out:
http://RustemSoft.com/DataGridColumns.htm
They have a pretty good one with examples.
|
|
|
|
|
thank you for the link, im going to look into it
|
|
|
|
|
i've got a form with 3 fields: comboBox, button(text = &Add) and a textBox.
Run the form, type, "abc" in the comboBox, highlight the "abc", click on the Add button and the eventcode shows a selectionlength of 0.
TextBox1.Text = cboBox.SelectionLength
go through the same process and type Alt A, instead of clicking the Add button, and the eventcode shows a selectionlength of 3.
the parameters for the 3 fields are default, visual basic.net, running in MDE 2003, version 7.1.3088.
i've also tried the other selection options, eg, selectedindex, and still get unexpected results.
thanks.
|
|
|
|
|
mattlove wrote: Run the form, type, "abc" in the comboBox, highlight the "abc", click on the Add button and the eventcode shows a selectionlength of 0.
TextBox1.Text = cboBox.SelectionLength
go through the same process and type Alt A, instead of clicking the Add button, and the eventcode shows a selectionlength of 3.
The reason for this is that when you click on the button, focus leaves the combobox, and nothing is selected anymore. Thus the "0". When you do an "Alt A", focus is still in the combobox, and you have three characters highlighted, you get a "3".
mattlove wrote: i've also tried the other selection options, eg, selectedindex, and still get unexpected results.
You don't say anything about adding items to the combobox items, so I am assuming that it is empty. Thus, regardless of clicking the button, or doing an "Alt A", you will probably get a "-1".
I guess my question would be: What do you want to happen?
Let's assume that you want the Add button to add the item to the combobox list. In the button click event, use this code:
CboBox.Items.Add(CboBox.Text)<br />
TextBox1.Text = CboBox.Items.Count
This will add what is typed in the combobox to the combobox list, and then put the number of items in the list into the textbox.
Hope this helps.
Roy.
-- modified at 12:28 Thursday 8th December, 2005
|
|
|
|
|
thanks roy.
my example should have been based on the delete function in which the difficulty is more acute than the add function...my fault.
what i want to do is highlight something in the comboBox and delete it using the delete button.
your answer helped me solve it but i have a question.
my solution is to use selectedindex which returns -1 if nothing is selected...working like a charm.
so, the reason selectedtext, selectedvalue, selectionlength and selectionstart don't work is because the field is out of focus, is that right? can you or do you want to recommend any other solutions i could use?
thank you very much in any case.
matt
|
|
|
|
|
You could try putting this in your Delete button handler:
If cboBox.SelectedIndex > -1 Then<br />
cboBox.Items.Remove(cboBox.SelectedItem)<br />
End If
This does not care if the item has focus or not.
Roy.
|
|
|
|
|
works like a charm
thanks again roy.
matt
|
|
|
|
|
How to set the text of a text box on a crystal report at run time?
Dim strEmpName As String
strEmpName = TextBox1.Text
Dim a As Form2
a = New Form2
Dim crReport As CrystalReport1
crReport = New CrystalReport1
Dim cr As CRAXDDRT20.TextObject
cr = crReport.Section1().ReportObjects.Item("Text3")
cr.SetText(strEmpName)
a.CrystalReportViewer1.ReportSource = crReport
a.Show()
Farah
|
|
|
|
|
this might help u....
add a parameter field in ur report.
than use the following code:-
Dim rpt As New myreport ''the report that u created
CrystalReportViewer1.ReportSource = rpt
rpt.SetParameterValue(0, textbox1.text.trim)
this should work it worked with mine..
abhinav
|
|
|
|
|
How to set the text of a text box on a crystal report at run time?
Dim strEmpName As String
strEmpName = TextBox1.Text
Dim a As Form2
a = New Form2
Dim crReport As CrystalReport1
crReport = New CrystalReport1
Dim cr As CRAXDDRT20.TextObject
cr = crReport.Section1().ReportObjects.Item("Text3")
cr.SetText(strEmpName)
a.CrystalReportViewer1.ReportSource = crReport
a.Show()
Farah
|
|
|
|
|
I need to create a empty sound wave file. I do it like this now.
System.IO.File.Create("test.wav")
This test file has zero bytes.
But the program I am using can't record to it. Says somthing like file type not recognized.
However if I use explorer and right click new - new wave sound, The program can record to it ok.
This one created by explorer has 1k bytes.
How can I programicly create a "formated?" wave file like explorer?
-- modified at 11:40 Tuesday 6th December, 2005
|
|
|
|
|