|
Not quite... otherwise I would have used app.config
|
|
|
|
|
Hamed Mosavi wrote: In C#, however, I've read that there is not any global variable because it shows a poor design, instead we shall use app.config file.
Correct.
Hamed Mosavi wrote: Is it possible to add/retrieve a variable to this file at RUN TIME?
If this is needed in your design then you may be better off considering a datastore, such as SQL Server Express or Compact Edition, both are free, lightweight and easily coded against. It would also allow for a easier upgrade path from your application, or to a full SQL Server implementation if necessary.
only two letters away from being an asset
|
|
|
|
|
Hi,
Is it possible to send a certificate chain to the client from a server SslStream during handshakes? I need to be able to do this, but SslStream doesnt' seem to support it...
however, during client validation, the calllback DOES have a X509Chain argument, is the chain support only one-way?
Thanks
|
|
|
|
|
Im coding a virtual hair styling and makeover tool. Can any buddy know any link or idea abt virtual makeover.... Any link for the help.......
actually when I apply makeover it should blend the applied color on the skin. How can I get the blended effect?? Wht function I should use on the pixel previos color and the new color to be applied........ ANY Idea?????
|
|
|
|
|
I have a form with a complex graph drawn on it. As the graph does not fit the available area on the form, scrollbars need to be used for navigating around the graph.
I am thinking of an "atlas" or "navigation" control, something similar to the one we see in Google maps, when we hover the cursor over the small navigation pane, the cursor changes to a highlighted square, clicking on the pane and moving the cursor around pans the map in the main view.
If anyone is aware of such a control, it will be great if you can please share the link.
Thanks for your attention.
indy
|
|
|
|
|
Hello everyone,
I just try to add panels in my windows form and then add some textbox to these newly added panels. Unfortunately, while the panels seems ok the textboxes do not appear!
I try the BringToFront() method but this doesn't work too. What can the problem be?
Thanks.
.:: Something is Wrong ::.
|
|
|
|
|
Seeing some code would help us to help you...
|
|
|
|
|
I add the panels dynamically with :
<br />
Panel p = new Panel();<br />
p.Location = new Point(3, panel1.Controls[panel1.Controls.Count - 1].Location.Y + 28);<br />
p.Size = new Size(262, 26);<br />
p.BackColor = Color.Blue;<br />
panel1.Controls.Add(p);<br />
The panels are added to panel1 with no problem. Everything is ok. Then I try to add 3 textboxes to the last panel.
<br />
.....<br />
for (int i = 0; i < 3; i++)<br />
{<br />
TextBox t = new TextBox();<br />
addTEv(i, t);<br />
}<br />
<br />
<br />
<br />
}<br />
<br />
private void addTEv(int i, TextBox t)<br />
{<br />
if (i == 0)<br />
t.Location = new Point(3, panel1.Controls[panel1.Controls.Count - 1].Location.Y);<br />
else if (i == 1)<br />
t.Location = new Point(93, panel1.Controls[panel1.Controls.Count - 1].Location.Y);<br />
else<br />
t.Location = new Point(183, panel1.Controls[panel1.Controls.Count - 1].Location.Y);<br />
<br />
t.Size = new Size(75, 20);<br />
t.BorderStyle = BorderStyle.FixedSingle;<br />
t.BackColor = Color.White; <br />
panel1.Controls[panel1.Controls.Count - 1].Controls.Add(t);<br />
}<br />
Thanks.
.:: Something is Wrong ::.
|
|
|
|
|
Hi,
two remarks:
- a control's location is relative to the object that contains that control,
so t.Location = new Point(...Location.Y);
is not correct; try replacing most of addTEv by the line:
t.Location = new Point(90*i+3, 20);
- you may have to call panel1.Invalidate() to make the UI redraw everything
|
|
|
|
|
pashje wrote: for (int i = 0; i < 3; i++)
{
TextBox t = new TextBox();
t.Visible = true ;
addTEv(i, t);
}
|
|
|
|
|
Hi all. I'm trying to use the paintdesktop api call in a c# application. I'm using the following code in the paint event of the form, but this causes a lot of flickering when it draws.
Graphics g = this.CreateGraphics();
IntPtr hdc = g.GetHdc();
PaintDesktop(hdc);
g.ReleaseHdc();
g.DrawImage(Interface, 0, 0);
g.Dispose();
I presume that I need to use some form of backbuffering to stop this flickering, however trying to draw the wallpaper with paintdesktop to a system.drawing.bitmap fails. I *think* I would be able to draw it to a bitmap created with the api createbitmap, but don't really know how to use this call or then get a HDC to such a bitmap and haven't been able to find any simple instructions for .net.
Can anyone provide a sample or a link to an *easy* article which explains it, or suggest another way reduce the flickering? Or does anyone have any experience with or links to articles about paintdesktop with .net that they could share?
Thanks!
|
|
|
|
|
Hi,
I Created an application that allows user to draw shapes, pictures,... I had also flickering problem and a single line of code resolved my problem. Try this line in the Initilization of ure Control/Form :
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true);
Change the first argument to ure needs.
HTH.
Hayder Marzouk
|
|
|
|
|
Thanks for the suggestion, but using that line causes just the form to be blank - from what I can gather paindesktop doesn't support double-buffering in that way
|
|
|
|
|
I just realized that unicode characters are normally represented in ConsoleBuffer if I set the Font to Lucida Console. So, how to change the font?
|
|
|
|
|
Hi,
To change the font :
- right click on the console title bar
- select properties
- Select the Font Panel and change the font.
HTH.
Hayder Marzouk
|
|
|
|
|
Yeah. I know how to do it manually, but how to change the font programmatically?
|
|
|
|
|
Hi all,
I have a question would like to ask regards to the complex data binding using checkbox control. My situation was my data types at SQL database was char data types and it holds only 'Y' and 'N' value. Now I would like to bind the char datatypes 'Y'/'N' to the checkbox control. When the values hold for 'Y' and checkbox will be checked. Otherwise, it was in uncheck mode. If the values holds for other data values beside 'Y' / 'N', an intermediate checkbox value will be holded. whatever method being tried before, it can't bind correctly onto the checkbox control, is there any method I can bind it correctly using char data types by using checkbox control?
Steven Leong
|
|
|
|
|
Hi,
This can be resolved using Format/Parse handlers. Here the code :
<br />
Binding YesNoBinding = new Binding("Checked", yourDatasource, "YourPropertyName", false, DataSourceUpdateMode.OnPropertyChanged);<br />
YesNoBinding.Format += new ConvertEventHandler(YesNoBinding_Format);<br />
YesNoBinding.Parse += new ConvertEventHandler(YesNoBinding_Parse);<br />
yourCheckBox.DataBindings.Add(YesNoBinding);<br />
And here the code for handlers :
<br />
void YesNoBinding_Parse(object sender, ConvertEventArgs e)<br />
{<br />
if ((bool)e.Value == true)<br />
e.Value = "Y";<br />
else<br />
e.Value = "N";<br />
}<br />
<br />
void YesNoBinding_Format(object sender, ConvertEventArgs e)<br />
{<br />
if ((string) e.Value == "Y")<br />
e.Value = true;<br />
else<br />
e.Value = false;<br />
<br />
}<br />
HTH.
Hayder Marzouk
|
|
|
|
|
I need to write some com server with C# language - how can i do it ?
|
|
|
|
|
|
Thanks - but this example is about DLL com -
I looking how to write write exe com server.
I need to write something like writing in C++ service exe file.
How can i write this one ?
|
|
|
|
|
Dear all,
Now I have a big trouble with C# program, during the last time I just study VC++ but now I have a small program written by C# that is sent from my friend, Im not familarly with C# so I would like ask all of you: is there any program can convert C# to VC++ or please help me translate them to VC++. I must finish my report at the end of next month. I really need for your help.
|
|
|
|
|
Hello everyone,
I have an Windows Application which has got actions such as "Connecting to database", "Save", "Load", and so on. I would like to inform the user with some sort of animation once these actions are taking place in the pop up windows.
I was wondering if someone can point me to a right direction for getting this done?
Thank you very much and have a great weekend.
Khoramdin
|
|
|
|
|
Are you referring to something as simple as:
this.Cursor = Cursors.WaitCursor;
Or do you want something else?
|
|
|
|
|
Hello Pualee,
Thanx for the reply. I was thinking of something similar the Windows Delete dialog box which pops up once you chose to delete a file with the animination showing papers are thrown into bin.
Thank you for your info and I appriciate any help in this matter. Have a great weekend, Paualee.
Khoramdin
|
|
|
|