|
File/New/Project/VB.NET/Windows Service. That should be a good start.
Google[^] seems to have a lot of info, as well.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Another option would be to create an application that doesn't put up a user interface, either a Windows Forms app or Console app to do the same thing. Be sure that it quits itself after it does what it needs to. Just setup a job to run the application using the Scheduled Tasks control panel. That way, your app doesn't need to be running 24 hours a day if it's only going to do work for a couple of seconds a day.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have the following event handler for a rich text box.
Protected Sub Link_Clicked(ByVal sender As Object, ByVal e As System.Windows.Forms.LinkClickedEventArgs) Handles rtbDescription.LinkClicked
Try
System.Diagnostics.Process.Start(e.LinkText)
Catch ex As Exception
Debug.WriteLine(ex.Message & " : " & e.LinkText)
End Try
End Sub
When I click a link in the rich text box nothing happens an I receive the following line in my output.
The system cannot find the path specified : http://www.cnn.com/rssclick/2005/TECH/internet/07/28/disappearing.apple.ap/index.html?section=cnn_tech
Anyone have any ideas?
MSDN states that this handler should fire the default browser.
|
|
|
|
|
Try it like this:
Dim proc As New Process()
With proc
.StartInfo.FileName = e.LinkText
.StartInfo.UseShellExecute = True
.Start()
End With
I would appear that Process is not using Shell Execute for some reason, so, force it to do so.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have modified my code as you suggested, yet I get the same response.
The system cannot find the path specified : http://www.cnn.com/rssclick/2005/WORLD/africa/07/28/niger.nomads.email.ap/index.html?section=cnn_tech
Protected Sub Link_Clicked(ByVal sender As Object, ByVal e As System.Windows.Forms.LinkClickedEventArgs) Handles rtbDescription.LinkClicked
Try
Dim proc As New Process()
With proc
.StartInfo.FileName = e.LinkText
.StartInfo.UseShellExecute = True
.Start()
End With
'System.Diagnostics.Process.Start(e.LinkText.ToString)
Catch ex As Exception
Debug.WriteLine(ex.Message & " : " & e.LinkText)
End Try
End Sub
|
|
|
|
|
I have no idea what's going on. That's very same code works perfectly for me. Perhaps this registry key is screwed up? -> HKEY_CLASSES_ROOT\http. You might want to check to see if anything is registered under http\Shell\Open\Command.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
This may seem like a wierd question. I'm trying to prevent unhandled exceptions that originate from an embedded user control, bubble up to the main form which contains the user control and crashing the app. The catch is, I don't want to have to catch the unhandled exception and handle it.
Sorry if I've confused anyone.
Basically I have a main form, which contains a user control that I've written. I was wondering if there was a way from preventing unhandled exceptions that the user control creates, from stepping up a level and crashing the main form (app). All without specifically catching the exception. Basically I'm asking if there is a way to prevent unhandled exceptions from bubbling up to the main form.
Is this possible? Or will I have to catch every possible exception to prevent it from bubbling up a level and crashing the app.
Thanks.
|
|
|
|
|
It is possible, you just handle your exceptions within the user control. Since you don't want to "specifically catch" the exception. You can use a generic try catch or an empty catch (not the best practice). It also depends if you are going to do anything with the exception.
Try<br />
'some code<br />
Catch<br />
'leave empty<br />
End Try
OR
Try
'some code
Catch ex As Exception
'catch all exceptions
'do something like write to an error log file
End Try
You can try this, but I recommend that you should probably do something with the exception. Otherwise your user won't know what is going on
|
|
|
|
|
If I got it correctly there are several ways to accomplish it. Some are stated in the reply before mine.
I think the point is if you have specific code that can generate exceptions or not. In the first case you should jusy but it inside a try/catch/end try structure to "trap" exception and eventually discard them.
Another way should be (I'm not sure about it but it should work):
Public sub Main
Try
MainForm.Showdialog
catch ex as exception
end try
end sub
or a dirty (and old) way is to put ON ERROR RESUME NEXT wherether it may be needed.
My suggestion is work on the control code and not on the application. For several reasons:
1) It'll be ready for each and every application
2) You don't need to remember it/rehandle it everytime
3) You can always trap exception even if you sub-thread it.
4) It's more clean code style.
Hope it helps.
Briga
|
|
|
|
|
Hi
I have a program that loads some activex components. When I run it as an administrator, there is no problem but when I run it in limitted user accounts, the "ActiveX Component Can't Creat Object." error raises.
I tried to search group policy to solve this problem for the limitted user groups, but I couldn't find anything helpful.
Please help me with that...
Is it possible for a program run in a limitted user account, to load activex components?
Thanks in advance
|
|
|
|
|
Hello to all the community I am working on a fairly big App and now i am using Crystal to build loads of reports... And my question is about the optimal way to work when using crystal. Now i am creating 1 datadapter and table in a dataset (on design time) for each Report (excepting the ones who are very similar)
How do you think about this, ppl?
Thanks for reading.
|
|
|
|
|
Hi,
I'm using VB 6 and Access db. I've created my 1st application, created a package and tried to install it on another pc.
During the installation on the target pc, it says:
"Setup cannot continue because some system files are out of date on your system. Click OK if you would like setup to update these files for you now. You will need to restart Windows before you can run steup again. Click Cancel to exit setup without updating system files."
It keeps giving the error eventhough I choose OK and reboot. Weird.
The Bootstrap files no. 3-7 are causing this error :
File1=@Vb6stkit.dll,$(WinSysPathSysFile),,,3/26/99 1:00:00 AM,101888,6.0.84.50
File2=@COMCAT.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,5/31/98 12:00:00 AM,22288,4.71.1460.1
File3=@STDOLE2.TLB,$(WinSysPathSysFile),$(TLBRegister),,1/13/03 2:49:54 PM,16896,2.40.4518.0
File4=@ASYCFILT.DLL,$(WinSysPathSysFile),,,8/31/99 4:55:18 PM,147728,2.40.4277.1
File5=@OLEPRO32.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,1/13/03 2:49:54 PM,229376,5.0.4518.0
File6=@OLEAUT32.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,1/13/03 2:49:54 PM,929792,2.40.4518.0
File7=@MSVBVM60.DLL,$(WinSysPathSysFile),$(DLLSelfRegister),,2/23/04 8:42:40 PM,1386496,6.0.97.82
If I remove 3-7, I get pass the installation, but upon running the program, I get an error, " The data binding DLL, 'VB5DB.DLL' could not be loaded." Probably caused by the removal of the above bootstrap lines.
Any thots will be appreciated on how I can solve the problem.
Gurdip
|
|
|
|
|
hi there , is there a way to subtract 1 column from another column(as in the cells in the columns substract) and passing the result of cell subtraction onto another spread sheet ??
|
|
|
|
|
use the sheet address before the cell address, such as:
(From a multi-sheet XL spreadsheet with the sheets called "Sheet1" and "Sheet2", respectively:
put the numbers 1 and 3 in cells "A1" and "B1", respecively, of "sheet1", in a cell in "sheet2" (or whatver sheet you want the calculated answers to appear in), put the following to do calculations:
=Sheet1!B1-Sheet1!A1
The answer should appear on "sheet2" (or whatever sheet you put the calcs in) in whatever cell you choose to do the formula in, and it should say 2. Simply put the "SheetName" and an exclamation point ("!") before the cell reference, not in quotes, though. Hope this helps!
Richard
|
|
|
|
|
hi
i am using from adodc ond in data link properties
in database name have typed :Application.StartPath & "../vb2/db1.mdb"
vb2 is folder of project and database.
but there is an error :operation cannot be complate and error of provider too
in provider i select :microsoft jet 4.0 ole db provider
please help me
thanks
|
|
|
|
|
Hi All,
I am writing VBScript files. Examples in MSDN about Word Automation Model are in the form
ActiveDocument.Envelope.Insert Address:=strAddr, ReturnAddress:=strReturnAddr, Size:="Size 10"
But if I put them in a vbs file then it pops up an error saying that method Insert is invalid. How do I convert these Address:= and size:= values for a vbscript file to run
Regards
|
|
|
|
|
I know you can do
dim MyFirstArray() as string
dim MySecondArray () as string
MySecondArray = MyFirstArray.Clone
Works no problem.
It does not seem to work with the following
dim MyFirstArray(,) as string
dim MySecondArray (,) as string
MySecondArray = MyFirstArray.Clone
I could do a loop and copy that way but there must be a way in VB.Net
What am I doing wrong or can anyone else have any suggestions on how it is done.
|
|
|
|
|
When I try the following
dim MyFirstArray() as string
dim MySecondArray () as string
MySecondArray = MyFirstArray.Clone
I get this error
"Specified cast is not valid."
Strange enough, if I do it in the command window, it works. Getting confused
|
|
|
|
|
Hai...
I want to do some programming like recording voice from vb or vb.net and save int .wav format. Please give me guide how to do, or give me some links, or give me code which is already available.
Thanks,
E.Veera Raghavendra
e.veera raghavendra
|
|
|
|
|
Hi,
my work hierarchy is as follows.
sqlStr = "select * from voucherTransaction where CompanyCode='" & compCode & _
"' and vtCode='" & mcmbVoucherType.SelectedItem.col1 & "' and
voucherNo=" & txtVoucherNo.Text
parameter.Value = sql // sqlCommand parameter object
davd.SelectCommand = cmd // cmd is sqlCommand and davd is sqlDataAdapter object
davd.Fill(dsvd, "voucherDetail") // dsvd is DataSet
davd.Dispose()
//after populating dataSet i need to delete a specific row . and the deletion
code is
dsvd.Tables("voucherDetail").Rows.RemoveAt(lastRow)//lastrow is secific row no
dsvd.Tables("voucherDetail").AcceptChanges()
//now i need to add new row as
dsvd.Tables("voucherDetail").Rows.Add(drow) // drow is DataRow
//now updating the DataSet as follows
sqlStr = "select * from voucherTransaction where CompanyCode='" & compCode & _
"' and vtCode='" & mcmbVoucherType.SelectedItem.col1 & "' and
voucherNo=" & txtVoucherNo.Text
parameter.Value = sqlStr
davd.SelectCommand = cmd
Dim cbvd As New SqlCommandBuilder(davd)
davd.Update(dsvd.Tables("voucherDetail"))
davd.Dispose()
Now the error is " can't insert the duplicate key value"
I have displayed the DataSet table (voucherDetail),there isn't any duplicate value but its showing error for that specific row because its not deleting from the database.
Please help me immediately if u have some suggestions
|
|
|
|
|
Hello
When executing my script, I get this error. I dont understand what the error is about....
Could anybody explane to me what it means
"The callee (server [not server application]) is not available and disappeared; all connections are invalide. The call did not execute"
Spaz
|
|
|
|
|
Hi friends
I am trying to build a windows application which uses crystal report to generate reports. In this report I am using SQL Statement. What is the procedure to pass parameter at run time. I am using Crystal Report built into Microsoft VS.NET 2003. Please some body help me.
Tutul
|
|
|
|
|
//Create report object like
Dim crobj As New MyReport // Myreport is reportName
//and the pass the values to the parameters as below
crobj.SetParameterValue("startDate", startDate)
crobj.SetParameterValue("endDate", endDate)
CrystalReportViewer1.ReportSource = crobj
CrystalReportViewer1.Show
//if you have stored procedure parameter then place "@" before parametername like
crobj.SetParameterValue("@endDate", endDate)
Its working
hope it'll help
|
|
|
|
|
Why does VB.NET & many other programming languages reserve 2 bytes for the boolean data type although one byte is enough? I was told that 32-bit processors are not capable of directly working with a 1 byte value & would have to transform them into 2-bytes values. Is that true? if so why?
Thanks in advance
|
|
|
|
|
I have been trying to get my listview to show an icon on the right side of the header if that column has been clicked. So far I have had almost no luck. Any links to one would be great. Showing code would be good too. I know I had found one once, but I can not find it again.
Thanks
|
|
|
|