Click here to Skip to main content
15,898,035 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Console Application: read xml from unc-path with passed credentials Pin
Eddy Vluggen13-Jun-15 11:42
professionalEddy Vluggen13-Jun-15 11:42 
QuestionGreat Confusing Problem with VB.NET Pin
Robot Sun10-Jun-15 23:22
Robot Sun10-Jun-15 23:22 
AnswerRe: Great Confusing Problem with VB.NET Pin
Richard MacCutchan11-Jun-15 1:06
mveRichard MacCutchan11-Jun-15 1:06 
AnswerMessage Closed Pin
15-Jun-15 12:32
professionalSimewu15-Jun-15 12:32 
GeneralRe: Great Confusing Problem with VB.NET Pin
Robot Sun17-Jul-15 23:26
Robot Sun17-Jul-15 23:26 
QuestionIf internet connection is present , get the real date and time Pin
satc10-Jun-15 17:38
satc10-Jun-15 17:38 
AnswerRe: If internet connection is present , get the real date and time Pin
Richard MacCutchan10-Jun-15 21:36
mveRichard MacCutchan10-Jun-15 21:36 
Questionvb.net 2010 default value for shared variable Pin
classy_dog10-Jun-15 8:47
classy_dog10-Jun-15 8:47 
In a VB.net 2010 desktop application, reports obtain their values to execute by users selecting values from the various vb.net controls. In 2 columns where there are date pickers, the default value of the date pickers is to use today's date.

The application passes values from the controls using the following code:

Private Sub dtEnddate_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dtEnddate.ValueChanged

Variables.g_strEndDate = dtEnddate.Text

End Sub

Private Sub dtEnddate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtEnddate.Click

Variables.g_strEndDate = dtEnddate.Text

End Sub


The problem is if the user keeps todays date, and does not change the date, the variables.g_strEndDate never gets a value. These variables I am referring to are in a Public Class Variables and the variable is define as Public Shared g_strEndDate As String.

Thus can you tell me the best way to give this column default values of today's date? What code would you use and where would you place the code?
AnswerRe: vb.net 2010 default value for shared variable Pin
Eddy Vluggen10-Jun-15 9:34
professionalEddy Vluggen10-Jun-15 9:34 
AnswerRe: vb.net 2010 default value for shared variable Pin
Wes Aday10-Jun-15 9:35
professionalWes Aday10-Jun-15 9:35 
AnswerRe: vb.net 2010 default value for shared variable Pin
Maciej Los10-Jun-15 12:16
mveMaciej Los10-Jun-15 12:16 
Questionvb.net combo box Pin
classy_dog10-Jun-15 5:49
classy_dog10-Jun-15 5:49 
AnswerRe: vb.net combo box Pin
Richard MacCutchan10-Jun-15 6:07
mveRichard MacCutchan10-Jun-15 6:07 
AnswerRe: vb.net combo box Pin
Wombaticus10-Jun-15 8:58
Wombaticus10-Jun-15 8:58 
GeneralRe: vb.net combo box Pin
classy_dog10-Jun-15 12:07
classy_dog10-Jun-15 12:07 
GeneralRe: vb.net combo box Pin
Wombaticus10-Jun-15 12:58
Wombaticus10-Jun-15 12:58 
SuggestionRe: vb.net combo box Pin
Sascha Lefèvre10-Jun-15 21:46
professionalSascha Lefèvre10-Jun-15 21:46 
GeneralRe: vb.net combo box Pin
Wombaticus10-Jun-15 21:59
Wombaticus10-Jun-15 21:59 
GeneralRe: vb.net combo box Pin
Sascha Lefèvre10-Jun-15 23:24
professionalSascha Lefèvre10-Jun-15 23:24 
GeneralRe: vb.net combo box Pin
Wombaticus10-Jun-15 23:38
Wombaticus10-Jun-15 23:38 
General(Off topic) Pin
Sascha Lefèvre10-Jun-15 23:50
professionalSascha Lefèvre10-Jun-15 23:50 
GeneralRe: (Off topic) Pin
Wombaticus11-Jun-15 0:11
Wombaticus11-Jun-15 0:11 
GeneralRe: (Off topic) Pin
Sascha Lefèvre11-Jun-15 0:41
professionalSascha Lefèvre11-Jun-15 0:41 
GeneralRe: (Off topic) Pin
Richard MacCutchan11-Jun-15 1:05
mveRichard MacCutchan11-Jun-15 1:05 
GeneralRe: vb.net combo box Pin
CHill6011-Jun-15 4:53
mveCHill6011-Jun-15 4:53 

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.