|
I'm using the System.Net.Sockets class to set and retrieve information from a socket. I am running into a problem because a half second delay is needed before the response can be read. Any ideas why this delay is needed and how it can be avoided? Thank you,
Jason W.
|
|
|
|
|
I'd like to know if there is a way to send clicks to the other applications.
At least to send a click to the window behind my app's window.
thanks in advance to all helpers!
[ITA] Tozzi ha ragione: Gaia si sta liberando di noi.
[ENG] Tozzi is right: Gaia is obliterating us.
|
|
|
|
|
|
You can also use SendMessage API Function
This Example will Click Backspace Button in Calculator
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
[DllImport("user32.dll")]
static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
private void btnClickBack_Click(object sender, System.EventArgs e)
{
IntPtr calcPtr=IntPtr.Zero;
calcPtr=FindWindow("SciCalc","Calculator");
if(!calcPtr.Equals(IntPtr.Zero))
{
IntPtr backSpaceButton=IntPtr.Zero;
backSpaceButton=FindWindowEx(calcPtr,IntPtr.Zero,"Button","Backspace");
if(!backSpaceButton.Equals(IntPtr.Zero))
{
SendMessage(backSpaceButton,0x00F5,IntPtr.Zero,IntPtr.Zero);
}
}
}
MCAD
|
|
|
|
|
Thanks to all!
[ITA] Tozzi ha ragione: Gaia si sta liberando di noi.
[ENG] Tozzi is right: Gaia is obliterating us.
|
|
|
|
|
I have a custom control. When focus is given to this control, the Enter event is triggered. Is there any way to determine what caused focus to come to this control (Tabbed in, Shift-tabbed in, mouse click)?
My control has various items on it. Depending on what caused my control to gain focus, I'd like to highlight one of them. For example, if the user clicks on an item, that item will be highlighted. If the user tabbed in from another control, then the "first" item will be highlighted, but if it was a shift-tab, then the "last" item will be highlighted.
I can watch mouse events to figure out what was clicked on, of course, but what about when the user uses tab or shift-tab to give my control focus? Is there any way of obtaining this information?
Thanks for any help.
--
Scott
|
|
|
|
|
AFAIK, there's no facility to determine what caused the control to get the focus.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can any body tell me how can i measure the size of a string with definite precision in Millimeters,inches etc. I have used MeasureString, GenericTypographic, AntiAliasing etc. I need any accurate method. Any hint or link ,suggestion
|
|
|
|
|
use Graphics.MeasureCharacterRanges! it returns the exact size of your string.....
|
|
|
|
|
i work with c# windows application, and i want to know how to do documentation? if i use UML or Flowchart or DFD ? if exists some site or book or same example to help.
Thanks
|
|
|
|
|
If you need to write the CODE documentation, you should use XML Doc, that is integrated in the C# compiler. Search in CP, some articles are available about that topic.
[ITA] Tozzi ha ragione: Gaia si sta liberando di noi.
[ENG] Tozzi is right: Gaia is obliterating us.
|
|
|
|
|
i need code for crearing namespace for test case
that finds whether the specified path having the directory or not.(i.e., directory exists or not?)
|
|
|
|
|
|
Hi,
if you want to check if a specified path exists you can use the following function:
System.IO.Directory.Exists(sMyPath))
This return a bool, true if the path exists, otherwise false.
Regards
Sebastian
|
|
|
|
|
Hi
I'm trying to get information form an html file, then replacing some placeholders with values, then printing them to screen and generating a DataTable (or a DataGrid) with all the information.
I already managed to read from the file, replacing and printing. The only thing missing is the DataTable Generic generator.
Anyone can help? Have anyone ever done something like this?
Thanks
Nelson
|
|
|
|
|
Did anyone override the TabControl in a good way to be able to give it
a custom background color? I have a specific background color used in my entire application so of course I want the tab control to be this color as well, but it doesn't seem to be easy to accomplish. Did anyone do it in .NET?
Also what is the reason it is restricted so much by windows? I mean it cannot be so hard to allow for a tab control to have a different background color after all...
regards,
Bjorn
|
|
|
|
|
Please gothrough my article. That will surve your purpose.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
Thanks, it's a good start, however I don't want only the tab labels to be custom drawn but also the entire edges around the control. The DrawItem event is only received for each tab as far as I can see...
/Bjorn
|
|
|
|
|
Hi
Im writing an app keep notes on poker players but having a little difficulty with dataview.
Im loading an xml file containing the data into a dataset, the xml file looks like this:
<table>
<Player>
<Alias></Alias>
<Category></Category>
<Notes>
<Hand></Hand>
<Bet></Bet>
<Position></Position>
<Blinds></Blinds>
<Stack></Stack>
</Notes>
</Player>
</Table>
Im then creating a dataview object using the "Player" table.
I then set the row filter to return all rows matching an "Alias".
Then display the results in a datadrid.
This all works fine but what i actually want is to only show and edit the nested "Notes" tables for each player as the Alias will not need to change and there only needs to be one instance of the players category.
You can get to the notes table by expanding the nodes on the datagrid but thats not how i want it to look plus by only showing the notes table the user wont have to enter the alias and category when greating a new entry.
Any help would be great as to how i can achieve this, could it be solved by writing the xml file a little different?
-- modified at 6:19 Monday 29th August, 2005
|
|
|
|
|
Hi! All,
I m developing a windows application in c#, my question is this how can we fix a size of a form so that it can be fit automatically on tablet PC and my
Personal Computer.
I mean both of them differ by screen size , so how can i fix a size of my application form, so that it should run on both successfully.
Thanx.
keep smilling.....b'coz smile is the shortest distance between people....
|
|
|
|
|
Hi all,
I'm making medical system and every 6 months we make new features within our system. I want to make class that will check on the system version on the client PC, So I want to know if there is standard to store application version in the system
I though that we can store it in the registry or in any file or as a static variable within global class
|
|
|
|
|
Each executable file (exe's and dll's) have a version property. You can use that to keep track of the version of each of the files.
---
b { font-weight: normal; }
|
|
|
|
|
thanks for your reply
but where can i find this property
|
|
|
|
|
Check your AssemblyInfo.cs file to set the version.
To retrieve the version of the main applicatione executable, use Assembly.GetEntryAssembly().GetName().Version
One of the advantages of storing the version on the executable itself is that you can always be sure that the version information will be present, it's readable and correct (e.g., one can always delete/write registry entries outside your application and corrupt it).
I see dead pixels
Yes, even I am blogging now!
|
|
|
|
|
Thanks for your response
i prefer to save my system version in AssemblyInfo.cs and check for it in any class, if you have better idea please tell me
|
|
|
|