Click here to Skip to main content
15,892,059 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: a question about laptop RAM type Pin
milo-xml20-Oct-21 1:28
professionalmilo-xml20-Oct-21 1:28 
GeneralRe: a question about laptop RAM type Pin
GuyThiebaut19-Oct-21 22:29
professionalGuyThiebaut19-Oct-21 22:29 
GeneralRe: a question about laptop RAM type Pin
Richard MacCutchan19-Oct-21 22:35
mveRichard MacCutchan19-Oct-21 22:35 
GeneralRe: a question about laptop RAM type Pin
Southmountain20-Oct-21 5:46
Southmountain20-Oct-21 5:46 
GeneralRe: a question about laptop RAM type Pin
CodeZombie6220-Oct-21 2:44
CodeZombie6220-Oct-21 2:44 
GeneralRe: a question about laptop RAM type Pin
Dan Neely20-Oct-21 2:48
Dan Neely20-Oct-21 2:48 
GeneralRe: a question about laptop RAM type Pin
Southmountain20-Oct-21 5:46
Southmountain20-Oct-21 5:46 
GeneralI have been going round and round in circles all afternoon... Pin
OriginalGriff19-Oct-21 5:25
mveOriginalGriff19-Oct-21 5:25 
...all I want to do is create a base class form, and derive a bunch of others from it - the idea being to have a base which has the "general layout" and a bunch of buttons that will be on all forms.

And the first problem is that you can't use a static ImageList for all the buttons.
And an Imagelist is the only way to use my .ICO file as button images.
After going round that for a while (including a perfect looking article here: Sharing and inheriting ImageLists across multiple forms and controls[^] which sounds perfect but doesn't work with VS2019 and I'd had enough of trying by then) I relent and find an online resource that extracts PNG images form Icons.
Except they are all too big at 256x256 and the ICO files don't have the right 64x64 images, just 256x256 and 48x48 and smaller. Sigh | :sigh:
OK ... Corel Paintshop Pro has a batch mode ... finally get that working, import the PNG files, apply, presto! Base form is working.

Derive a new form. try to view it in the designer ... "Object reference not set to an instance". Find the reason, add the necessary "if design mode", try again.
"System.Windows.Forms.Design.IEventHandlerService already exists in the service container. Parameter name: serviceType" D'Oh! | :doh:

Finally fix it: change the derived form type to "Form", build, view in the designer. Hurrah! No error (or buttons but hey!). Change it back to Base Form. Build. View in the designer.
And it works.

Sodding Visual Studio.
And it's only Tuesday. I am sooooo glad I didn't make the base form abstract ... I'll do that when its' all working. Deriving a concrete class from an abstract UserControl[^] applies to Forms as well.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: I have been going round and round in circles all afternoon... Pin
kmoorevs19-Oct-21 7:20
kmoorevs19-Oct-21 7:20 
GeneralRe: I have been going round and round in circles all afternoon... Pin
stoneyowl219-Oct-21 7:20
stoneyowl219-Oct-21 7:20 
GeneralRe: I have been going round and round in circles all afternoon... Pin
yacCarsten19-Oct-21 11:48
yacCarsten19-Oct-21 11:48 
GeneralRe: I have been going round and round in circles all afternoon... Pin
Richard Andrew x6419-Oct-21 7:31
professionalRichard Andrew x6419-Oct-21 7:31 
GeneralRe: I have been going round and round in circles all afternoon... Pin
RickZeeland19-Oct-21 7:37
mveRickZeeland19-Oct-21 7:37 
GeneralRe: I have been going round and round in circles all afternoon... Pin
jeron119-Oct-21 7:46
jeron119-Oct-21 7:46 
GeneralRe: I have been going round and round in circles all afternoon... Pin
DerekT-P19-Oct-21 9:16
professionalDerekT-P19-Oct-21 9:16 
GeneralRe: I have been going round and round in circles all afternoon... Pin
OriginalGriff19-Oct-21 9:22
mveOriginalGriff19-Oct-21 9:22 
GeneralRe: I have been going round and round in circles all afternoon... Pin
mngerhold19-Oct-21 22:00
mngerhold19-Oct-21 22:00 
GeneralRe: I have been going round and round in circles all afternoon... Pin
Matias Lopez19-Oct-21 10:39
Matias Lopez19-Oct-21 10:39 
GeneralRe: I have been going round and round in circles all afternoon... Pin
Brisingr Aerowing19-Oct-21 12:06
professionalBrisingr Aerowing19-Oct-21 12:06 
GeneralRe: I have been going round and round in circles all afternoon... Pin
honey the codewitch20-Oct-21 6:09
mvahoney the codewitch20-Oct-21 6:09 
JokeWhere do dads store all their dad jokes? PinPopular
Sander Rossel19-Oct-21 1:07
professionalSander Rossel19-Oct-21 1:07 
GeneralRe: Where do dads store all their dad jokes? Pin
OriginalGriff19-Oct-21 1:18
mveOriginalGriff19-Oct-21 1:18 
PraiseRe: Where do dads store all their dad jokes? Pin
Gary R. Wheeler19-Oct-21 10:35
Gary R. Wheeler19-Oct-21 10:35 
GeneralRe: Where do dads store all their dad jokes? Pin
Eddy Vluggen19-Oct-21 1:39
professionalEddy Vluggen19-Oct-21 1:39 
GeneralRe: Where do dads store all their dad jokes? Pin
snorkie19-Oct-21 2:03
professionalsnorkie19-Oct-21 2:03 

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.