|
For those interested - I finally figured this one out...it was quite a pain to nail down. Instead of printing directly to the 600dpi graphics object, you create a temporary image that is 96dpi (same as screen), but with the same resolution as the printer. You then do a ScaleTransform so that your text is scaled from the small screen resolution to the larger image resolution, and since the DPI is the same, the text measures up exactly the same way!
Then you simply take the temporary image and dump it into the print graphics object, and woohoo! WYSIWYG! (you have no idea how much dicking around it took to get it all perfect lol, so I'm pretty excited)
I might just have to write an article on this...although strangely enough, while trying to find an answer to this problem, I couldn't find ANYTHING on it...which makes me think there isn't too much demand for this sort of thing. Does nobody create WYSIWYG editors?? If you want me to write an article, post here and let me know!
|
|
|
|
|
HI,I am using a ListView control in a realtime data acquisition and I want last item to be always display at the bottom of the ListView. Do you know how can I do this? Thanks in advance.
_
|
|
|
|
|
I just found out. Its:
lastItem.EnsureVisible();
_
|
|
|
|
|
I want to create a program which takes Crystal Report path at runtime and convert it into PDF format.
Can someone help me?
|
|
|
|
|
hello,
i want a picture box that's image can move or zoom like WPG, i tried with some code but image is little bit slow but i want smooth moving...i searched for some articles but didnt find any good one, so i thought to use OpenGL because its the one that can do what i want and it can also run on any plateform, i never use it before and when i searched for its articles but all bounced over the mind, so can anybody has any beginner article link or any other solution ?
thanks
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
I am trying to write some code that will capture a screenshot of an application along with the details of the last action a user undertook (clicked on a button, entered text in a field...). The capture would be initiated by the user - the app will help author eLearning/simulation content.
I have the code to capture the screen as well as the coordinates of the mouse when the user clicks. I cannot figure out how to trap the name of the field / button / list entry etc. that was clicked. Initially, I am looking to do this for a web app.
Any help with doing this would be appreciated.
|
|
|
|
|
every default event has an object named "sender", you can use it to know who called that event, take your example, you want to know the caller control's name, then just convert the sender to your caller control, like this
Button tmp_button = (Button)sender;
MessageBox.Show(tmp_button.Name);
hope this will help
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
if you don't know the class, cast it to control
if (sender != null)
(sender as control).name
greetz
kurt
|
|
|
|
|
can this be done? i am trying to write an app that changes the gamma for part of a screen, not whole screen as it can be done easily. the aim is to improve image of lcd monitor, where the bottom is lighter than top.
|
|
|
|
|
Hi,
I would like to create an options dialog such as Windows Live messenger has.
Basicly I would like to use a listbox to control the tabPages in a tabControl.
Unless; you have a better Idea to create such a dialog...
thank you
Leeoz
|
|
|
|
|
What is wrong with the tabs themselves?
|
|
|
|
|
Just handle the SelectedIndexChanged event of your listbox and do something like this in there:
tabControl.SelectedIndex = ...;
tabControl.SelectedTab = ...;
I don't use Windows Live messenger, so I hope that's what you actually wanted to know.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
hello,
I have 2 problems that i have with drawpanel
1) When i minimize i want to redraw my paint, i have event resize that do occurred
and update flag (FirstRunt=true)
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
if (FirstRun)
{
FirstRun = false;
if (rbByDistanceDendogramView.Checked)
DrowNamePanel(0, 2);
if (rbByLevelDendogramView.Checked)
DrowNamePanel(1, 2);
if (rbBySequenceDendogramView.Checked)
DrowNamePanel(2, 2);
}
}
function DrowNamePanel knows how to draw semetric to sizes
when i enlarge my form its works properly
2) when paint is hidden by another window/application area that was hided are dissapearing
so how can i recognize when it's happened and than redraw my draw.
|
|
|
|
|
Why are you only drawing when FirstRun is true? Why not just draw every time your form is painted?
The on paint method gets called when the form needs to be redrawn, like when you minimize, something covers your form up, etc.
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Hello all,
In my webservice, in a webmethod named emData, I am extracting some data from a sql server database and arranging those data in a DataSet following some query. Now that DataSet is the return value of my webmethod emData. I am working with C#
How can I show that dataset in my client winform in a normal table after receiving it from the webservice?
Please help me to solve this out.
with regards,
Faysal
|
|
|
|
|
The dataset returns a set of tables (or maybe just one in your case). Just bind that table to say, a datagrid. That'll display the data and you can work your way through other bindings afterwards.
emData.Tables -> specify the table name (string) or index (int) starting with 0.
|
|
|
|
|
may i know how to clear this error ? i tried use this System.Configuration.ConfigurationManager.AppSettings' but i canot find the .configurationManager..
private string sqlString = System.Configuration.ConfigurationSettings.AppSettings["connectionString"].ToString();
Warning 2 'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: 'This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings'
|
|
|
|
|
Make sure you include a reference to the System.Configuration assembly in your project references.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
Looks like you are trying to add this line in the class level where variables are declared.
Try using it insie the function / main where you require it.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
I think you wanted this reply to go to the original poster...
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
Yup..Sorry it is my mistake. You have already replayed it with the code block so it should help the poster now
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
after included i cant find the COnfigurationManager also ...
system.configuration. only have
.ConfigurationSettings and
.ConfigurationException
|
|
|
|
|
Did you also add a "using System.Configurtion" to the file?
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
yes.. i had added.. the using System.Configuration but still don have the manager thing.
|
|
|
|
|
What does your code look like? Here is a simple example:
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string test = ConfigurationManager.AppSettings["test"];
}
}
}
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|