|
|
I've got a LOGFONT structure for a windows caption, and i'd like to pull the details from it relating to font family and size.
Font family I can get, that's not a problem, but there is no mention of the font size anywhere.
As the font size is related to the caption size only in terms of the captions minimum size, i know it's only tied in with the actualy font, but the height and width don't seem to have any bearing on the EM or Pixel size.
Is there some equation, or other route therof to obtain this information?
Cheers
Cata
[Edit: Height in the LOGFONT says it is EM-Height. The Hight in .NET font is line height. Am I right in assuming that the Logfont height would be used as .NET font size?]
|
|
|
|
|
hiii every body is there anyone who can help me in my problem
i have an application that is consist of a main screen with a main menu from that menu i open another forms, i found that the memory space my application reserve increase every time i open a form and close it
i mean that in the first time i open the program the memory space it take on the winows task manager 13,... k
after i open any form from the menu the size become 22,000 k closing the form and return to the main form the size of memory become 20,000 k but it doesn't return to its initial state
note : i found that when i minimize the application and maximize it again the memory return to its first state
---- my application contain too more graphics-----
can any body help me please
|
|
|
|
|
Im not sure what exactly is happening in your application. But...
Memory in a c# application is managed by .NET. Appearently you have a form that uses up a lot of memory. When "garbage collection" occurs the memory is freed. You can look into this if u are concerned about memory usage.
|
|
|
|
|
The garbage collector is at work. Its operation is non-deterministic (therefore you cannot workout when it will run). It will run when memory is low and generally when the application is idle. I wouldn't worry too much about it.
Do you want to know more?
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
I got everything working fine in my .net remoting proggy. My question is, i want to make a single instance of my obj that my server can put data in and then hand it out to the clients. I dont know how to create a instance of the object from within my server, after it is already registered as a wellknowntype. i tryed using the code from my client to init a instance of the object but it just tells me that "the http something is already in use" i.e this code wont work on the server who registered the object.
ChannelServices.RegisterChannel( new HttpChannel() );<br />
IRemoteObj obj = (IRemoteObj) Activator.GetObject(<br />
typeof(IRemoteObj),<br />
"http://localhost:8085/ObjURI"<br />
);<br />
Thanks for your time.
Jesse
The Code Project Is Your Friend...
|
|
|
|
|
If you want to publish a specific instance of an object you should use RemotingServices.Marshal() instead of RegisterWellKnownServiceType().
|
|
|
|
|
Thanks alot. I figured it out from what you said. Very helpfull thanks.
Jesse
The Code Project Is Your Friend...
|
|
|
|
|
hi all,
i have a problem here and i hope to have a solution:
i am working on an online handwriting recognition project.
its idea that a user should have a pen-tablet and write on
it his text, my program should recognize what the user
writes. the problem that i have is that i don't know how
to catch the events of the tablet and how to retreive the
information from it.
on the mouse for example we have an event (onMouseDown)
and in this event we can retreive the X and Y position of
the mouse pointer and other information. i want for the
tablet to catch the event of putting the pen on the tablet
and i want to get all the information that are available
with this event such as the pressure of the pen and the
X,Y position of the pen pointer. does any body know how to
do this with C#????
help me please
thanks,
|
|
|
|
|
please help me guys
|
|
|
|
|
I am creating a project that calls a remote object using a TCP connection. When I establish the client side connection, I use the following method:
string strError = "";
string strConfigFile = "";
string strTCPPortLocation = "";
strTCPPortLocation =
String.Format("tcp://{0}/{1}",
m_strTCPPortLocation, //localhost:8085
"InfoManData");
BinaryServerFormatterSinkProvider srvFormatter = new
BinaryServerFormatterSinkProvider();
srvFormatter.TypeFilterLevel = TypeFilterLevel.Full;
BinaryClientFormatterSinkProvider clntFormatter =
new BinaryClientFormatterSinkProvider();
IDictionary props = new Hashtable();
props["port"] = 0;
TcpChannel theChannel = new TcpChannel(props, clntFormatter, srvFormatter);
ChannelServices.RegisterChannel(theChannel);
try
{
RemotingConfiguration.RegisterActivatedClientType(
typeof(DataServer.InfoManData),
strTCPPortLocation);
}
catch(Exception ex)
{
strError =
String.Format("{0}: {1}",
"Error connecting to server!",
ex.ToString());
MessageBox.Show(strError);
}
For the host side connection, I use the same code, execept that I establish the port as 8085.
The client properly connects to the remote object, opens the database, and returns the appropriate DataSet.
The problem is that during certain operations to the remote object when passing a DataSet to check for updates, I get the following error:
System.Xml.XmlException: The ':' character, hexadecimal value 0x3A, cannot be included in a name.
This does not happen (of course) when I do not use .net remoting, but invoke the object in the traditional manner. This is for a system using windows forms clients (rather than browser) accross an intranet. For this reason, I chose TCP, hoping that the XML problem would not occur.
If you have any suggestions, I would greatly appreciate them.
Thanks
|
|
|
|
|
Hi , im fiddling around with a databound control.
when the datasource is set i loop through the control's datamembers .. eg "customer" "customer.customerorders" "customer.customerorders.ordersorderdetail"
and i fetch a CurrencyManager for each of the datamembers.
and i also attach some eventhandlers to each currencymanager in order to get notified when something happends to the data
if i now add a datagrid to a form and attach it to the same datasource
i can clearly see that my eventhandlers are triggered when moving/editing in the datagrid
now to the problem.
if i know the datasource is a dataset and i simply change a value of some row in one of the datasets tables via code , my currencymanagers doesnt fetch that.
(i can see that the datagrid fetches that change)
i take it that since the change wasnt triggered via the same currencymanager my eventhandlers wont fire.
so is there any way for me to do the same as the datagrid and fetch _any_ change in the data?
and if possible w/o having to hardcode lots of stuff to handle datasets/datatables
//Roger
|
|
|
|
|
currection.
my events _do_ fire , but my currencymanagers must point to the list where the change occured.
eg if i change a value on an order detail row on order 123
my currencymanager for the order must point to order 123 in order to get notified of any change.
i want to get notified nomatter if the change occured in the active record or somewhere else in the data.
//Roger
|
|
|
|
|
Hello,
How can i save images in a SQL Server database or in a SQL Server CE database??
Regards
mat
|
|
|
|
|
Actually there is an article on CP :
www.codeproject.com/cs/database/albumviewer.asp
|
|
|
|
|
hi,
my application using sql server and crystal report. in installed machine i got error "get page or get totaller failed on report" while opening the report. any one help to me.
thanks in advance!!!!!!
Have A Nice Day!
Murali.M
|
|
|
|
|
Hello,
Is there any code sample available to capture a signature which was written from the client on the PocketPc and this signature is then saved in the local SQL Server Ce Database? - This would fantastic if something like that exist.
Regards
Mathon
|
|
|
|
|
I dont see the point of capturing the signiture to the database. What would be the use for that.
However, it would be simple to create an application that does that. There are SDKs available that make it very easy to manipulate anything to do with "Ink"
|
|
|
|
|
TIA for any help!
this is windows form. i construct a tree view from a sql db table.
when the code is in the form everything works fine.
when i try to put the code in a class and pass the tree view back
i get the tree view because i can test the
count and a foreach shows each node in a MessageBox.Show
statement but it doesnt display in the form . the form with the treeview displays a blank box.
what am i doing wrong?
|
|
|
|
|
hi,
put bellow lines before your class funtion and after your class function called.
MessageBox.Show(treeView1.Parent.Name);
----------------
Description:
In your function in class i thing u create new tree view control and return the same. In this case parent control + location + size does not exist. After that when you assign to your control it behaves like it has no parent.
----------
Solution:
1) pass tree view of the form in to class function
tell me if u get any prob
|
|
|
|
|
that worked. thanks sooooooooooooooooo much!!
|
|
|
|
|
Hi,
How I can print from a page Web towards a connected serial printer to my PC?
I must make a Javascript? or that advises to me.
The impression routines work from a program Windows to me.
Thanks.
|
|
|
|
|
It a little hard to understand what you are trying to say but i'll take a guess.
if you need to get a webpage to print you are correct you will need to use javascript. its very straight forward... http://www.javascript-page.com/printpage.html
|
|
|
|
|
Sorry my English.
The printing to serial printer is line by line, ok. In C# Windows Forms works good.
Can i do it same in Web?
Is it possible?
Thank for you reply.
|
|
|
|
|
I have a datagrid bound to a dataview. I created some functionality to add new rows and delete rows. When I delete an row and click on the save button to save to the database I get the following message:
"Deleted row information cannot be accessed through the row".
And the delete obviously fails. Anyone with ideas on this?
|
|
|
|