|
I've solved that,
In case that any1 had same problem, PrintPreviewControl.InvalidatePreview() is the solution.
zilo
|
|
|
|
|
Hi,
I am sid a electronics engineer presently i am working in a company as a software developer n developing windows based applications i want to know abt the mobile applications as this forum is filled with the expertise persons i know i will be getting the most benificial suggestions ..plz any sites ....any books ...
regards
sindhu tiwari
its me sid
|
|
|
|
|
You are going to want to download the .NET Compact Framework, and the Documentation for it. If you are already a C# .NET developer, you will find that it isn't different at all. Save for that the version of .NET is called Compact. Limited functionality of the framework to save space on a small footprint device.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
ya bcoz we can learn in jungle also but a person like u cant learn cant earn n cant be happy anytime anyways thank u now this is indian style dare to do this things again
its me sid
|
|
|
|
|
What did you just say? Not a single bit of that made sense.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
His last 2 lines are "signature", not a reply to your post.
|
|
|
|
|
Hi,
I have some Form that i want to set him Focus when he visible.
I don't want to use OnTop property.
Thanks for the help ?
|
|
|
|
|
its not working if the current focus is on some other window.
Is there is some other solution?
|
|
|
|
|
Hi,
I have developed an application, where I am manually setting range values(height,lenth etc) and desplaying.
BUT, Now if I want to change the mobile's view from portaint to Landscape I couldn't resize..
I am dynamically finding perticular mobile's supported values using...
getsystemmatrics
but not satisified fully,
any other method which helps me to findout....controls values, range, location etc...
and how to findout where a perticular control is placed?
help me...
Thanks,
prashanth
|
|
|
|
|
Hi,
Is there an innovative way to pick colors randomly??
Any way to pick a color from the
Color object like referencing an index in an array??<br />
<br />
<pre>Color[0];
Color[2];
Color[6];
<br />
Many thanks <br />
<br />
<div class="ForumSig"><hr><font face="Comic Sans MS" size="2" color="#3300aa">Smile: A curve that can set a lot of things straight!</font><font face="Arial" size="4"><br />
(\ /)<br />
(O.o)<br />
(><)</font></div>
|
|
|
|
|
Random rand = new Random();<br />
byte[] rgb = new byte[3];<br />
rand.NextBytes( rgb );<br />
Color color = Color.FromArgb(rgb[0], rgb[1], rgb[2]);
|
|
|
|
|
Thank you gleat.. Actually, I was managing it that way and wanted to use the pre-defined colors in the Color object.
Thanks for your help!
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
If you only want to use webcolors you can use the result from a function like this one.
<font>IEnumerable<color> GetColors()
{
foreach (PropertyInfo p in typeof(Color).GetProperties(BindingFlags.Public | BindingFlags.Static))
{
if (p.Name.ToLower() != "transparent")
yield return (Color)p.GetValue(null, null) ;
}
}
</color></font> Last modified: 55mins after originally posted --
Standards are great! Everybody should have one!
|
|
|
|
|
Thanks Bekjong!
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
i have a problem when i press enter then what ever i hav written in textbox is cleared but cursor comes in next line so please tell me how to get my cursor in first line only not to move in second line on ENTER
|
|
|
|
|
You need to explain better. When you press enter, the text is cleared ? How ?
If you don't want to move to a second line, make your control not multiline
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Probably Shift+Enter is what you're looking for!
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
i think u r looking for multiline textbox if it is the issue
use
textBox1.AcceptsReturn = True
|
|
|
|
|
Hi all
I require to store a location path in my web.config file and then use this path in my application by using
mypath = ConfigurationManager.AppSettings["mypath"]
however, this path is being used to load in a dll, like so
[DllImport(mypath+"mydll.dll", EntryPoint="runme", ExactSpelling=true, SetLastError=false, CallingConvention = CallingConvention.Cdecl)]
and because the DllImport is in the head of the class (before any methods) I require to create the path as a constant string, like so
const string mypath= "C:\\mypath\\"
now this works if I don't use the ConfigurationManager to get my path from the web.config and I hard code the path into the class. However, I dont want the path hard coded in.
If I do this though
const string mypath=ConfigurationManager.AppSettings["mypath"]
It complains and says:
Error 7 'myclass.mypath' is of type 'string.' A const of reference type other than string can only be initialized with null
I'm confused by this because I thought ConfigurationManager.AppSettings["mypath"] returned a String, so why cant I just use that?
Does anyone know how to do this?
|
|
|
|
|
You should use reflection
1.in runtime Dynamicly write a method
2.Add DllImport Attribute to it and add dll path
3.Invoke the method
by Sedat Kurt
|
|
|
|
|
Could you give me an example of this please?
|
|
|
|
|
|
thestonefox wrote: Error 7 'myclass.mypath' is of type 'string.' A const of reference type other than string can only be initialized with null
I'm confused by this because I thought ConfigurationManager.AppSettings["mypath"] returned a String, so why cant I just use that?
It looks like the variable mypath is declared as a const. You are probably declaring this a member variable though. your line of code probably looks like public const string mypath = ConfigurationManager.AppSettings["mypath"] . Try not declaring the variable as a constant, and it should work.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
The variable has to be a constant as it is used in
[DllImport(mypath, EntryPoint="runme", ExactSpelling=true, SetLastError=false, CallingConvention = CallingConvention.Cdecl)]
where mypath is used is outside the main constructor so it requires to be a constant
|
|
|
|
|
thestonefox wrote: mypath = ConfigurationManager.AppSettings["mypath"]
mypath cannot be constant. Constants are "baked" into assembly at compile time. Value from configuration file is taken at run time.
thestonefox wrote: [DllImport(mypath+"mydll.dll", EntryPoint="runme", ExactSpelling=true, SetLastError=false, CallingConvention = CallingConvention.Cdecl)]
Also you can't do this, attributes are metadata, again compile time.
What Sedat said should work (I don't know if there is any way how to imperatively do dll import, you could try your luck with Google/MSDN on PInvoke).
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|