Click here to Skip to main content
15,888,315 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to add a ScrollBar where there is none? Pin
Xmen Real 25-Feb-09 3:19
professional Xmen Real 25-Feb-09 3:19 
GeneralRe: How to add a ScrollBar where there is none? [modified] Pin
Megidolaon25-Feb-09 21:23
Megidolaon25-Feb-09 21:23 
GeneralRe: How to add a ScrollBar where there is none? Pin
Xmen Real 25-Feb-09 23:01
professional Xmen Real 25-Feb-09 23:01 
GeneralRe: How to add a ScrollBar where there is none? Pin
Megidolaon25-Feb-09 23:41
Megidolaon25-Feb-09 23:41 
GeneralRe: How to add a ScrollBar where there is none? Pin
Xmen Real 25-Feb-09 23:47
professional Xmen Real 25-Feb-09 23:47 
GeneralRe: How to add a ScrollBar where there is none? Pin
Megidolaon26-Feb-09 2:02
Megidolaon26-Feb-09 2:02 
GeneralRe: How to add a ScrollBar where there is none? Pin
Xmen Real 26-Feb-09 2:49
professional Xmen Real 26-Feb-09 2:49 
GeneralRe: How to add a ScrollBar where there is none? [modified] Pin
Megidolaon26-Feb-09 20:49
Megidolaon26-Feb-09 20:49 
As for the PictureBox coordinates, I program by the motto "better save than sorry".
I try to avoid even theoretically impossible situations, like slightly wrong named files (since I'm the only one that names the files), even if such a situation should never happen, I know in the rare case it does (if I forgot the guidelines I made up or whatever), the program will still work fine.
The dictionary works god, I'll just leave it lie that.

Xmen wrote:
2000 cant be divide by 32, your image must have 2048 height if you gonna tile of 32 x 32

I use the Math.Ceiling() method to add enough PictureBoxes to contain images that aren't dividable by 32 and the Image property of the PictureBoxes at the edges should contain the last bit of the source image.
I want to keep the source image size a bit flexible.

Xmen wrote:
Cursor Position : 35, 126
Nearest Tile Position(by rounding) : 32, 96

I already used the MouseDown event to determine which PictureBox was clicked on and changed its BorderStyle.
I laos determined whichPictureBox was last clicked on and changed its BorderStyle back to None, to highlight only the one you clicked on last.

Xmen wrote:
An advice, do not set Image in Image property, use BackgroundImage instead, therefore you can use BackgroundImageLayout and avoid lots of hassles.

I used
pictureboxes[coordinate].BackgroundImageLayout = ImageLayout.Tile;
and tried all available ImageLayouts, with an without my own code.
All PictureBoxes were white and I had a weird smear effect where the the Borders of the PictureBoxes smeared about an inch on the right side of the form, outside the FlowLayoutPanel.

I got it right now, I adjusted my loops and changed a bit, the PictureBoxes were all over the place, with some not even being displayed (I found that out by numbering a few), but now everything is fine.

I even painted the last PictureBoxes first with the BackColor of the form (through a Pen's Brush property) and now it looks like only the source image is displayed.
GeneralRe: How to add a ScrollBar where there is none? Pin
Xmen Real 27-Feb-09 1:37
professional Xmen Real 27-Feb-09 1:37 
GeneralRe: How to add a ScrollBar where there is none? [modified] Pin
Megidolaon1-Mar-09 20:30
Megidolaon1-Mar-09 20:30 
GeneralRe: How to add a ScrollBar where there is none? Pin
Xmen Real 2-Mar-09 5:55
professional Xmen Real 2-Mar-09 5:55 
GeneralRe: How to add a ScrollBar where there is none? Pin
Megidolaon2-Mar-09 20:24
Megidolaon2-Mar-09 20:24 
AnswerRe: How to add a ScrollBar where there is none? Pin
Megidolaon6-Mar-09 1:11
Megidolaon6-Mar-09 1:11 
QuestionHow to Loop through this Arraylist Pin
Vimalsoft(Pty) Ltd25-Feb-09 3:03
professionalVimalsoft(Pty) Ltd25-Feb-09 3:03 
AnswerRe: How to Loop through this Arraylist Pin
Colin Angus Mackay25-Feb-09 3:14
Colin Angus Mackay25-Feb-09 3:14 
GeneralRe: How to Loop through this Arraylist Pin
Vimalsoft(Pty) Ltd25-Feb-09 3:29
professionalVimalsoft(Pty) Ltd25-Feb-09 3:29 
AnswerRe: How to Loop through this Arraylist Pin
PIEBALDconsult25-Feb-09 3:54
mvePIEBALDconsult25-Feb-09 3:54 
GeneralRe: How to Loop through this Arraylist Pin
Vimalsoft(Pty) Ltd25-Feb-09 4:05
professionalVimalsoft(Pty) Ltd25-Feb-09 4:05 
GeneralRe: How to Loop through this Arraylist Pin
PIEBALDconsult25-Feb-09 6:51
mvePIEBALDconsult25-Feb-09 6:51 
QuestionChallenge manipulating combobox selectedvalue and selectedvaluechanged Pin
highjo25-Feb-09 2:44
highjo25-Feb-09 2:44 
AnswerRe: Challenge manipulating combobox selectedvalue and selectedvaluechanged Pin
Cracked-Down25-Feb-09 3:00
Cracked-Down25-Feb-09 3:00 
AnswerRe: Challenge manipulating combobox selectedvalue and selectedvaluechanged Pin
Xmen Real 25-Feb-09 3:14
professional Xmen Real 25-Feb-09 3:14 
AnswerRe: Challenge manipulating combobox selectedvalue and selectedvaluechanged Pin
highjo25-Feb-09 7:39
highjo25-Feb-09 7:39 
GeneralRe: Challenge manipulating combobox selectedvalue and selectedvaluechanged Pin
Cracked-Down25-Feb-09 17:55
Cracked-Down25-Feb-09 17:55 
QuestionHow to populate a CheckBox list from a based on a table in a database? Pin
Balagurunathan S25-Feb-09 2:33
Balagurunathan S25-Feb-09 2:33 

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.