|
hm, that's not what i mean actually, sorry maybe i explained it wrong,
i won't be looking for single pixels, i will be looking for circles, rectangles,...
|
|
|
|
|
Let me try that again - something did not come out right in the translation...
int x;
int y;
Bitmap bmp;
for (x=0;x
|
|
|
|
|
How can i code EnsureVisible property of Listview for Panel ?
|
|
|
|
|
Hello !
I am using following connection string to establish a connection to database in C#
OleDbConnection con=new OleDbConnection(@"provider=microsoft.jet.oledb.4.0;data source=..\..\Aesculap.mdb");
I want to access this database on my local network so please tell me how can i EMBED this connection string to add IP ADDRESS OF MACHINE WHICH HOLDS THIS DATABASE please tell me as soon as possible I will be gratefull to u..
Regards,
AbuBakar
|
|
|
|
|
give the ip in the datasource
OleDbConnection = new OleDbConnection("Integrated Security=SSPI; Packet Size=4096;Data Source=192.168.22.111;Tag with column collation when possible=False;Initial Catalog=ajaxbp;Use Procedure for Prepare=1;Auto Translate=True; Persist Security Info=False; Provider="SQLOLEDB.1";Workstation ID="PC-IN-33";Use Encryption for Data=False");
sathy
|
|
|
|
|
If you look at the OP's connection string, he's using an Access database.
You connection string you provided will only work with an SQL Server, not an Access database. You cannot use an IP address alone to get to an Access database. You must supply a fully qualified UNC path to the folder share when the database is stored:
\\ServerName\ShareName\folder\folder\folder\database.mdb
or
\\IPAddressOfServer\ShareName\folder\folder\folder\database.mdb
Appropriate Window Networking share security must also be setup on that share and folder, depending on the type of clients that will use the database.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Lately since upgrading to VS 2005 TS I've been playing around with the VSTO (the new version that ships with VS 2005) with much success and happiness. However I've run into what I think is a fundamental problem (and it may just be me but I have to ask)
I've created a couple C# Word documents and a couple C# Excel documents each has their own controls they are basically designed for automatic report's, receipts, etc generation without any user interaction.
Now I can run the Word or Excel "program" from VS and it works fine. Also I can open any of the Applicable documents in explorer and they work fine.
my problem is when I try to open them from another project the documents open but the controls are only visualy drawn none of their functionality seems to exist.
I've tried using the Process class to open both Excel or Word and the Documents themselves with the same results.
An example of one of the Excel documents i have is as follows:
when the Excel workbook loads it loads a non visable windows form (as a modal form to lock excel from user input) that when passed a single or a collection of Job's done to include the Job's Title, the hours spent and the Client's name the job was done for it then populates the spreadsheet with the values as well as calulates things like the total money owed for the hours worked, taxes, as well as things like populating clients into a dropdown list control for each job (when there are more than one client assigned to the same job) once the form is finished it closes returning control to the Excel workbook which then displays another windows form to save and or print the file (with a check box option to automate saving (by adding the date and time stamp to a generic filename) and printing.
So in my main program which holds several lists of jobs (which are housed in an sql server database) when the user selects one or a group of jobs from the DataGridView and selects the apropriate Generate Report File Menu option I need the program to load the appropriate Excel or Word document with the Controls intact so I can pass in the information needed.
I'm not sure if I'm completely missing something but I've googled and scoured msdn and i've yet to find an example of loading a compiled office project from another windows application so any help would be greatly appreciated
Thanks Everyone in adavance
Ryan,
I see 57005 people.
|
|
|
|
|
Hello !
I am using following connection string in C# to establish a connection to a ACCESS Database
OleDbConnection con=new OleDbConnection(@"provider=microsoft.jet.oledb.4.0;data source=..\..\Aesculap.mdb");
I want to access this database over the network and want to use IP address of the System please tell me anybody HOW CAN I EMBED IP ADDRESS OF THE SYSTEM IN THIS CONNECTION STRING plz....
Regards
Abubakar
|
|
|
|
|
You can only reach the database if you can access it as a file through the local network, not on a remote server. You'd be better of using the computer name instead of an ip adress, e.g.:
data source=\\TheServer\some\folders\perhaps\Aesculap.mdb
If you really want to use an ip address, just use it instead of the server name:
data source=\\10.1.1.45\some\folders\perhaps\Aesculap.mdb
---
b { font-weight: normal; }
|
|
|
|
|
If I call it like this within the same class it works fine...
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
tb1.Text = "text 1";<br />
dtStartDate.Value = "11 Dec 2005";<br />
<br />
GetDate();<br />
<br />
}<br />
<br />
public void GetDate()<br />
{<br />
test_string = dtStartDate.Value;<br />
}
But if I call GetDate() from another Web Form ( NOT THE test class)it gives an error ... see code:
test t = new test();<br />
<br />
t.GetDate();
test is the class where the GetDate function is located
|
|
|
|
|
points to be noted...
1) u have set the values in the page load event of one form and tryin to access the value from another class. it wont work. may be pass the values to the test class constructor.
2) when ur calling the function which returns its textbox value from another class it hasnt been set to a value...
3) its works in ur currnet form bcoz the text box gets the value from the page load event
sathy
|
|
|
|
|
Hello firends
How can I change foreColor of a cell in dataGrid ? (in special row & column).
Good luck
|
|
|
|
|
You can change the forecolor of a specific column by setting the ForeColor property of that ColumnStyle(DataGridColumnStyle). To change the forecolor of a specific cell you have to override the paint method in DataGridColumnStyle in which you will check for a condition or the rowNum and then set the forecolor accordingly.
Thanks,
VPMahank
|
|
|
|
|
How can i use the protected string (TextBox.Text) inside the public static function?
I get the following error on the return statement:
MyWebForm.test.tb1' denotes a 'field' where a 'class' was expected
public class test : System.Web.UI.Page<br />
{<br />
protected System.Web.UI.WebControls.TextBox tb1;<br />
<br />
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
<br />
}<br />
<br />
public static string GetDate()<br />
{<br />
return tb1;<br />
}
|
|
|
|
|
u cant use a non static member inside a static function....
and if u try to convert the textbox obj into a static one they've used a this pointer to tht so throwing a error...
try this code..
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox tb;
protected System.Web.UI.WebControls.Button Button1;
protected System.Web.UI.WebControls.Label l1;
protected static string s;
private void Page_Load(object sender, System.EventArgs e)
{
getvalue();
l1.Text = WebForm1.gd();
}
public string getvalue()
{
s = tb.Text;
return s;
}
public static string gd()
{
return s;
}
}
sathy
|
|
|
|
|
Hi all....
i want to open form on a event. if form is already opened it should not open again on that event else should open again.
for example i tried for a button click event ...
// member of form1 class
Form2 obj = new Form2();
private void button1_Click(object sender, System.EventArgs e)
{
obj.Show();
}
1) if i declare the form2 obj inside the function its opening a new copy of form2 for each click event
2) or if i declare it as a member of form1 class and if i close the form2 and againg tried to open it, it throws the foll.. exception...
An unhandled exception of type 'System.ObjectDisposedException' occurred in system.windows.forms.dll
Additional information: Cannot access a disposed object named "Form1".
sathy
|
|
|
|
|
Hello,
You can try following code. Define the Form2 object outside the function as 'global' variable for the Form1 class.
Form2 obj;
.....
Write this code in the button click event handler
private void button1_Click(object sender, System.EventArgs e)<br />
{<br />
if(obj == null || obj.IsDisposed)<br />
obj = new Form2();<br />
obj.Show();<br />
}
HTH. Cheers
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
thankzzzz a lot Masqood
superb!!!!
sathy
|
|
|
|
|
HI,
i want to call a hook function to a particular window . when the window is activated then hook function must be called. If the window is disabled then we have to unhook the keyboard.
PLZ iam trying for this from longtime...........
PLZ if let me know the solution to this with the help of you..........
pradpb999@gmail.com
pradeep kumar
|
|
|
|
|
I wan to display a login window. if credentials are good then the main form will be dispalyed.
any help is greatly appreciated
|
|
|
|
|
Hi friends:
How specific in a OLDB connection the min and max size of a pool of connections ?
thanks in advance
|
|
|
|
|
Hi,
I am developing a simple windows mobile application with several Forms. all Forms have similar basic structure. e.g. with StatusBar and same menu.
what is the best way to impliment it other than creating completely different forms as required? i tried to create an abstract Form but then i cannot design it in VS.
will really appreciate.
rnv
|
|
|
|
|
Just don't make the form abstract. You should be fine from there. You will probably have to toy with private vs. protected properties to make sure you can adjust things as needed on child forms, but this isn't really a problem. Sometimes you will find it odd to work this way in your child pages, but there are ways around any oddities. I've done this playing around, but never implemented anything with that structure.
Best of luck!
Michael Flanakin
Web Log
|
|
|
|
|
thanks, but will really appreciate if you can provide an example to start with.
regards,
rnv
|
|
|
|
|
All you really need to do is create a form and set your default properties. When you create a new form, use the "Add Inherited Form" option in the context menu. That's all. When you add controls to the parent form, set the visibility to protected , instead of private . That will allow child forms to modify them.
Michael Flanakin
Web Log
|
|
|
|