Click here to Skip to main content
12,692,105 members (32,983 online)

Visual Basic

 
QuestionVery long rtf string loading into RTB, and ContextSwitchDeadlock Pin
treddie22-Apr-13 14:13
membertreddie22-Apr-13 14:13 
AnswerRe: Very long rtf string loading into RTB, and ContextSwitchDeadlock Pin
Dave Kreskowiak22-Apr-13 15:05
mvpDave Kreskowiak22-Apr-13 15:05 
GeneralRe: Very long rtf string loading into RTB, and ContextSwitchDeadlock Pin
treddie22-Apr-13 17:39
membertreddie22-Apr-13 17:39 
QuestionGlobal Hotkey Pin
Member 878710722-Apr-13 12:01
memberMember 878710722-Apr-13 12:01 
AnswerRe: Global Hotkey Pin
Dave Kreskowiak22-Apr-13 15:08
mvpDave Kreskowiak22-Apr-13 15:08 
GeneralRe: Global Hotkey Pin
Member 878710723-Apr-13 7:33
memberMember 878710723-Apr-13 7:33 
GeneralRe: Global Hotkey Pin
Dave Kreskowiak23-Apr-13 8:39
mvpDave Kreskowiak23-Apr-13 8:39 
QuestionHow to force a new instance when a form is created? Pin
GuyThiebaut22-Apr-13 5:26
memberGuyThiebaut22-Apr-13 5:26 
I have a form that starts with nothing on it.
I am adding controls to the form dynamically at run time.

This is the class declaration for the form.

Public Class foo

   Public Sub New()

        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.

    End Sub

End Class

So here is my question - how do I force the developer to always create a new instance of the form rather than allowing them to refer to it without the new keyword?

I need to do this as I pick up old instances when I refer back to the form.

At present the developer needs to code.
fooHelp.filterForm(New foo,...)


If the developer codes the following, issues are hit later when old instances are pulled back.
fooHelp.filterForm(foo,...)


How do I ensure that when the developer codes fooHelp.filterForm(foo,...) they get an error message?

I feel like I was hit by the silly stick over the weekend and have had not had any luck with google(probably because I don't know how to phrase my question due to the silly stick...).
“That which can be asserted without evidence, can be dismissed without evidence.”

― Christopher Hitchens

AnswerRe: How to force a new instance when a form is created? Pin
Eddy Vluggen22-Apr-13 6:00
mvpEddy Vluggen22-Apr-13 6:00 
GeneralRe: How to force a new instance when a form is created? Pin
GuyThiebaut22-Apr-13 6:09
memberGuyThiebaut22-Apr-13 6:09 
GeneralRe: How to force a new instance when a form is created? Pin
Eddy Vluggen22-Apr-13 8:58
mvpEddy Vluggen22-Apr-13 8:58 
GeneralRe: How to force a new instance when a form is created? Pin
GuyThiebaut22-Apr-13 9:11
memberGuyThiebaut22-Apr-13 9:11 
GeneralRe: How to force a new instance when a form is created? Pin
Eddy Vluggen22-Apr-13 9:21
mvpEddy Vluggen22-Apr-13 9:21 
AnswerRe: How to force a new instance when a form is created? Pin
TnTinMn23-Apr-13 19:12
memberTnTinMn23-Apr-13 19:12 
QuestionSetup issue Pin
SPSandy20-Apr-13 3:48
memberSPSandy20-Apr-13 3:48 
QuestionString issue Pin
SPSandy20-Apr-13 3:42
memberSPSandy20-Apr-13 3:42 
AnswerRe: String issue Pin
Richard MacCutchan20-Apr-13 5:41
mvpRichard MacCutchan20-Apr-13 5:41 
GeneralRe: String issue Pin
SPSandy20-Apr-13 9:24
memberSPSandy20-Apr-13 9:24 
GeneralRe: String issue Pin
Richard MacCutchan20-Apr-13 10:27
mvpRichard MacCutchan20-Apr-13 10:27 
GeneralRe: String issue Pin
SPSandy20-Apr-13 17:21
memberSPSandy20-Apr-13 17:21 
AnswerRe: String issue Pin
Alan N20-Apr-13 15:16
memberAlan N20-Apr-13 15:16 
GeneralRe: String issue Pin
SPSandy20-Apr-13 20:58
memberSPSandy20-Apr-13 20:58 
QuestionStored Procedures Pin
alecxa0518-Apr-13 18:58
memberalecxa0518-Apr-13 18:58 
AnswerRe: Stored Procedures Pin
Richard MacCutchan19-Apr-13 0:07
mvpRichard MacCutchan19-Apr-13 0:07 
AnswerRe: Stored Procedures Pin
RedDK21-Apr-13 13:52
memberRedDK21-Apr-13 13:52 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 18 Jan 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid