473,811 Members | 3,532 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ControlPaint.Dr awGrid

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.Dr awGrid(
g,
new Rectangle(nOffs etX, nOffsetY, 100, 100),
new Size(10, 10),
Color.White);
Nov 17 '05 #1
1 6663
Hi Tomasz,
apply a translation transform to the graphics object, this will move the
co-ordinate system around. Try calling TranslateTransf orm.

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.Dr awGrid(
g,
new Rectangle(nOffs etX, 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
2493
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
1664
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, “frmMain” with two option buttons. Button #1 opens a Calendar GRID option, which is on the, “frmMain” form; again is unbound. Button #2 opens a Registration option, which contains a, second,
2
1713
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
1945
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 from the toolbar). System.Windows.Forms.ControlPaint.DrawCheckBox(e.Graphics, tempRectangle, Windows.Forms.ButtonState.Checked) It's draw in a cell within a grid. I use an AddHandler function to call a function (Call it Function X) when the...
8
5652
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 using a 1pixel pictureBox. I also need "boxes" to be placed within that grid depending on data pulled from my dataset. I also used pictureBox controls for that. All those components that I use to draw my control are added to the controls collection...
0
955
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 and look at the form, DrawGrid is back to True! What's going on? Thanks! Rob
0
1306
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 event... the thing is that i got my form divided in 2 using a splitter. the splitter divides 2 Panels that are Docked to Fill inside each panel i want to draw a small grey rectangle acting like borders of the panel,it is working but if i move the...
0
1483
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 the UserPaint bit, but the method is protected on a textbox, for example, so I can't call it. If I call it for the form, and use DrawGrid, I get nothing. For example, in the form Load event
8
7696
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 for help on this issue, I ran over a anser Linda Liu at : http://groups.google.de/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/39e9f7d0b96b048f?hl=de where I found the following (quick and dirty )solution to the flicker
0
9604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10644
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10394
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9201
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7665
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5552
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.