|
You can browse this[^] site for question about interoping API or other functions.
It's not simple to use C++ dll from C#. More of it, there is no approaches for it known to me.
If you have a C++ class you can try to use it with MC++ (Managed C++) using IJW (it just works) technology.
With best regards,
Andrew
-- modified at 7:44 Tuesday 13th September, 2005
|
|
|
|
|
Thanks for trying to help out.
I have heard about MC++ but I havent' heard about IJT. Does this mean that after using my class with MC++ that I can call it directly from .NET or what?
Best Regards,
E.A.
|
|
|
|
|
Oh, sorry me very much. It's called IJW - "it just works"
Look here[^] and here[^].
You can create a library on MC++ and use it from C# as any other .NET assembly.
With best regards,
Andrew
|
|
|
|
|
Thanks a lot Andrew,
Hope this might help me sort it out.
Best Regards,
E.A.
|
|
|
|
|
Anyone know how to access the scroll bars in a .NET TextBox control? I'm trapping the VScroll event which works fine except for when the user drags the scroll thumb, which for some reason doesn't fire the event. The only way I can think of is to trap the event at the ScrollBar level, but there doesn't appear to be a way to get hold of them programmatically.
TIA
Ian.
|
|
|
|
|
Do you mean that you want to handle event fired when the user drag the scroll thumb?
MCAD
|
|
|
|
|
Thanks for your reply - yes, that's what I wanted to do. I think I've found the solution (although you may know a better way), by overriding WndProc in the TextBox as demonstrated in Help:
protected override void WndProc(ref Message m)
{
base.WndProc(ref m); // Do first to fire the event after the text has scrolled
// Listen for operating system messages.
switch (m.Msg)
{
case WM_VSCROLL:
short shtNotif = (short)((int)m.WParam & 0xffff);
if (shtNotif == SB_THUMBPOSITION ||
shtNotif == SB_THUMBTRACK)
{
this.OnVScroll(new System.EventArgs());
}
break;
}
}
Ian.
|
|
|
|
|
good you found the solution
this was what i will suggest if you didn't found the solution to override WndProc and catch WM_VSCROLL so this only solution i know
MCAD
|
|
|
|
|
Any pointers, suggestions, links, hints on making an enterprise app database independent... Thanks…
Salil Khedkar [^]
|
|
|
|
|
there are many O/R Mappers which try to be database indpendent they differ of the number of database they support there some free like NHibernate[^]
try to google O/R Mapping
MCAD
|
|
|
|
|
Here is a small example which i did,
Create a form with button, label, textbox, and progressbar on it (I just use the default names in this example).
Create two methods on the form, one that updates the label, and one that updates the progress bar.
Code:
private void UpdateLabel()
{
label1.BackColor=Color.Red;
}
private void UpdateProgress()
{
progressBar1.PerformStep();
}
Create a class that does the thread work, in this case it will start a timer, and invoke methods above for the form each time the timer elapses.
Code:
private class ThreadRunner
{
private Form1 _form;
private int _delay;
private System.Threading.Timer _timer;
public ThreadRunner(Form1 mainForm,int delayInSeconds)
{
_form=mainForm;
_delay=delayInSeconds;
}
public void Go()
{
_timer=new System.Threading.Timer(new TimerCallback(this.TimerElapsed),null,0,10);
while (_timer!=null)
Thread.Sleep(0); // Do nothing until timer has stopped
}
public void TimerElapsed(object o)
{
_delay--;
_form.Invoke(new MethodInvoker(_form.UpdateProgress));
if (_delay<=0)
{
_form.Invoke(new MethodInvoker(_form.UpdateLabel));
_timer.Dispose();
_timer=null;
}
}
}
Add code to start an object of the class defined above:
Code:
private void button1_Click(object sender, System.EventArgs e)
{
int timeToRun=Int32.Parse(textBox1.Text);
progressBar1.Maximum=timeToRun;
progressBar1.Step=1;
ThreadRunner tr=new ThreadRunner(this,timeToRun);
Thread t=new Thread(new ThreadStart(tr.Go));
t.Start();
}
Inthis u can see that for a specify seconds in the textbox, ,label glows red after the progress bar completes.
so now wht i need is that to do another thing in the above example,that is ..that giving a time in
the text box....say 3:00 pm....
then the label should turn red at 3:00pm..
i mean giving the system timing ,... then we should give a time in the text box,
then the button click property should be done at the specified time in the text box.
how can i do this in the above method....please can u help me to do this.
js
-- modified at 3:39 Tuesday 13th September, 2005
|
|
|
|
|
how do i get the index of first visible row in datagrid
bye
|
|
|
|
|
i found ...
FieldInfo fi = typeof(DataGrid).GetField("firstVisibleRow",BindingFlags.NonPublic | BindingFlags.Instance);
int rownum = Convert.ToInt32(fi.GetValue(dataGrid1));
|
|
|
|
|
I have a combobox in my c# windows application. I want to store two values in a combobox item.
Add method in the combobox class allows add only one variable and we can call the value by
combobox.SelectedItem.ToString();
but i want to store additional variable.
Example: I want to add student name in the combo box with student id.
Please Help!!!
Thanks
|
|
|
|
|
You can add whatever you want to the combobox Item collection - it's a collection of object s!
What's being displayed in the combobox is the result of an item's ToString() method, so if you create a class Student with name, id, ... and then override ToString() to return just the name that's exactly the way to go.
Regards,
mav
|
|
|
|
|
An example of what Mav told you
public class ComboItemEx
{
private int id;
private string name;
private string address;
public int ID
{
get
{
return id;
}
set
{
id=value;
}
}
public string Name
{
get
{
return name ;
}
set
{
name=value;
}
}
public string Address
{
return address;
}
set
{
address=value;
}
public override ToString()
{
return name;
}
}
and some where you can add it
CombobItemEx cbi=new CombobItemEx();
cbi.ID=44;
cbi.Name="my name";
cbi.Address="my address"
comboBox1.Items.Add(cbi)
MCAD
|
|
|
|
|
Hey, I need to authenticate a user in windows ,when he tries to access my machine,I want to do it in the same way,as it happens in Windows using Tokens.I have to implement it in .Net Framework1.1 ,plz help its urgent
|
|
|
|
|
akshayswaroop wrote:
when he tries to access my machine
That's really vague. If your talking about the shared resources on your machine, Windows authenticates the credentials automatically. A better explanation of what your trying to do would help greatly.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Microsoft.Samples.Security.SSPI this is the answer to my problem
|
|
|
|
|
You never really explained what your problem was...
But I'm glad you found something that works for you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi i want only doc files to open in windows form in uneditable mode.
Thanks
|
|
|
|
|
Hi there,
I would like to write a program for data socket with GPRS connection.
My smartphone, Dopod 585, is as the client and PC is the TCPserver.
To deliver string from smartphone and show it on PC is my current task.
However, I can do that via USB connection but failed in GPRS.
It seems to mean that both programs in client and server are correct but something wrong in GPRS connection.
Maybe I need to write a program in C# to start GPRS connection.
However I could not get any information about GPRS connection in the MSDN for C#.
Would you please do me a favor to give a example program or tell me what function or structure could accomplish GPRS connection? Thanks for your kindly assistance.
Sincerely yours,
Kuan-chu
-- modified at 3:28 Wednesday 14th September, 2005
|
|
|
|
|
How to let the user to input the URL of the target Web Server to access web service. (All the different Server have the same web service call)
Example.
User can input http://192.168.1.3/abc.asmx to use ABC web serivce
also, user can input http://192.168.1.6/abc.asmx to use ABC web service too
as both URL have the same web service
KT
-- modified at 23:20 Monday 12th September, 2005
|
|
|
|
|
The Client generated by WSDL or a WebReference has a Url property. If you set that before making any method calls then it will use that instead of the value from registration.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
I am tryin to develop a app that will run in teh background on a system, it needs to be able to access a webpage (eg http://1.1.1.1/web/user/webDocBox/FileList.cgi), it then has to be able to retrieve the images stored on the web site, then be able to move to the next page of images (there are usually abotu 5 pages).
the problem im having is that all 5 (eg number) pages have the same URL address (the one listed above), and turning the page is controlled by a javascript function, i didnt write (and have no exp) the javascript function, and im having trouble being able to find a way to get the app to change the page, i have tried posting the javascript function with HttpWebRequest, but the only result i am getting is it simply changes to page 1, everytime.
If anyone can help me with this issue, id really appreciate it
I am tryin to developin useing a C#.NET windows application, is this possible, or do i need to make it a c# ASP.NET project?
(NOTE: THE URL USED ABOVE IS JUST AN EXAMPLE, ITS NOT THE REAL ADDRESS)
thanx in advance,
Thaynann
-- modified at 23:13 Monday 12th September, 2005
|
|
|
|