Click here to Skip to main content
15,893,381 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Remotely Accessing Serial Port on LAN/Ethernet Pin
Expert Coming17-Dec-08 12:57
Expert Coming17-Dec-08 12:57 
QuestionExtending MonthCalendar Control Pin
Member 271340117-Dec-08 10:07
Member 271340117-Dec-08 10:07 
AnswerRe: Extending MonthCalendar Control Pin
Dave Kreskowiak18-Dec-08 4:03
mveDave Kreskowiak18-Dec-08 4:03 
GeneralRe: Extending MonthCalendar Control Pin
smurfman8718-Dec-08 10:45
smurfman8718-Dec-08 10:45 
GeneralRe: Extending MonthCalendar Control Pin
Dave Kreskowiak18-Dec-08 10:53
mveDave Kreskowiak18-Dec-08 10:53 
GeneralRe: Extending MonthCalendar Control Pin
smurfman8718-Dec-08 11:04
smurfman8718-Dec-08 11:04 
GeneralRe: Extending MonthCalendar Control Pin
Dave Kreskowiak18-Dec-08 16:44
mveDave Kreskowiak18-Dec-08 16:44 
GeneralRe: Extending MonthCalendar Control Pin
smurfman8719-Dec-08 3:30
smurfman8719-Dec-08 3:30 
Dave Kreskowiak wrote:
I have no idea what you're doing with this code. This is normally handled by the base WndProc for you, so you're just reinventing the wheel here.


This was a sample of code that I found, I don't fully understand what is taking place. How would I avoid re-inventing the wheel, Smile | :) any suggestions.

Regarding the overall code, it was originally written in C#, but I converted to VB - one reason was to understand it better, but even when trying to impliment the code in a C# example, it would not compile.

I found variables not defined and others defined that didn't need to be present.

Dave Kreskowiak wrote:
smurfman87 wrote:
Dim g As Graphics
...
g.FillRectangle(brush, backgroundRect)

Again, nowhere do you actually create an instance of a Graphics object. Normally, all of your painting is on in the Paint event and you get your Graphics object from the PaintEventArgs.


This example was one where the g.FillRectangle was reporting that g was not defined. My mistake was adding the Dim g as Graphics.

Protected Overloads Overrides Sub OnPaint(ByVal e As PaintEventArgs)
    MyBase.OnPaint(e)
    Dim g As Graphics = e.Graphics
    'Dim backgroundRect As Rectangle
    highlightedDates.ForEach(AddressOf ConvertedAnonymousMethod2)
End Sub


Lets say I wanted to move the logic of this function "ConvertedAnonymousMethod2" in the OnPaint event calling that function and where the g as graphics is obviously flawed, and I wanted to move it into the OnPaint Event... what could you suggest?

Thanks
J
GeneralRe: Extending MonthCalendar Control Pin
smurfman8719-Dec-08 6:09
smurfman8719-Dec-08 6:09 
QuestionHelp: ASP.NET Ajax client-side framework failed to load. [modified] Pin
Kip Smith17-Dec-08 10:00
Kip Smith17-Dec-08 10:00 
AnswerRe: Help: ASP.NET Ajax client-side framework failed to load. Pin
Christian Graus17-Dec-08 17:04
protectorChristian Graus17-Dec-08 17:04 
AnswerRe: Help: ASP.NET Ajax client-side framework failed to load. Pin
Kip Smith18-Dec-08 4:11
Kip Smith18-Dec-08 4:11 
Questionhow to send and read data through serial port using visual studio 2005? Pin
vivekmenon170617-Dec-08 8:03
vivekmenon170617-Dec-08 8:03 
AnswerRe: how to send and read data through serial port using visual studio 2005? Pin
Ben Fair17-Dec-08 8:51
Ben Fair17-Dec-08 8:51 
GeneralRe: how to send and read data through serial port using visual studio 2005? Pin
Luc Pattyn17-Dec-08 8:57
sitebuilderLuc Pattyn17-Dec-08 8:57 
QuestionOOOOOOOPS!!!!! Pin
kshincsk17-Dec-08 7:58
kshincsk17-Dec-08 7:58 
GeneralRe: OOOOOOOPS!!!!! Pin
Luc Pattyn17-Dec-08 9:00
sitebuilderLuc Pattyn17-Dec-08 9:00 
QuestionMulti User Application with Access database Pin
kshincsk17-Dec-08 7:56
kshincsk17-Dec-08 7:56 
AnswerRe: Multi User Application with Access database Pin
Dave Kreskowiak18-Dec-08 2:10
mveDave Kreskowiak18-Dec-08 2:10 
GeneralRe: Multi User Application with Access database Pin
kshincsk19-Dec-08 4:10
kshincsk19-Dec-08 4:10 
GeneralRe: Multi User Application with Access database Pin
Dave Kreskowiak19-Dec-08 12:08
mveDave Kreskowiak19-Dec-08 12:08 
GeneralRe: Multi User Application with Access database Pin
kshincsk22-Dec-08 1:05
kshincsk22-Dec-08 1:05 
GeneralRe: Multi User Application with Access database Pin
Dave Kreskowiak22-Dec-08 2:12
mveDave Kreskowiak22-Dec-08 2:12 
Question[Message Deleted] Pin
MS Lee17-Dec-08 4:22
MS Lee17-Dec-08 4:22 
AnswerRe: is it possible to import a dll file which was developed my vb.net in to a asp.net application? Pin
Tom Deketelaere17-Dec-08 4:52
professionalTom Deketelaere17-Dec-08 4: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.