|
Do u mean DBNULL.Value or dim x as object= Nothing;
Both r able to been used.
|
|
|
|
|
I URGENTLY need to be able to pass a network file path through to a function and obtain the PIDL. Can someone please let me know how I can do this.
|
|
|
|
|
Hi,
I'm writing an application in VB.net that takes a string & a number from the user & prints a receipt using the System.Drawing.Printing class. Is there anyway to detect the "out-of-paper" case , as i need to take corrective actions in such case. I checked out all the properties & settings of PrintDocument & PageSettings classes but found nothing.
any hints are really appreciated.
thanx
|
|
|
|
|
http://support.microsoft.com/default.aspx?scid=kb;en-us;821769
|
|
|
|
|
Thanx alot.. i think the article will help
|
|
|
|
|
i have build a custom datagrid using the datagrid. How can i add AutoFormat in my control just like datagrid has. another problem is that i am fetching data in the load event of the control, so when i fetch the data it works well the first time but when i reopn the same project it shows all the data at the design time. how can i avoid this.
|
|
|
|
|
Hi all, i use Vs 2005 beta, there is no DataGrid Object so i use DataGridView Object. But DataGridView object doesnt support DataGridTableStyles. When i used VS. 2003 , i created a class named "DataGridExtendedColumn" supplying numeric, commaseperated numbers also functional keys. But i couldnt use that with DataGridView object.
i create a table named "ExportDetails" at run time then i set it to DataGridView's DataSource. At design Time, i created columns on DataGridView then i set each column's DataPropertyName to associate column at table "ExportDetails" .
What can do for supplying to users a field which they can numeric numbers or comma separated numbers.
NOT:SURE I am aware of DataGridView object has no property as DataGridTableStyle despite of VS 2005 has DataGridTableStyles object.
|
|
|
|
|
Hi,
Ive not yet had the time to try out the new DataGridView but the DataGrid is still provided in the new framework version. It just isnt placed in the toolbox of VS.Net 2005 by default. Just right click into your toolbox. There is a menu entry where you can add/remove items. It will show you a big list where you just have to find the DataGrid .
|
|
|
|
|
Hi,
I am using the shell command in vb.net to run a dos program. After the program is finished it outputs to the screen some results. Is there anyway to read this back into a Rich text box.
Thanks
|
|
|
|
|
Hi;
There is a way but it is not direct. The Shell command in VB.Net only returns the process ID only if the DOS program is still running at the time your program executes the next statement and nothing else. Your DOS program outputs to the standard output, the screen. What you can do is create a bat file with one statement in it, "Your DOS executable with path > Some temp file with file path" without the double quotes, for example, c:\windows\system32\ipconfig > c:\temp\configresults.txt, save the file let say c:\temp\testip.bat. The > in the command is the dos redirect, which creates the file if it does not exist or over writes if it does. Replace the > with >> to append to the file. Once you program runs Shell the file c:\temp\testip.bat. Then the data is in the file just read it into your program and into your Rich text box.
Sample code
Dim readResults As String
Shell("c:\Temp\TestIp.bat", AppWinStyle.NormalFocus, True, -1)
Dim reader As StreamReader = New StreamReader("c:\Temp\configresults.txt")
Do
readResults = reader.ReadLine
RichTextBox1.Text &= readResults & Environment.NewLine
Loop Until reader.Peek = -1
I could not figure out how to add the redirect command into the Shell for it to work properly. If you can then you would not have to create a bat file, one step less.
I hope this was of some help.
-Fernando Soto
|
|
|
|
|
Hi;
There is a better way to redirect the output of a DOS program which I cam across in my readings. And that is using the Process object. Here is what I did to test it.
Imports System.ComponentModel
Private ERROR_FILE_NOT_FOUND As Integer = 2
Private ERROR_ACCESS_DENIED As Integer = 5
Dim myProcess As Process = New Process
Try
Dim prgOutput As String ‘ Output from DOS program
Dim strSplit() As String = Nothing
Dim delimStr As String = Chr(13) & Chr(10)
Dim delimiter() As Char = delimStr.ToCharArray()
myProcess.StartInfo.FileName = tbPath.Text ‘Full pathname to including file name
myProcess.StartInfo.Arguments = tbOptions.Text ‘ If the program takes args as string
myProcess.StartInfo.CreateNoWindow = True ‘ Does not create a window DOS program
myProcess.StartInfo.UseShellExecute = False ‘ Must be false to redirect output
myProcess.StartInfo.RedirectStandardOutput = True
myProcess.Start() ‘ Start the DOS program
myProcess.WaitForExit() ‘ Wait until it completes before moving on
prgOutput = myProcess.StandardOutput.ReadToEnd ‘ Get the DOS output
prgOutput = prgOutput.Replace(delimiter, "|")
strSplit = prgOutput.Split("|"c)
For i As Integer = 0 To (strSplit.Length - 1)
lbOutput.Items.Add(strSplit(i))
Next
Catch ex As Win32Exception
If ex.NativeErrorCode = ERROR_FILE_NOT_FOUND Then
Console.WriteLine((ex.Message + ". Check the path."))
Else
If ex.NativeErrorCode = ERROR_ACCESS_DENIED Then
' Note that if your word processor might generate exceptions
' such as this, which are handled first.
Console.WriteLine((ex.Message + ". You do not have permission to print this file."))
End If
End If
End Try
|
|
|
|
|
Visual studio no longer breaks inte the debugger when an unhandled exception is thrown.
I've been using Visual Studio 2003 for a while now and everything have been working fint until recently. I probably have changed som settings that I now can't find.
I can trap the error by wrapping the line with Try, Catch or setting the Setting: Debug/Exceptions/CLR Exceptions to break into the debugger when the exception is thrown, but don't give me the same error message.
What do I have to do to make it work as it should again? This is making me crazy. The application just keeps going when it encounters an exception.
/Johan Trenkle
|
|
|
|
|
In the Menu goto Debugging - Exceptions
In the Exceptions Dlg expand Common Language Runtime Exceptions and check the System Entry
Stefan
|
|
|
|
|
I've gone through all settings in the CLR Exceptions and set them to Use Parent setting.
The top node (CLR Exceptions) is set to
When the exception is thrown: continue
If the exception is not handled: Break into the debugger
And that last thing is what I expect it to do, but it don't. It just jumps out of all functions it has entered and keeps on running without telling me anything.
Any ideas?
/JT
|
|
|
|
|
It sounds like your problem is that you've set the options to When Exception is Thrown: Continue. And that is exactly what it is doing. You've only set it to break into the debugger for unhandled exceptions. Your previous post indicated that you were including a handler. Try setting it to:
When the exception is thrown: Break into the debugger
Robert
|
|
|
|
|
How can i run a project from network. I have configured the security permission by giving the local intranet fulltrust in the machine node in the runtime security policy node. But it still is not working. It's urgent.
|
|
|
|
|
hi hello... can anyone help me how to use the AT Command??? i already opened port and im wondering how to send an at command... at command for sms messaging...?
|
|
|
|
|
Hello all,
I have one problem with combobox.the combobox is filled from datatable
displaymeber = empName
ValueMember =empId this is a lookup table
I have got record from another table and filled to dataview and i have not bind with controls,just i have give that directly like this
me.combobox.SelctedValue = me.Dataview.item(0).item(2)
when i have not any data(means nothing) in me.Dataview.item(0).item(2) ,it displays empty in combo text area,then the user edits the combobox,means change the selected text and he doesn't want to save the data,if he clicks i reload from dataview(refresh the old data).so it should be come epty in text area.but first time it displays first empname(means selectedindex goes to 0).then i click agai it will show empty record.how can i rectofy this
|
|
|
|
|
<br />
if me.dataview.item(0).item(1) is nothing then<br />
me.combobox.selectedvalue=nothing<br />
me.combobox.selectedText=nothing<br />
me.combobox.selectedIndex=-1<br />
<br />
me.combobox.text=nothing<br />
else<br />
me.combobox.selectedvalue=me.dataview.item(0).item(1)<br />
end if<br />
<br />
<br />
<br />
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscomboboxobjectcollectionclasscleartopic.asp
|
|
|
|
|
hello
That is clear for all itms in combobox or listbox that site contents,i asked clear combobox text only
|
|
|
|
|
Hi,
Im populating a datagrid using threads which works fine.
Sometimes, though the datagrid gets distorted with double scrollbars. When I click on the scrollbar or maximise the window(to repaint it), I get any or both of the following:
exceptions
Two exceptions:
1. System.Runtime.InteropServices.SEHException' occurred in system.windows.forms.dll
Additional information: External component has thrown an exception.
2.An unhandled exception of type 'System.NullReferenceException' occurred in Unknown Module.
Additional information: Object reference not set to an instance of an object.
Note: I have already used the form.beginInvokeMethod which allows a datagrid to be populated using threads.This works fine. So plz give some other solution.
Any solutions?
|
|
|
|
|
Well, it looks like you've already done the obvious stuff. So, without seeing your code, it's impossible to tell what's going wrong and why.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
Oracle Ver. 8.1.7
Client : ODP.Net ver 9.2.4
App. using VB.net
I have an application for our sales people, where our sales people prepare Client Visit Reports in MS Word (.Doc). At present they are entering the visit details into my application, now they want this report prepared in Word document also to be stored into the database and will be removed from their local drives. Anybody shld access the Report doc only thru this application.
I need to achieve the following :
1. User shld be able to upload a word file to the DB from a mapped drive.
2. Once loaded user shld be able to open the word file stored in the DB, thru the application and edit it and save it again.
Can we achieve this. I know we can do it using BLOG but not sure how to do this. Can someone pls show an example.
TIA
Harry.
|
|
|
|
|
Anyone had a problem with Crystal Reports error "Cannot find KeyCodeV2.dll" when running an app that has been installed using the windows installer, on a machine different to the development machine? This VB.NET app runs fine on the development machine.
Seems that Crystal Reports is less than ideal with dotnet. Are there any better alternatives?
|
|
|
|