Hallo hallo, wie o wie kan mij uit de brand helpen, ik ben bezig met een cursus VB.Net uit een boek aan het volgen. Ik moet een programmatje maken, ik heb de code helemaal uit het boek overgenomen, maar ik krijg de fout meldingen niet te zien zeg maar.
Zie hieronder :
Het gaat zeg maar fout bij de MsgBoxen, ik krijg de box wel, maar niet de tekst die dan in de knoppen moet staan bijvoorbeeld de mogelijkheid om op ja of nee te drukken dan zie ik niet ja of nee staan in de knoppen etc. zie hier het probleem:
Ik heb ook al een nieuwe installatie gedaan win xp pro + sp2 maar dat helpt ook niet, terwijl bij iemand anders met win xp pro + sp2 het wel werkt???
Ik hoop zo dat iemand mij kan helpen!!!
Zie hieronder :
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
| Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents lblPalet As System.Windows.Forms.Label
Friend WithEvents hscRood As System.Windows.Forms.HScrollBar
Friend WithEvents hscGroen As System.Windows.Forms.HScrollBar
Friend WithEvents hscBlauw As System.Windows.Forms.HScrollBar
Friend WithEvents lblRood As System.Windows.Forms.Label
Friend WithEvents lblGroen As System.Windows.Forms.Label
Friend WithEvents lblBlauw As System.Windows.Forms.Label
Friend WithEvents mnuKleurenMixer As System.Windows.Forms.MainMenu
Friend WithEvents mnuExit As System.Windows.Forms.MenuItem
Friend WithEvents mnuCopy As System.Windows.Forms.MenuItem
Friend WithEvents mnuHelp As System.Windows.Forms.MenuItem
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.lblPalet = New System.Windows.Forms.Label
Me.hscRood = New System.Windows.Forms.HScrollBar
Me.hscGroen = New System.Windows.Forms.HScrollBar
Me.hscBlauw = New System.Windows.Forms.HScrollBar
Me.lblRood = New System.Windows.Forms.Label
Me.lblGroen = New System.Windows.Forms.Label
Me.lblBlauw = New System.Windows.Forms.Label
Me.mnuKleurenMixer = New System.Windows.Forms.MainMenu
Me.mnuExit = New System.Windows.Forms.MenuItem
Me.mnuCopy = New System.Windows.Forms.MenuItem
Me.mnuHelp = New System.Windows.Forms.MenuItem
Me.SuspendLayout()
'
'lblPalet
'
Me.lblPalet.Location = New System.Drawing.Point(8, 8)
Me.lblPalet.Name = "lblPalet"
Me.lblPalet.Size = New System.Drawing.Size(328, 56)
Me.lblPalet.TabIndex = 0
'
'hscRood
'
Me.hscRood.Location = New System.Drawing.Point(16, 96)
Me.hscRood.Name = "hscRood"
Me.hscRood.Size = New System.Drawing.Size(136, 16)
Me.hscRood.TabIndex = 1
'
'hscGroen
'
Me.hscGroen.Location = New System.Drawing.Point(16, 136)
Me.hscGroen.Name = "hscGroen"
Me.hscGroen.Size = New System.Drawing.Size(136, 16)
Me.hscGroen.TabIndex = 2
'
'hscBlauw
'
Me.hscBlauw.Location = New System.Drawing.Point(16, 176)
Me.hscBlauw.Name = "hscBlauw"
Me.hscBlauw.Size = New System.Drawing.Size(136, 16)
Me.hscBlauw.TabIndex = 3
'
'lblRood
'
Me.lblRood.BackColor = System.Drawing.SystemColors.Desktop
Me.lblRood.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblRood.ForeColor = System.Drawing.Color.White
Me.lblRood.Location = New System.Drawing.Point(160, 96)
Me.lblRood.Name = "lblRood"
Me.lblRood.Size = New System.Drawing.Size(80, 16)
Me.lblRood.TabIndex = 4
Me.lblRood.Text = "Rood"
'
'lblGroen
'
Me.lblGroen.BackColor = System.Drawing.SystemColors.Desktop
Me.lblGroen.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblGroen.ForeColor = System.Drawing.Color.White
Me.lblGroen.Location = New System.Drawing.Point(160, 136)
Me.lblGroen.Name = "lblGroen"
Me.lblGroen.Size = New System.Drawing.Size(80, 16)
Me.lblGroen.TabIndex = 5
Me.lblGroen.Text = "ForestGreen"
'
'lblBlauw
'
Me.lblBlauw.BackColor = System.Drawing.SystemColors.Desktop
Me.lblBlauw.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblBlauw.ForeColor = System.Drawing.Color.White
Me.lblBlauw.Location = New System.Drawing.Point(160, 176)
Me.lblBlauw.Name = "lblBlauw"
Me.lblBlauw.Size = New System.Drawing.Size(80, 16)
Me.lblBlauw.TabIndex = 6
Me.lblBlauw.Text = "DeepSkyBlue"
'
'mnuKleurenMixer
'
Me.mnuKleurenMixer.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuExit, Me.mnuCopy, Me.mnuHelp})
'
'mnuExit
'
Me.mnuExit.Index = 0
Me.mnuExit.Text = "&Exit"
'
'mnuCopy
'
Me.mnuCopy.Index = 1
Me.mnuCopy.Text = "&Copy"
'
'mnuHelp
'
Me.mnuHelp.Index = 2
Me.mnuHelp.Text = "&?"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(384, 213)
Me.Controls.Add(Me.lblBlauw)
Me.Controls.Add(Me.lblGroen)
Me.Controls.Add(Me.lblRood)
Me.Controls.Add(Me.hscBlauw)
Me.Controls.Add(Me.hscGroen)
Me.Controls.Add(Me.hscRood)
Me.Controls.Add(Me.lblPalet)
Me.Menu = Me.mnuKleurenMixer
Me.Name = "Form1"
Me.Text = "Van Gogh jr."
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuExit.Click
Me.Close()
End Sub
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuCopy.Click
'Declaraties
Dim strInfo As String
Dim intIconEnKnop As Integer
Dim strTitel As String
'Staat er iets op het Klembord?
intIconEnKnop = MsgBoxStyle.Critical Or MsgBoxStyle.OKCancel
strTitel = "Pas op!"
'Test het dataformat
If System.Windows.Forms.Clipboard.GetDataObject.GetDataPresent _
(System.Windows.Forms.DataFormats.Bitmap) Then
strInfo = "een bitmap"
ElseIf System.Windows.Forms.Clipboard.GetDataObject.GetDataPresent _
(System.Windows.Forms.DataFormats.FileDrop) Then
strInfo = "eem bestandslijst"
ElseIf System.Windows.Forms.Clipboard.GetDataObject.GetDataPresent _
(System.Windows.Forms.DataFormats.Rtf) Then
strInfo = "tekst met opmaak"
ElseIf System.Windows.Forms.Clipboard.GetDataObject.GetDataPresent _
(System.Windows.Forms.DataFormats.Text) Then
strInfo = "tekst"
Else
strInfo = ""
End If
'Zo nodig boodschap geven en beslissing vragen
If strInfo <> "" Then
If MsgBox("Er staat " & strInfo & " op het klembord" _
& vbCrLf & "Vervangen?", intIconEnKnop, strTitel) _
= MsgBoxResult.Cancel Then
Exit Sub
End If
End If
Clipboard.SetDataObject("ColorTranslator.From01e(RGB(" _
& CStr(hscRood.Value) & _
"," & CStr(hscGroen.Value) & "," & _
CStr(hscBlauw.Value) & "))")
End Sub
Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuHelp.Click
MsgBox("Meng de gewenste kleur, klik op Copy en" & vbCrLf & _
"ga naar het Visual Basic programma. " & vbCrLf & _
"Klik op de juiste plek in de programmacode en" & vbCrLf & _
"kies in het menu Edit, Paste.", MsgBoxStyle.OKOnly _
Or MsgBoxStyle.Information, "Kleurenmixer")
End Sub
End Class |
Het gaat zeg maar fout bij de MsgBoxen, ik krijg de box wel, maar niet de tekst die dan in de knoppen moet staan bijvoorbeeld de mogelijkheid om op ja of nee te drukken dan zie ik niet ja of nee staan in de knoppen etc. zie hier het probleem:

Ik heb ook al een nieuwe installatie gedaan win xp pro + sp2 maar dat helpt ook niet, terwijl bij iemand anders met win xp pro + sp2 het wel werkt???
Ik hoop zo dat iemand mij kan helpen!!!
[ Voor 17% gewijzigd door Verwijderd op 28-12-2004 22:04 ]