|
|
Can forms return a value to, let's say the winmain function, or can something like SendMessage be used to send s message to another window's callback function? If so how?
m$: It is normal for your screen to go blank and for your computer to restart itself several times
|
|
|
|
|
Hi all,
I've created a service that needs to log in a different log then the application log. Therefor I've added the following line of code:
System.Diagnostics.EventLog.CreateEventSource("ServiceOne", "ServiceOneLog");
But when I run the InstallUtil I can see that it automatically adds the eventsource in the application log.
Does anybody have an idea how to make sure that my logs are put in ServiceOneLog? Or is there a way to tell the InstallUtil to which Log he needs to add the source?
Thanks in advance,
Geert
|
|
|
|
|
Hi all,
I'm trying to select a tab from the windows form's standard tab control on right clicking of mouse button.
The mouse event args gives me the location of the mouse pointer.
But the tab control doesn't expose any method or property to get the tab on which my mouse
pointer is hovering.
Has anyone of you faced similar problem like this ? Or atleast it will be nice if anyone can show me a pointer towards solving this problem.
Hoping to hear from you guys...
Thanks and regards,
|
|
|
|
|
You might try this approach...
You can get the coordinates of each tab on the DrawItem event. If you could save those locations and sizes of each tab every time the tab control is drawn, then in the mousedown event you can identify which tab was clicked on by referring to your saved information.
Good Luck!
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
The way to do it is to iterate over the tab pages and for each one call TabControl.GetTabRect. If your mouse coordinate exists inside the returned rectange, set that tab to the selected tab.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Hi, I have a problem wiht a SQL Sentence, if I have got a field char(30) and this field of one table of my database have for example : "01/12/2005 10:12:25" my question is how can I do a selection if I want do a selection between 01/12/2005 to 31/12/2005 and show the result in a datagrid. I´m working with Sybase
I have tried:
Select * from Table where field between like "01/12/2005%" and
like "31/12/2005%"
Error
If I try
Select * from Table where field like "01/12/2005%"
The result is ok.
Any idea ?????? Any help ???? Any example ????
Thanks in advance.
Coloso
|
|
|
|
|
Hi,
try with the following method
select * from <--table name-->WHERE <--field name--> Between "01/12/2005 00:00:00" AND "31/12/2005 23:59:59";
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
Thank you for you help.
I have try your code and the sentence select all the data, more dates are selected that I need.
01/01/2005 ...... 31/12/2005
I have find the same data in othe field in my table of type TimeStamp (Sybase) and with this code.
SELECT * FROM BatchHeader where StartTime between '2005-12-01 00:00:00' and
'2005-12-31 23:59:59'
it´s work fine. Thank you for the clue.
Coloso
|
|
|
|
|
|
Hi,
There is no need to use like instead of this we can use between. In addition of date we have to use timestamp also. I think this might cleare you.
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
|
char fields will not order dates as you think - they will order them using a text search, not a date search, you must store the data in a date field of some sort.
|
|
|
|
|
You can do:
select * from table where cast(myColumn as dateTime) between '2005-12-1' and '2005-12-31'
but that's for mssql, i'm sure there must be convert function in sybase
|
|
|
|
|
Hi,
need some help here:
i would like to search for a group of pixels on an image, lets say the image is white of color, and has some red points on it, spread around the hole picture, now i would like to develop an application that can counts these dots. Later i want the user to select what he is looking for, dots, rectangles, circles,...
is this possible with GDI+ ? Or is there a library (free one please ) that i can use to start ? Or should i program the hole flow on myself
grtz & thx
|
|
|
|
|
Bitmap bmp; //obtain this however you like
int x;
int y;
for (x=0;x
|
|
|
|
|
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; }
|
|
|
|