Click here to Skip to main content
15,890,282 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: how to add a combobox to a datagrid column Pin
abhinish1-Dec-05 20:39
abhinish1-Dec-05 20:39 
Question[Message Deleted] Pin
Roy_Joseph1-Dec-05 18:26
Roy_Joseph1-Dec-05 18:26 
AnswerRe: ms-sql server database-bkp & restore Using VB6 Pin
abhinish2-Dec-05 19:56
abhinish2-Dec-05 19:56 
GeneralRe: ms-sql server database-bkp & restore Using VB6 Pin
Roy_Joseph5-Dec-05 19:55
Roy_Joseph5-Dec-05 19:55 
QuestionVB.Net Controls: Default-Value of a Property Pin
vocaris1-Dec-05 13:44
vocaris1-Dec-05 13:44 
AnswerRe: VB.Net Controls: Default-Value of a Property Pin
Christian Graus1-Dec-05 14:11
protectorChristian Graus1-Dec-05 14:11 
GeneralRe: VB.Net Controls: Default-Value of a Property Pin
vocaris2-Dec-05 2:23
vocaris2-Dec-05 2:23 
AnswerRe: VB.Net Controls: Default-Value of a Property Pin
[Marc]2-Dec-05 4:01
[Marc]2-Dec-05 4:01 
DefaultValue attribute only works for simple values. For complicated stuff (like that the default value depends on other properties), you can use ShouldSerialize[PropertyName] & Reset[PropertyName]. Example:
Private _someFont As New Font("verdana", 12.0!)
Public Property SomeFont As Font
  Get
    Return _someFont
  End Get
  Set(Value As Font)
    If Not Font.Equals(_someFont, Value) Then
      _someFont = Value
    End If
  End Set
End Property

Public Function ShouldSerializeSomeFont As Boolean
  Static default As New Font("verdana", 12.0!)
  If Font.Equals(SomeFont, default)
    Return False
  Else : Return True
  End If
End Function
Public Sub ResetSomeFont
  If Not SomeFont Is Nothing Then
    SomeFont.Dispose()
  End If
  SomeFont = New Font("verdana", 12.0!)
End Sub
HTH Wink | ;)


Pompiedompiedom... Wink | ;)
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick

GeneralRe: VB.Net Controls: Default-Value of a Property Pin
vocaris2-Dec-05 5:02
vocaris2-Dec-05 5:02 
QuestionPublic Integers........ Pin
daviiie1-Dec-05 13:42
daviiie1-Dec-05 13:42 
AnswerRe: Public Integers........ Pin
Christian Graus1-Dec-05 14:13
protectorChristian Graus1-Dec-05 14:13 
AnswerRe: Public Integers........ Pin
tusar1231-Dec-05 18:11
tusar1231-Dec-05 18:11 
Questionserver socket instance blocking Pin
mpage1-Dec-05 12:06
mpage1-Dec-05 12:06 
QuestionGraphics flickering in VB6 Pin
Hoopla!1-Dec-05 11:56
Hoopla!1-Dec-05 11:56 
AnswerRe: Graphics flickering in VB6 Pin
Christian Graus1-Dec-05 12:14
protectorChristian Graus1-Dec-05 12:14 
GeneralRe: Graphics flickering in VB6 Pin
Hoopla!1-Dec-05 14:28
Hoopla!1-Dec-05 14:28 
GeneralRe: Graphics flickering in VB6 Pin
Christian Graus1-Dec-05 14:34
protectorChristian Graus1-Dec-05 14:34 
AnswerRe: Graphics flickering in VB6 Pin
Joshua Quick1-Dec-05 12:18
Joshua Quick1-Dec-05 12:18 
AnswerRe: Graphics flickering in VB6 Pin
Joshua Quick1-Dec-05 13:11
Joshua Quick1-Dec-05 13:11 
GeneralRe: Graphics flickering in VB6 Pin
Hoopla!1-Dec-05 14:42
Hoopla!1-Dec-05 14:42 
Questionconverting a varchar datatype to a bit data type using VBScript Pin
abhishk2001@yahoo.com1-Dec-05 10:32
abhishk2001@yahoo.com1-Dec-05 10:32 
AnswerRe: converting a varchar datatype to a bit data type using VBScript Pin
KaptinKrunch1-Dec-05 18:47
KaptinKrunch1-Dec-05 18:47 
QuestionHelp for efficiently populating a listview Pin
eatwork1-Dec-05 9:17
eatwork1-Dec-05 9:17 
AnswerRe: Help for efficiently populating a listview Pin
jan larsen1-Dec-05 9:48
jan larsen1-Dec-05 9:48 
GeneralRe: Help for efficiently populating a listview Pin
eatwork2-Dec-05 6:34
eatwork2-Dec-05 6:34 

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.