473,387 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

ControlPaint.DrawGrid

Hello...
I've some annoying problem when I use DrawGrid method.
It seems that it ignores nOffsetX and nOffsetY (refer to example code).

Bounding rectangle can be moved, but points of grid are being drawn
always in the same positions of screen.

Do you have some idea how to fix it? I want to see dots exactly drawn
from specified point.
Code example.

int nOffsetX = 5;
int nOffsetY = 5;
ControlPaint.DrawGrid(
g,
new Rectangle(nOffsetX, nOffsetY, 100, 100),
new Size(10, 10),
Color.White);
Nov 17 '05 #1
1 6624
Hi Tomasz,
apply a translation transform to the graphics object, this will move the
co-ordinate system around. Try calling TranslateTransform.

Mark R Dawson
http://www.markdawson.org

"Tomasz Kulig" wrote:
Hello...
I've some annoying problem when I use DrawGrid method.
It seems that it ignores nOffsetX and nOffsetY (refer to example code).

Bounding rectangle can be moved, but points of grid are being drawn
always in the same positions of screen.

Do you have some idea how to fix it? I want to see dots exactly drawn
from specified point.
Code example.

int nOffsetX = 5;
int nOffsetY = 5;
ControlPaint.DrawGrid(
g,
new Rectangle(nOffsetX, nOffsetY, 100, 100),
new Size(10, 10),
Color.White);

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Taraxacum.8.11 | last post by:
I need to put image as a backgroud in DrawGrid (Borland c++ 6); is there such possibility? thanx, T.8.11
1
by: John Phelan-Cummings | last post by:
Form: Main Menu From the Main Menu you open up the main form, “Program_services” (unbound) which serves various purposes aside from the fact that it has a single unbound, first, subform,...
2
by: reidarT | last post by:
I have a Panel. I want to place controls like label and textfields in the panel. Is it possible to have a "gridlayout" to place the controls where I want them to be. regards reidarT
4
by: Joe Kasta | last post by:
Here's a tricky question..:) I have a a function in a webform that will draw a checkbox in a given area (note, this is an override of a PaintForeground function, not a drop / drag of a checkbox...
8
by: Benoit Martin | last post by:
I had to draw my own control because I couldn't find any control doing what I wanted it to do. This control has a grid that I need to have control over. To do that, I draw each line of the grid...
0
by: Rob Richardson | last post by:
Greetings again! I have a form that has a couple of GroupBox controls. I am setting DrawGrid to False for them. But even though I save the form before I exit, when I start VB.Net 2002 again...
0
by: Alejandro K. | last post by:
First of all i know that this might be for the Drawing newsgroup but i posted there and got no answers so.... let see if somebody here can help me. Hi , i got some problems using Paint...
0
by: Charles Law | last post by:
The ControlPaint class looks like the ideal way to draw grab handles, a grid, and other designer-like stuff in a windows form, but I can't make it work. I realise I need to use SetStyle to set...
8
by: Rainer Queck | last post by:
Hello NG, I had/have a bad flicker Problem with my Application. On starting some applications, while my app was running, the whole Display started to flicker. Even the desktop Icons! Looking...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.