Click here to Skip to main content
15,918,706 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralAddHandler / RemoveHandler Pin
PaleyX11-Jun-04 16:11
PaleyX11-Jun-04 16:11 
GeneralRe: AddHandler / RemoveHandler Pin
Dave Kreskowiak12-Jun-04 1:56
mveDave Kreskowiak12-Jun-04 1:56 
GeneralOffice Addin Listen All event Pin
skoizumi2911011-Jun-04 12:43
sussskoizumi2911011-Jun-04 12:43 
GeneralDeployment Rearranges Controls on Form Pin
Brent Lamborn11-Jun-04 7:37
Brent Lamborn11-Jun-04 7:37 
GeneralVisual Basic homework Pin
KristineB11-Jun-04 6:55
KristineB11-Jun-04 6:55 
GeneralRe: Visual Basic homework Pin
Colin Angus Mackay11-Jun-04 7:41
Colin Angus Mackay11-Jun-04 7:41 
GeneralRe: Visual Basic homework Pin
KristineB11-Jun-04 7:44
KristineB11-Jun-04 7:44 
GeneralRe: Visual Basic homework Pin
Colin Angus Mackay11-Jun-04 8:06
Colin Angus Mackay11-Jun-04 8:06 
The if/then/else part first:

' At some point in the code quantity is defined some how
' For example:
        Dim quantity As Integer
        quantity = 20

' The code will have to work out the discount.
' For example:
        Dim discount As Double
        discount = 0.0
        If quantity >= 10 And quantity <= 19 Then
            discount = 0.2
        ElseIf quantity >= 20 And quantity <= 49 Then
            discount = 0.3
        ElseIf quantity >= 50 And quantity <= 99 Then
            discount = 0.4
        ElseIf quantity >= 100 Then
            discount = 0.5
        End If


Now, as for the multi line message box, you need to make sure the newline is defined properly. For example:
MessageBox.Show("My Multiline" + Environment.NewLine + "message!")


Environment.Newline is will always return the correct newline for the system. (Although I've not used it, I thing that if you were using the Mono framework [the open source version of the Class Runtime Library] on Linux it would just have the linefeed character, whereas on Windows it will have the linefeed and carriage return)

Does this help?


"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar

The Second EuroCPian Event will be in Brussels on the 4th of September

Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!

My Blog


GeneralRe: Visual Basic homework Pin
KristineB11-Jun-04 8:07
KristineB11-Jun-04 8:07 
GeneralRe: Visual Basic homework Pin
KristineB11-Jun-04 9:12
KristineB11-Jun-04 9:12 
GeneralRe: Visual Basic homework Pin
Colin Angus Mackay11-Jun-04 9:47
Colin Angus Mackay11-Jun-04 9:47 
GeneralExcel/VBA - Hard question Pin
Jon G11-Jun-04 1:31
Jon G11-Jun-04 1:31 
GeneralRe: Excel/VBA - Hard question Pin
Dave Kreskowiak14-Jun-04 3:00
mveDave Kreskowiak14-Jun-04 3:00 
GeneralAccess security Pin
Rana Kashif10-Jun-04 20:20
Rana Kashif10-Jun-04 20:20 
GeneralRe: Access security Pin
Dave Kreskowiak11-Jun-04 10:32
mveDave Kreskowiak11-Jun-04 10:32 
QuestionHow to add product key in package and Deployement wizard Pin
Rana Kashif10-Jun-04 20:17
Rana Kashif10-Jun-04 20:17 
AnswerRe: How to add product key in package and Deployement wizard Pin
tramdtt10-Jun-04 20:52
tramdtt10-Jun-04 20:52 
GeneralSQLClient and System.Security.SecurityException Pin
sybux200010-Jun-04 20:16
sybux200010-Jun-04 20:16 
GeneralRe: SQLClient and System.Security.SecurityException Pin
Dave Kreskowiak14-Jun-04 3:08
mveDave Kreskowiak14-Jun-04 3:08 
GeneralRe: SQLClient and System.Security.SecurityException Pin
sybux200010-Aug-04 10:32
sybux200010-Aug-04 10:32 
GeneralRe: SQLClient and System.Security.SecurityException Pin
Dave Kreskowiak10-Aug-04 13:05
mveDave Kreskowiak10-Aug-04 13:05 
GeneralRe: SQLClient and System.Security.SecurityException Pin
sybux200010-Aug-04 20:28
sybux200010-Aug-04 20:28 
GeneralRe: SQLClient and System.Security.SecurityException Pin
Dave Kreskowiak11-Aug-04 1:31
mveDave Kreskowiak11-Aug-04 1:31 
GeneralRe: SQLClient and System.Security.SecurityException Pin
sybux200011-Aug-04 6:26
sybux200011-Aug-04 6:26 
Generalanother problem Datagrid Pin
dotnet_cpp10-Jun-04 12:16
dotnet_cpp10-Jun-04 12:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.