|
Dear Friends.
My problem is still remaining and i can not find any way for that.
is there any one have had similar problem Or have a sample of that?
its a simple WorkGroup Network and the computers can see each other. but why i cannot make the Connection String?
thanks for all
sincerely
|
|
|
|
|
navidsoft wrote: i can not find the problom
Neither can I, what are the symptoms?
|
|
|
|
|
Installing and using Windows Authentication in a Workgroup environment is a BAD idea. Since every machine in the workgroup, including the SQL Server maintains it's own list of user accounts and passwords AND DOES NOT TRUST ANY OTHER MACHINES ACCOUNT LIST, you are bound to have all kinds of login issues with the SQL Server. You're either going to have to use SQL Server accounts or change your entire network over to a domain setup where there is only ONE list of accounts and SQL Server uses that.
|
|
|
|
|
Hello,
I have an untyped parameter _target and the following code:
Type T;
List<object> olist;
IEnumerable<PropertyInfo> subProps;
olist.AddRange(resultSet.Select(result => GetO(T, subProps, result)));
prop.Info.SetValue(_target, olist.ToArray(), new object[0]);
I would have to write a lot of words, but I hope you understand what is the point after reading comments.
Before I posted this, I had came up with another idea:
Type t = ...;
dynamic olist =
typeof (List<object>).GetGenericTypeDefinition().MakeGenericType(new Type[] {t})
.GetConstructor(new Type[] {typeof(int)}).Invoke(new object[] {resultSet.Count});
IEnumerable<PropertyInfo> subProps = ...;
foreach (SparqlResult result in resultSet)
olist.Add(GetO(t, subProps, result));
prop.Info.SetValue(_target, olist.ToArray(), new object[0]);
I tried also using Convert.ChangeType but with no success.
What would be a working solution? An "anymous" cast would be good, like (type)object, but there is no such thing.
Thanks in advance,
Greetings - Jacek
|
|
|
|
|
I knew I'd have found an answer. I usually do. Eventually. After some time.
Array.CreateInstance was what I needed.
Type t;
List<object> olist;
IEnumerable<PropertyInfo> subProps;
olist.AddRange(...);
Array instance = Array.CreateInstance(t, olist.Count);
Array.Copy(olist.ToArray(), instance, olist.Count);
prop.Info.SetValue(_target, instance, new object[0]);
Greetings - Jacek
|
|
|
|
|
|
hey guys..i have my MdiChild form tabbed in main form..and when i right click on the tabpage i want to close the one was right clicked..to do that i drag-drop a context menu and i choose that context menu from properties of my tabcontrol and wrote that codes
private void sekmeyiKapatToolStripMenuItem_Click(object sender, EventArgs e)
{
foreach (DetayForm item in this.MdiChildren)
{
if (item.tbpg.Equals(tabControl1.SelectedTab))
{
item.Select();
item.Close();
item.tbpg.Dispose();
}
}
}
it works fine.but when i choose the first opened child form and try to close it all child forms are closed and it close all again when i right click not selected tab..what can i do?
vemedya.com
|
|
|
|
|
hey again. i solved my problem like below.i found below code in web but i didnt understand exactly what GetTabRect() does?
private void tabControl1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
for (int i = 0; i < this.tabControl1.TabCount; i++)
{
if (this.tabControl1.GetTabRect(i).Contains(new Point(e.X, e.Y)))
{
this.tabControl1.SelectedIndex = i;
break;
}
}
}
}
private void sekmeyiKapatToolStripMenuItem_Click(object sender, EventArgs e)
{
foreach (DetayForm item in this.MdiChildren)
{
if (item.tbpg.Equals(tabControl1.SelectedTab))
{
item.Close();
break;
}
}
}
vemedya.com
|
|
|
|
|
When you don't know what something does, MDSN is the first place to look :GetTabRect method[^]
A simple Google "GetTabRect MSDN" will find it for you...
MSDN says "Returns the bounding rectangle for a specified tab in this tab control." which means it returns a Rectangle which contains the Tab part (on the tab list, has the text describing the tab).
|--------|-----------\
| My Tab | Other Tab |
|-----------------------------------|
| |
| |
| My Tab Content |
| |
| |
| |
|-----------------------------------| It would return the rectangle containing "My Tab", but not "Other Tab" or "My Tab Content"
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Hello,
I would like to translate arithmetical operation to executable ASCII code.
I mean to find the ascii of '+' operator (lets say it's stored in tmp), and then to execute this operation like
int result += num1; but in the next order int result tmp= num1;
is it possible ?
Thanks
|
|
|
|
|
|
hello all i am facing a problem that i do not know how to solve so i'm seeking advise here
private void button2_Click(object sender, EventArgs e)
{
try
{
OpenFileDialog open = new OpenFileDialog();
open.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp";
if (open.ShowDialog() == DialogResult.OK)
{
pictureBox2.Image = new Bitmap(open.FileName);
textBox2.Text = open.FileName.ToString();
Bitmap DatabaseImage = new Bitmap(pictureBox2.Image, 320, 240);
pictureBox2.Image = DatabaseImage;
}
}
catch (Exception)
{
throw new ApplicationException("Failed loading image");
}
}
How do i use the DatabaseImage in another button instead?
|
|
|
|
|
If You Declare Any Variable in the Event or method ...
That variable will be only accessable in that event or method..
i.e. Scope of that varialble is limited to that mentod of event..
If you want to use any variable(i.e same variable ) in more than two events declare it outside of the scope of menthod.
means declare it in you class
i.e
class abs
{
declare Here variables;or assgn values
method1()
{
}
method2()
{
}
}
so that you can use same variable value in method1 and method 2
In your case databaseImage Variable(Bitmap) is declared in button2_click()
so you can only acces it within button2_click()
Declare databaseImage above all methods and use it in button1_click() as wel as Button2_click().
|
|
|
|
|
private void button1_Click(object sender, EventArgs e)
{
try
{
OpenFileDialog open = new OpenFileDialog();
open.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp";
if (open.ShowDialog() == DialogResult.OK)
{
pictureBox1.Image = new Bitmap(open.FileName);
textBox1.Text = open.FileName.ToString();
Bitmap finalImage = new Bitmap(pictureBox1.Image, 320, 240);
pictureBox1.Image = finalImage;
}
}
catch (Exception)
{
throw new ApplicationException("Failed loading image");
}
}
private void button2_Click(object sender, EventArgs e)
{
try
{
OpenFileDialog open = new OpenFileDialog();
open.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp";
if (open.ShowDialog() == DialogResult.OK)
{
pictureBox2.Image = new Bitmap(open.FileName);
textBox2.Text = open.FileName.ToString();
Bitmap DatabaseImage = new Bitmap(pictureBox2.Image, 320, 240);
pictureBox2.Image = DatabaseImage;
}
}
catch (Exception)
{
throw new ApplicationException("Failed loading image");
}
}
private void button3_Click(object sender, EventArgs e)
{
}
I want to make use of finalImage and DatabaseImage in button3_Click event how shld i go abt it? i tried declaring above all emthod but it dont seems to be working.
}
|
|
|
|
|
Go back and reread the answer you were given. You might even want to pickup a beginners book on C# because it's apparent that you don't understand the basic concepts of "scope". If you want to use finalImage outside of the event handler, it has to be declared outside of the event handler. You then set finalImage's value (bitmap) inside the event handler.
|
|
|
|
|
|
Gud You solved your Query..
You are always welcome for more queries
|
|
|
|
|
Hi,
i'm writing a small application
and i want to control the webcam for another application that i got on the same PC.
i want to be able to start playing the video, and to stop playing it.
can anyone assist me?
Thanks,
Zvi
|
|
|
|
|
You can't. First, the device is only available for a single application at a time. Second, any settings your app lays down will be overwritten by the application that is really using the camera. You also cannot control when the other application sets these settings, so it'll quite possibly overwrite whatever you set. The normal operation is to setup the cameras settings right after opening the camera and before starting the cameras video feed. Once the camera is opened, your application cannot get at it to make changes.
|
|
|
|
|
Sounds nefarious to me.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Not getting your question.
we can justice with your question when you did first.
|
|
|
|
|
well,
what i'm realy doing is writing an application for controling a Lync client.
I am using the Lync client SDK,
i was able to do all the actions that i wanted, except turning the camera on and off.
So i wondered if there is any way to do it from my application when i have the device ID.
Thanks
|
|
|
|
|
Hello Friends,
Can anyone out there let me know the maximum no of rows and columns excel in all excel versions like 10.0, 11.0 and 12.0?
Thanks
Varun
|
|
|
|
|
This[^] or this[^] might help.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Thanks Abhinav, I by mistake voted the answer bad sorry for that
|
|
|
|