|
I try to use the Win32 function "LogonUser". But I always get "false".
I add a user in windows "myuser" and the password is "mypassword". The domain is "mydomain".
Then I use it like this :
LogonUser("myuser", "mydomain", "mypassword", LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, ref token);
But the return value is always false.
Are there any possibilities to check if user and password is ok ?
|
|
|
|
|
|
Thanks for the link.
Have you ever tried that function before ?
I'm trying it using:
Username = ""
Password = ""
Domain = ""
And..the return value is TRUE...
That means user is valid.
|
|
|
|
|
This means that the current user who is logged in is already logged in - imagine that!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am using fingerprint reader.
Need help to capture the image in my application from fingerprint reader.
What's the mechanism used to capture image in fingerprint reader. Does it scans the image?
|
|
|
|
|
You'll need the SDK from the manufacturer of the Fingerprint Reader. Without it, you're not going to get anywhere.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
Cool. I had thought about trying something with my reader but didn't know where to start.
only two letters away from being an asset
|
|
|
|
|
Hi,
I am trying to use C# to execute the following procedure.
call RESOURCE_DEVELOPMENT.PHILIPS_REPORTS.ConfirmUDFExists('COM_X');
The error is:
ORA-12154: TNS:could not resolve service name
This is the c# code that I am using.
please note that the above procedure works fine in oracle.
objConn = DatabaseConnection.GetConnection(objContext);
objConn.Open();
objCmd = new OracleCommand(strSQL, objConn);
objCmd.CommandText = strSQL;
objCmd.CommandType = CommandType.Text;
objCmd.ExecuteNonQuery();
|
|
|
|
|
Cross posting it in as many forums on code project as you can until some one gets onto you for cross posting.
(Update your TNS name file mine is stored: C:\oracle\Ora92\network\ADMIN\tnsnames.ora)
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Can you guys please give me some ideas how to print
the dataGridView.
Any Links or API calls or Sample code to do that
help.
Also if there are couple of ways doing please tell me
which is better and easier.
Thanks
Kal
|
|
|
|
|
|
What is the best way to populate a context menu with data from a DB when it is clicked on?
Basically I am trying to create a context menu from a notifyIcon and populate it with names & numbers when it is right clicked... I can get the data from the DB, I just need to know how to put this data into the menu... Any ideas or pointers?
Thanks in advance,
Phil
|
|
|
|
|
You can dynamically create the context menu when the click is performed. Also you can use one context menu and just clear the menu items and add new items at runtime. The code below is .NET 2 same logic different control in .NET 1.1
contextMenuStrip1.Items.Clear();
ToolStripItem ts = null;
for(int i=0;i<5;i++){
ts = contextMenuStrip1.Items.Add(i.ToString());
}
contextMenuStrip1.Show();
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
We can create context menu in this way but also we need to handle events for these context menus. To do so we can create a common event for all menu items and then based on the context name respective code can be executed.
Impossible itself says I M Possible.
|
|
|
|
|
duh
private void button1_Click(object sender, EventArgs e) {
contextMenuStrip1.Items.Clear();
ToolStripItem ts = null;
for(int i=0;i<5;i++){
ts = contextMenuStrip1.Items.Add(i.ToString());
ts.Click += new EventHandler(ts_Click);
ts.Tag = [PUT SOMETHING HERE TO ID IT]
}
contextMenuStrip1.Show();
}
private void ts_Click(object sender, EventArgs e){
...
}
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
All you have to do is bind your events at the time you create each context menu item. You would basically be doing in abstract code, what the designer does with hard coded code.
foreach ( string element in myListofThings )
{
ToolStripMenuItem menu = new ToolStripMenuItem();
menu.Name = element.ToLower();
menu.Text = element;
menu.Click+=new SystemEventHandler(HandleContextClick);
myContextMenu.Add( menu );
foreach ( string subElement in SubElementList )
{
ToolStripMenuItem submenu = new ToolStripMenuItem();
blah blah blah
submenu.Click+=new SystemEventHandler(HandleSubContextClick);
}
}
|
|
|
|
|
Hello,
It's the first time to use Microsoft.Reporting.WinForms.ReportViewer , and i need some one expert to help me...
I've created a win form using C# and added a ReportViewer control then i've designed a new report and set the LocalReport.DataSources, LocalReport.ReportEmbeddedResource and LocalReport.ReportPath.
My problem is : after opening this report in run time successfully, i want to receive the DoubleClick event that occurred when double clicking on the FieldObject (TextBox), but this not happen when !
if you have an idea or sample to help me, plz reply or send to me at bahaa_sa5@hotmail.com
thanks alot
bahaa
|
|
|
|
|
hi all,
here i have two windows of same instance open.
when i execute some process in first window and the process is busy, i should be able to work on the second window. i.e asynchronous programming(windows forms .net 2.0).
but iam not able to do it .
Can any one help me out............plz.
|
|
|
|
|
|
If you really need two separate windows for doing processes, you may want to also consider implementing both windows inside of an MDIParent, in addition to using a BackgroundWorker thread.
|
|
|
|
|
i have wold file with fname , lname & status
and i have C# app that i will fill all this data (fname , lname & status )
and send this data as parameter to MSWord and print it
u can see MSWord file in
http://www.shoppinp.com/test.doc
and the win app in this file
http://www.shoppinp.com/test.gif
|
|
|
|
|
if i cant do this what the best way to do this ..........
Palestine
|
|
|
|
|
i guss i had similar question before ,so search for my question "how to print part of the document" my member name khalid sabtan
you also have to do the following
1- make a textbox at the location you want to print on(inside your document)
2-bring the cursor inside that textbox and make a book mark by msword and give it a name such as mybookmark1
3-inside your c# program send your string to that bookmark, it should land on that textbox
4- to undestand how to send 2 the book mark
look at this
Object name = mybookmark1;
Word Range rng = oDataDoc.Bookmarks.get_Item(ref name).Range;
rng.Text = "Hellow TAREQ F ABUZUHRI"
modified 3-Jul-12 18:19pm.
|
|
|
|
|
Hey guys.
I just started a new job which requires C# skills so I'm trying to get myself up to speed and while I've been able to understand most of the stuff so far, one thing I don't understand is what is the purpose of the ":" and everything after it when creating a class?
For example, what does the ":" mean in the following line and what is the purpose for "ExcelReport, IReport":
------------------------------------------------
public class SampleClass: ExcelReport, IReport
-------------------------------------------------
This code is basically from one of their applications. It writes a report to an excel file.
Oh, also if it's not too much trouble, can anyone explain what ":base()" is used for? For example:
---------------------------------------
public SampleClass(FileInfo fileName)
: base(fileName)
---------------------------------------
Thanks again guys.
-Goalie35
-- modified at 9:02 Thursday 10th August, 2006
|
|
|
|