|
Dang... The pain.....
Well, thanks for your help anyways.
|
|
|
|
|
Hi
I am using custom scrollbars HScroll & VScroll in VS2005 .
I am having splitcontainer , in Panel1 of SplitContainer i am using these things instead of autoscroll=true .
I want to set the view of these things like Autscroll features .
i set Hscroll.dock=bottom
Vscroll.dock=right
HScrollBar is occupying the fullbottom of panel1 .
::
==================
In the bottom right of these two control i am not getting the space
=========== ''Blank Space and on the top i have to get VScrollbars
===========
How to get the space for Custom scrollbars ??
|
|
|
|
|
I have been asked to develop an E-doctor using VB.Sincerely i don't know how to go about this thats why am here to seek for help....I am also asked to make a simple game on Flash too......I would appreciate it if you guyz can help me......i have a 2weeks to do this.
Thanks
Am the captain of my destiny......
|
|
|
|
|
ak47angel wrote: I have been asked to develop an E-doctor using VB
Sincerely, we don't know what an e-doctor is!
You have to at least try to write the code yourself. We are not going to write your assignment for you.
First you must have a definition of the problem. Your school did not just say "develop and e-doctor" they will have given you a specification. If you decided you wanted to develop an "e-doctor" then you must define what that is so you know what the scope of the application is.
While we won't write your code for you. We will help and guide you. If you have code you are stuck with, then post the code and tell us what is wrong with it and we'll help you fix it.
If you just get a block of code from somewhere you won't learn anything.
|
|
|
|
|
Colin Angus Mackay wrote: Sincerely, we don't know what an e-doctor is!
Eliza ?
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 really want that someone else is doing your homework, maybe you can take a look at http://www.rentacoder.com[^]
For the rest if you are motivated to do it yourself and you start and you find difficulties, come back to the forum and ask us to get you on track...
|
|
|
|
|
Hi,
I'm getting the following errors in the event log but all my code has the standard try...catch...end try statements and I mean all of it.
EventType clr20r3, P1 satcom discovery socket.exe, P2 1.0.0.0, P3 47d12966, P4 mscorlib, P5 2.0.0.0, P6 471ebc5b, P7 17f2, P8 17, P9 system.invalidoperationexception, P10 NIL.
EventType clr20r3, P1 satcom discovery socket.exe, P2 1.0.0.0, P3 47d12966, P4 satcom discovery socket, P5 1.0.0.0, P6 47d12966, P7 7ee, P8 26d, P9 system.nullreferenceexception, P10 NIL.
I can't find a single function without the error handling. I would like to trap all unhandled errors, how do I do that? The issue is that it is crashing my application.
I found this site - http://www.codeproject.com/KB/dotnet/unhandledexceptions.aspx.
I tried the code but I keep getting this error "Type 'ThreadExceptionHandler' is not defined" but I have Imports System.Threading defined. I have a number of forms, classes and modules in this project.
On another issue, some times my applications do not shut down completely. The GUI disappears but the application stills shows up in task manager. Doesn't END kill the app in VB.NET? I've also used application.exit. I'm sure that all the threads that I start are shut down, in fact one application doesn't have any thread created by myself. This isn't as serious as the first issue as the first is shutting down the application and I'm loosing data over it.
Appreicate any help on this!
Thanks,
Jim
Regards,
jim
|
|
|
|
|
Go to your project's properties and on the Application tab there is a button labeled "View Application Events"...click it and it will open ApplicationEvents.vb. Here you can create a MyApplication_UnhandeledException method that will capture all the unhandled exceptions in your app. You need to add some kind of code to display the error, or else when you hit an exception the app will close without any notification, because you are going to be handling the exceptions yourself now. I would encourage you to include a way to get the exception's message, exception, and stack trace to help you debug your issues. You could even include information like the applications current version, which forms the user had open when the application errored, the user's OS, and publish information if you use clickonce deployment. Personally I like to prompt the user with a messagebox that asks if they want to copy detailed exception info to the clipboard, and if they say yes copy it for them.
As to your second issue, go back to the project's properties and the application tab. There is a drop down to select the Shutdown mode. You can select "When startup form closes" or "When last form closes"... If you choose "When last form closes." you need to be sure that all of your forms are actually closed...not just hidden. This is not always obvious if you aren't using global variables to create instances of your forms. Personally, I like to use the "When startup form closes" mode, and then always have that form open (although usually hidden) until I am sure the user want to exit the app.
Hope this helps.
|
|
|
|
|
Hi All
How to get date input from user? For eg. date may be 12 no need of month and year
Thank you in Advance
Bye
|
|
|
|
|
Hello,
You can try using the InputBox to get the date value from the user and then
convert it to a DateTime object. You can try the code snippet given below.
However, you would have to put some validation to check whether the required
date is valid for the month.
<br />
Dim d As Integer<br />
Dim mydate As DateTime<br />
d = InputBox("Enter the date:", "Date")<br />
mydate = d & "/" & Now.Month & "/" & Now.Year<br />
MsgBox(mydate)<br />
I hope this helps.
Regards,
Allen
Allen Smith
Software Engineer
ComponentOne LLC
www.componentone.com
|
|
|
|
|
There is no text box it is not for visual project. It is for a project to play a audio file when user presses a particular value might be two digits considered as his date in date of birth
|
|
|
|
|
Try here[^]
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 )
|
|
|
|
|
searched google did not find the solution. Please Help!
|
|
|
|
|
This code has been giving me some trouble for a while now.
When the Sub is called, the Boolean showFiles is initially passed as False.
However, the first time the Sub is called recursively, showFiles is changed to True.
<code>
Sub DisplayDirTree(ByVal dir As String, ByVal showFiles As Boolean, Optional ByVal level As Integer = 0)
' DisplayDirTree runs through the directory and lists each folder and file in order with indentation.
' showFiles is boolean and allows the caller to show folders & files, or just the folders.
' level is an optional parameter and is used only to set the begining indent.
' TODO: This is a recursive call, fix it.
'Create a string, set it as a Short Date so we just get mm/dd/yyyy
'Since it is a String and not a date, we must run .ToString
'Then we use .Replace("/", "_") so we get mm_dd_yyyy which is a valid windows filename
Dim dt As String = Date.Today.ToShortDateString.ToString.Replace("/", "_")
Dim newFilename As String = "c:\Backup\Logs\" + dt + ".txt"
Dim st1 As Stream = File.Open(newFilename, FileMode.Append, FileAccess.Write, FileShare.ReadWrite)
Dim sw1 As New StreamWriter(st1)
sw1.WriteLine(New String("-"c, level * 2) & dir)
Try
If showFiles Then
For Each fname As String In Directory.GetFiles(dir)
sw1.WriteLine(New String(" "c, level * 2 + 2) & fname)
Next
End If
For Each subdir As String In Directory.GetDirectories(dir)
DisplayDirTree(subdir, showFiles, level + 1)
Next
Catch ex As Exception
Console.WriteLine(ex.Message)
sw1.WriteLine((ex.Message) & (ControlChars.CrLf))
End Try
sw1.Close()
End Sub
</code>
I am rewriting all the code in this program, but that one boolean has me stuck.
The calling code is DisplayDirTree(rootDir, False)
The only thing I can think of is that when passing showFiles, it for some reason defaults to True.
Is this natural behaviour, or am I missing something?
|
|
|
|
|
I don't see the problem where the showFiles boolean should be true at start or where it can be changing.
What you can do (not totally sure, but at least you can try)
change
Sub DisplayDirTree(ByVal dir As String, ByVal showFiles As Boolean, Optional ByVal level As Integer = 0)
to
Private Sub DisplayDirTree(ByVal dir As String, Optional ByVal showFiles As Boolean = False, Optional ByVal level As Integer = 0)
So, make it private, and make the showFiles Optional to False.
Let us know what it does.
another thing you can do is set a break on the beginning of the sub and Watch the variable showFiles, is it set the way you want it, and while you step through your code, does it got changed?
|
|
|
|
|
Hello,
As the title suggests, I've got a problem with a disappearing horizontal scrollbar on a ListBox where I'm using the DrawItem event. DrawItem is set to OwnerDrawFixed. I'm using VB.NET 2008 Express.
I think I know WHY I'm not seeing the scrollbar, but I can't figure out how to fix it. I may have to use a DataGridView, but I'd prefer to understand the solution to the ListBox problem.
What I think is happening is this line is filling my rectangle with my brush to the boundary of the rectangle:
e.Graphics.FillRectangle(myBrush, e.Bounds)
The line is filling the rectangle with my data:
e.Graphics.DrawString(Me.lstReportContent.Items(e.Index), e.Font, myBrush, New RectangleF(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height))
I've seen that I can reduce e.Bounds.Width, and each line is cut short. Naturally, I'd have thought that if I increase e.Bounds.Width, the item line would be longer than the visible rectangle width.
|
|
|
|
|
Have you solved this?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hi,
How can i give the end-users the possibility to freely drag and drop windows to re-arrange to their preferred layout at run time?
Making forms and other controls dockable and floating.
Any examples are really appreciated.
Thanks in advance!
modified on Thursday, March 13, 2008 6:43 AM
|
|
|
|
|
Hi all,
I have written a code where in VB.NET that iterates a data table. If a certain condition is met in the inner loop, the inner loop must break and the control must be transfered back to the outer loop. I tried the following...
For l As Integer = 0 To deleteditems.Count - 1<br />
Dim selectedrow As String = deleteditems.Item(l).ToString<br />
For j As Integer = 0 To tableinstance.Rows.Count - 1<br />
If tableinstance.Rows(j).Item(0).ToString() = selectedrow Then<br />
tableinstance.Rows(j).Delete()<br />
Exit For<br />
End If<br />
Next<br />
Next
The problem is that the "exit for" not only exits the inner loop , but also the outer loop... any help would be appreciated...
When you fail to plan, you are planning to fail.
|
|
|
|
|
please neglect....I was my mistake since deleteditems.Count was =1
When you fail to plan, you are planning to fail.
|
|
|
|
|
Dear,
I am trying to give you some sample. If you take one FOR and While loop it works fine.
You can test this sample.
Dim a(,) As Integer = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}
Dim s As String = ""
For i As Integer = 0 To a.GetUpperBound(0)
Dim j As Integer = 0
While j <= a.GetUpperBound(1)
If a(i, j) = 2 Then
Exit While
End If
s &= a(i, j) & " "
j += 1
End While
s &= vbCrLf
Next
MsgBox(s)
If it solves the problem, then confirm. We can't do anything if we use same types of loops.
Thanks and Regards,
Ashok
|
|
|
|
|
AKPatra wrote: We can't do anything if we use same types of loops.
Are you sure?? Have you checked it?
|
|
|
|
|
I have checked it with For loop using Exit For with it. But I have not checked for everything. Can you provide me any examples regading this
|
|
|
|
|
AKPatra wrote: I have checked it with For loop using Exit For with it. But I have not checked for everything. Can you provide me any examples regading this
Just put in another For loop within the first and check it out...
|
|
|
|
|
You are right. Actually I was giving incorrect conditions with the Loop.
|
|
|
|
|