Click here to Skip to main content
15,887,350 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionCreate a unique Id for each row of table Pin
Seema Bawa1-Feb-12 8:19
Seema Bawa1-Feb-12 8:19 
AnswerRe: Create a unique Id for each row of table Pin
Simon_Whale1-Feb-12 12:16
Simon_Whale1-Feb-12 12:16 
JokeRe: Create a unique Id for each row of table Pin
Eddy Vluggen1-Feb-12 12:30
professionalEddy Vluggen1-Feb-12 12:30 
GeneralRe: Create a unique Id for each row of table Pin
Simon_Whale1-Feb-12 21:58
Simon_Whale1-Feb-12 21:58 
AnswerRe: Create a unique Id for each row of table Pin
RobCroll1-Feb-12 16:14
RobCroll1-Feb-12 16:14 
QuestionCreate a unique Id for Rows Pin
Seema Bawa1-Feb-12 7:58
Seema Bawa1-Feb-12 7:58 
AnswerRe: Create a unique Id for Rows Pin
Eddy Vluggen1-Feb-12 8:16
professionalEddy Vluggen1-Feb-12 8:16 
QuestionOptional parameters cannot have structure types Pin
Clark Kent1231-Feb-12 5:53
professionalClark Kent1231-Feb-12 5:53 
That is according to MSDN[^]

I don't understand is... why? I am sure the answer is probably very simple, but for some reason my mind can't come up with the answer. Maybe it's cuz I am so frustrated with this error. Well, who knows.

What do I want to achieve?

Suppose the following...
VB
Public Sub ChangeThePictureBoxBC(Optional newColor as System.Drawing.Color = Drawing.Color.Black)

Me.SomePictureBox.BackColor = newColor

End Sub


This does not seem wrong to me. Can someone please explain A) why the above sub is wrong without re-quoting the unhelpful MSDN document and B) what suggestion/advice can you give me to make an optional parameter that involves color.

Thanks in advance.
AnswerRe: Optional parameters cannot have structure types Pin
Eddy Vluggen1-Feb-12 6:34
professionalEddy Vluggen1-Feb-12 6:34 
GeneralRe: Optional parameters cannot have structure types Pin
Clark Kent1231-Feb-12 7:16
professionalClark Kent1231-Feb-12 7:16 
GeneralRe: Optional parameters cannot have structure types Pin
Eddy Vluggen1-Feb-12 7:41
professionalEddy Vluggen1-Feb-12 7:41 
QuestionFrom Variant/double() to Double() Pin
PozzaVecia31-Jan-12 11:54
PozzaVecia31-Jan-12 11:54 
AnswerRe: From Variant/double() to Double() Pin
Eddy Vluggen1-Feb-12 9:47
professionalEddy Vluggen1-Feb-12 9:47 
GeneralRe: From Variant/double() to Double() Pin
PozzaVecia1-Feb-12 10:28
PozzaVecia1-Feb-12 10:28 
AnswerRe: From Variant/double() to Double() Pin
Wes Aday1-Feb-12 10:07
professionalWes Aday1-Feb-12 10:07 
GeneralRe: From Variant/double() to Double() Pin
PozzaVecia1-Feb-12 10:30
PozzaVecia1-Feb-12 10:30 
QuestionConvert MS Word doc to PDF Pin
ivo7531-Jan-12 5:58
ivo7531-Jan-12 5:58 
AnswerRe: Convert MS Word doc to PDF Pin
thatraja31-Jan-12 6:40
professionalthatraja31-Jan-12 6:40 
AnswerRe: Convert MS Word doc to PDF Pin
Abhinav S31-Jan-12 6:41
Abhinav S31-Jan-12 6:41 
QuestionHow can I avoid multi-threading? Pin
Rick McLeod30-Jan-12 19:44
Rick McLeod30-Jan-12 19:44 
AnswerRe: How can I avoid multi-threading? Pin
Simon_Whale31-Jan-12 1:18
Simon_Whale31-Jan-12 1:18 
GeneralRe: How can I avoid multi-threading? Pin
Rick McLeod31-Jan-12 5:34
Rick McLeod31-Jan-12 5:34 
AnswerRe: How can I avoid multi-threading? Pin
Luc Pattyn31-Jan-12 1:58
sitebuilderLuc Pattyn31-Jan-12 1:58 
AnswerRe: How can I avoid multi-threading? Pin
Dave Kreskowiak31-Jan-12 2:13
mveDave Kreskowiak31-Jan-12 2:13 
AnswerRe: How can I avoid multi-threading? Pin
Bernhard Hiller31-Jan-12 20:55
Bernhard Hiller31-Jan-12 20:55 

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.