|
You SERIOUSLY need to pickup a beginners book on C# an d work through it.
If your code, you need to add the line:
sysinfo = new SysInfo();
to the Form_Load method.
SERIOUSLY, pickup a book! You desperately need it.
|
|
|
|
|
i had refer but unfortunate fail.
Dear Exprt,
Would mine to guide to archive this on button.
|
|
|
|
|
|
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
public partial class Templates_Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Bitmap myBitmap = new Bitmap("D:\\WebSite1\\image\\egy111.jpg");
Graphics g = Graphics.FromImage(myBitmap);
g.DrawString("My\nText", new Font("Tahoma", 1000), Brushes.Red, new PointF(340,500));
}
}
why this code don't work in web application
|
|
|
|
|
Meh..
- Your subject-line does not give me a clue about the problem;
- Don't post your mail-address unless you "need" spam
- "Does not work" doesn't explain anything. Include the full error-message
- Read up on the
Dispose -method
It does not work because the webserver isn't allowed to read from your D-drive using the current credentials.
|
|
|
|
|
Because it's a web application, not a Windows application. Add a reference to System.Drawing.dll , and this code will compile.
In some cases, my signature will be longer then my message...
<em style="color:red">ProgramFOX</em> ProgramFOX
|
|
|
|
|
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
public partial class Templates_Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Bitmap myBitmap = new Bitmap("D:\\WebSite1\\image\\egy111.jpg");
Graphics g = Graphics.FromImage(myBitmap);
g.DrawString("My\nText", new Font("Tahoma", 1000), Brushes.Red, new PointF(340,500));
}
}
why this code don't work in web application
|
|
|
|
|
and don't post the same friggin' question twice, unless you want me to repeat the answer.
|
|
|
|
|
Hi Everone,
I´m looking for a implementantion or a code or even a Tip to implement one Autocomplete (intellisense) like visual studio. For example:
If you tipe DT in caps letters in visual Studio they suggest DateTime and any other item wich contains D in begining and T in the middle. in capital letter. It´s amazing, I really want to put this in a WindowsForms application.
Thanks in advance!
|
|
|
|
|
I don't know that it is possible like you specified (D******T***). But it is possible doing auto complete for Da******.
Refer this Link[^]
|
|
|
|
|
Thanks Sirama, I´m thiking here, I could try to search if the letter is upper case, like D%T%...
I will try this later, thanks.
|
|
|
|
|
private static final java.text.Collator COLLATOR = java.text.Collator.getInstance();
private static final String[] NORM_STRINGS = new String['z' - 'a' + 1];
{
COLLATOR.setStrength(Collator.PRIMARY);
for (char b = 'a'; b <= 'z'; b++)
{
NORM_STRINGS[b - 'a'] = new String(new char[] { b });
}
}
|
|
|
|
|
Repost from Java forum[^]
Please post a question in one forum.
In some cases, my signature will be longer then my message...
<em style="color:red">ProgramFOX</em> ProgramFOX
|
|
|
|
|
Hi, I have tried all sorts of help provided over the internet and couldn't manage to populate the wpf datagridcomboboxcolumn with collection of values from arraylist.
Following is my code:
XAML:
<DataGridComboBoxColumn Header="Rooms" Width="*" ItemsSource="{Binding Path=SwitchesList}" SelectedItemBinding="{Binding Path=room}" ></DataGridComboBoxColumn>
CODE BEHIND:
private ArrayList arrSwitches;
public ArrayList SwitchesList
{
get { return arrSwitches; }
set
{
arrSwitches = adb.getSwitchList(switchtype);
}
} ;
What am I doing wrong here?
Thanks in advance.
|
|
|
|
|
Member 9678427 wrote: What am I doing wrong here?
..assuming that it'll be filled, because the getter is called. It will not be initialized, unless "set". This should have been a read-only property, initialized in the constructor.
|
|
|
|
|
can you tell the code for converting speech to text using csharp .net?
|
|
|
|
|
Take your pick[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
|
Hi,
I have a word file. And I am trying to modify the content of this file by using C# (via Microsoft.Office.Interop.Word).
For example: My file includes the below lines:
"Full name: ....
Address: ....
City: .... "
And, I want to change the "full name" and "city" to :
"Full name: John Markery
Address: ....
City: London"
How can I do that ?
Thanks and regards,
|
|
|
|
|
|
Thank you,
I am using it. Do you know how to remove a line (that contain a specify word) or remove a symbol (of Font: Wingdings) ?
|
|
|
|
|
Sorry no, but it's just a question of using the interop features to read and rewrite the file, while removing or changing certain information. You could try a Google search for articles on the subject.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
|
Hi all,
I have a textbox with autocomplete set to suggest.
I want to execute my code in the Textbox_KeyDown event on the enter key,
but enter key is also invoked when I select an item from the text box autocomplete items.
That is not what I want.
I want the selected item in the textbox and then execute my code.
code:
private void opdrverwTextbox_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyData == (Keys.Enter) && !string.IsNullOrEmpty(opdrverwTextbox.Text))
{
e.Handled = true;
a lot of other code........;
}
opdrverwTextbox.Clear();
opdrverwTextbox.Visible = false;
opdrverwLabel.Visible = false;
dataGridView_Update();
}
}
I don't want to set autocomplete to suggest-append.
is there a workaround for this?
Merry Christmas,
Groover
b>
0200 A9 23
0202 8D 01 80
0205 00
|
|
|
|
|
Hi all,
Found a solution myself after long google search.
It works but can someone explain how?
here is my new code:
[System.Runtime.InteropServices.DllImport("user32.dll")]
private static extern short GetKeyState(Keys key);
private void opdrverwTextbox_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyData == (Keys.Enter) && !string.IsNullOrEmpty(opdrverwTextbox.Text)&&
GetKeyState(Keys.Enter) < 0)
{
e.Handled = true;
a lot of other code........;
}
opdrverwTextbox.Clear();
opdrverwTextbox.Visible = false;
opdrverwLabel.Visible = false;
dataGridView_Update();
}
Groover,
0200 A9 23
0202 8D 01 80
0205 00
|
|
|
|