|
Your subject talks about a specific way of doing this. Is that the exact way that you want to do it? Or would using a BinaryWriter be ok?
---
b { font-weight: normal; }
|
|
|
|
|
Hmm... Didn't know about that class! Thanks!
Windows Calculator told me I will die at 28.
|
|
|
|
|
Hello,
Im looking for a way of changing the keyboard layout for a user-defines window.
Any one know how to achieve it ? or any software that does it ?
|
|
|
|
|
Hi
I don't know if there is a way to change your keyboard layout using the framework (managed code) but I think in famework 1.1 you should use the windows API
to do so first declare following API function in your class
<br />
[DllImport("user32")]<br />
private static extern int LoadKeyboardLayout(string pwszKLID,long flags);<br />
Then you can call this function to change the keyboard layout.
pwszKLID is a pointer to a buffer that contains the locale name.You should know the locale ID for your prefered language ( I think that you can find them on MSDN)
I don't know what are the flags ( you can find its values on MSDN) but we are using 1 and it's working fine.
Good Luck
|
|
|
|
|
I have a form with a picture box and i'm tring to draw an rectangle or an image on the picturebox.image or on the form (thou i'd prefer on the picture box ). the picturebox is sent to back and the form has 70% opacity
this is what i wrote:
myPoint.X = X;
myPoint.Y = Y;
Rectangle rect = new Rectangle(X,Y,10,10);
Image img = Image.FromFile("C:\\Project Data\\dot.bmp");
e.Graphics.DrawImage(img, myPoint);
pictureBox1.Refresh();
e.Graphics.FillRectangle(brush, new Rectangle(myPoint, new Size(10, 10)));
this.Refresh();
and it still doesn't work
can you tell me what i'm doing wrong, and if i cand draw on the picture box.image and how
rzvme
|
|
|
|
|
You need to draw onto the bitmap, how is this code working ? Is it inside the picture box ? If not, why are you calling DrawImage ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
it would be great if i could paint on the picture box...but i dont know...that code draws on the form.
rzvme
|
|
|
|
|
I am using the paint event of the picture box to draw on it and i'm calling the refresh method on it from the form
rzvme
|
|
|
|
|
Hey
Can somebody please tell me how to make code that opens a specifik file with Windows media player from a specifik folder on a Pocket pc 2003?
I hope someone can help me...
|
|
|
|
|
I have an XML definition which I want to incorporate as a resource within my application. I need to be able to get the XML definition out of the resource file, and get it into a stream so that it can be fed into the XmlSerializer.Deserialize() method.
I am getting the data into a string using ResourceManager no problem. I tried a MemoryStream, but I get an error that there is invalid XML in the header with the following code:
ResourceManager manager = new ResourceManager( typeof( SmartClient.buttonDef ) );
string item = manager.GetString( "buttonDef" );
MemoryStream stream = new MemoryStream();
UnicodeEncoding uniEncode = new UnicodeEncoding();
stream.Write( uniEncode.GetBytes( item ), 0, item.Length );
XmlSerializer serializer = new XmlSerializer( typeof( DefinitionFile ) );
file = ( DefinitionFile )serializer.Deserialize( stream );
Does anyone have a suggestion on how to go about doing this so that the Deserialize call works correctly??
|
|
|
|
|
I'm writing a program that has multiple groups of multiple radio buttons on a form. When a radio button is clicked, I use for loops to determine if one radio button from each group has been selected. If it is then I execute the following code:
for (int i = 0; i < 4; i++)
{
this.rating[i].Enabled = false;
this.rating[i + 4].Enabled = true;
this.radioGroup[i].Enabled = false;
this.radioGroup[i + 4].Enabled = true;
}
All is well and good, except when any radio button in a 3rd group is clicked last and it reaches the line this.radioGroup[i].Enabled = false; the program jumps out of my loop and executes the code as if a radio button has been clicked. radioGroup is an array of panels and this only occurs when I click the 3rd group of radio buttons. Also, it gets through fine during the second execution of the code and returns to where it left off the first time through.
My question is why would the radio button event handler be fired when I disable a panel from my form? Has this happened to anyone else and if so, what can I do to fix it?
Thanks in advanced for the help, and this is my first posting here on CP
~Yeck
|
|
|
|
|
Have you single stepped through your code at the time you set the enable bit? If so does the step path take you through a section where you set a value on the radio button?
|
|
|
|
|
I have stepped through the program. The code is within a handler for radioButton clicks and directly after disabling the panel it jumps to the beginning of the handler. The thing that disturbs me the most is that it only occurs when one of the radio buttons from the third row is clicked last, and yet the radio buttons are initiallized within a for loop.
|
|
|
|
|
Are any of the radiobuttons being disabled selected? IF so, I'd assume disabling them is also unselecting them, and the checked event handler fires for both selection and unselection of the button.
--
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
The radioButtons themselves are not being disabled, but rather the panel they are children of. However, disabling the parent may cascade down to the child, so I'll have to look into this. The radio buttons appear grayed out, but still have the dot in the one that was selected. My gut tells me the disable call doesn't get cascaded down.
~Yeck
|
|
|
|
|
Hello... Iam working in C# .NET 2005. Iam working in Windows Application Form and I have a DataGriVview to display information from a table .DBF. I would like add a OLE navigatior but not record by record. I need navigator like a scroll down and up, many records at the time. I would like create a user control to do that, but I need some idea.
Furthemore, I need create a Search for some fields... The scroll could be 20 records at the time.
Ex: the buttons seems like
First Page -- Previos page -- Next Page -- Last Page -- Search
Please, I need some idea and the Search engine how can I implement at this point.
Thanks in advance
Maite Lazo
|
|
|
|
|
take two DataTable.one table fill with all records and second table fill only those recods which you to show at a time and set secod table as the datasourcr of your grid. e.g. lets first table contains 100 Row and you want to show 10 reocrd at a time so simply select 10 records from the first table (DataRow []dr= firstTable.Select("ID>=1 AND ID<=10"); ) Now import those rows in second table.
SecondTable.Clear();<br />
for(int i==0;i<dr.Length;i++)<br />
SecondTable.ImportRow(dr[i]);
|
|
|
|
|
Hello everybody
I am trying to make a form with height 0 and then increment it BUT when I set it to 0 it changes to 34. I put the formBorderStyle to None and still it doesn't work.
Please if anyone can help I will be very very grateful
I am using VS 2005 .NET 2.0 and C#
-- modified at 11:24 Friday 3rd November, 2006
|
|
|
|
|
this.AutoScroll=false;
form should be border less
now in Load event of the form write
this.Size=this.MinimumSize;
Now try to see your form
|
|
|
|
|
Thanks a lot.
It didn't work again but anyway I found another way without setting it to 0.
|
|
|
|
|
I am trying to create a drop-down color picker control. I have the control working by displaying a form as my popup. If the user clicks off the form, I am using the Deactivate event to close the form.
My issue is I am not convinced using a form for the popup is the best way to implement this. Previously in Visual Basic I poped-up another control and use the SetFocus API to determine if the user clicked outside of the popup.
Can anyone offer any advise on the best way to build a pop-up / drop down user control in c#?
Thanks
|
|
|
|
|
See this article at vbAccelerator it explains how to detect alt-tab and other events that you might not catch. I think a form is probably the best way to do it as it can hang outside the main window if neccessary.
|
|
|
|
|
Hi, Any method or Class available for getting the following purpose served ?
== Situation==
My software has navigated an website and extracted a link from
<a href="/abc/def/ghi.JPG">Click Here</a>,
and the URL of the navigated website is
http://www.myWebSite.com/pictures/good/
== Purpose ==
Now, I want to contruct a Full abosolute URL of the Image link based on the Website URL like this,
http://www.myWebSite.com/abc/def/ghi.JPG
==================
== QUESTION ==
IS THERE ANY CLASS that can do these works for me or I will have write all dirty codes to do this job !!
Thanks and I appreciate your help in advance.
Emran
|
|
|
|
|
|
Thanks,
I used this convention ~ in ASP.NET, but this is I am doing for WinForm. Will ~ works for WinForm Application As well ?
Thanks
|
|
|
|