|
Dont repost, you asked this yesterday... you will need to look in the WinAPI somewhere. I dont know where.
|
|
|
|
|
Hi..
How do i load the textfile i open into a richTextBox?
The best thing for me would be if i save this directory path that i choose in a "config file" so it saves there. Second i want to browse the text file (.scp) in my richTextBox.
<br />
private void btnOpen_Click_1(object sender, EventArgs e)<br />
{<br />
OpenFileDialog fdlg = new OpenFileDialog();<br />
fdlg.Title = "Emu Open File Dialog";<br />
fdlg.InitialDirectory = @"c:\";<br />
fdlg.Filter = "Emu Files (*.scp*)|*.scp*|Emu Files (*.scp*)|*.scp*";<br />
fdlg.FilterIndex = 2;<br />
fdlg.RestoreDirectory = true;<br />
if (fdlg.ShowDialog() == DialogResult.OK)<br />
{<br />
textBox20.Text = fdlg.FileName;<br />
}<br />
Anyone that can help me?
Regards
//Aeq...
|
|
|
|
|
You want to display the text of the .scp file into
the richtextbox , right?
This should work for u.
OpenFileDialog opdf = new OpenFileDialog();
opdf.ShowDialog();
richTextBox1.LoadFile(opdf.FileName,RichTextBoxStreamType.PlainText);
Hope that works fine for u
Regards,
Pramod
|
|
|
|
|
Hey guys, i'm wondering how I can bind DataGrideView to dataset, like data gride. so for instance when i click on a record in my DataGriedView I can have it in some Text Boxes for exiting.
Thanx
Mr.K
|
|
|
|
|
Like the GridView, the DetailsView control can bind to any data source control and exploit its set of data operations. It can page, update, insert, and delete data items in the underlying data source as long as the data source supports these operations. In most cases, no code is required to set up any of these operations. You can customize the user interface of the DetailsView control by choosing the most appropriate combination of data fields and styles in much the same way that you do with the GridView. Finally, the DetailsView control fully supports adaptive rendering and renders successfully on mobile devices.
The DetailsView control deliberately doesn’t support templates. A fully template based details-view control is the FormView. FormView is a new data-bound control that works like the templated version of the DetailsView. It renders one record at a time picked from the associated data source and optionally provides paging buttons to navigate between records. Unlike the DetailsView control, FormView doesn’t use data control fields and requires the user to define the rendering of each item using templates. The FormView can support any basic operation its data source provides.
In ASP.NET 2.0, data sources, GridView, and DetailsView controls enable a no-code master/detail scenario. A master/detail page contains a master control (such as a GridView) and a detail control (such as a DetailsView), each bound to its own data source. The trick is in binding the detail control to a data source represented by the currently selected record.
Practice sesquipedalianism!
-- modified at 8:17 Friday 24th March, 2006
|
|
|
|
|
Hi,
I've already asked this before in this forum, but I still have the same problem.
I hope somebody can help me. (I've tried google and msdn)
I've wrote a wrapper for a COM module. Some parameters for the COM functions need to be passed by-value:
(long*, BSTR*, ...)
I've tried round about everything, but I always get a type mismatch error (0x80020005, DISP_E_TYPEMISMATCH)
(ref string, normal strings, with the [MarshalAsAttribute(UnmanagedType.BStr)] attribute, with unsafe keyword etc...) I also tried to change longs of the COM module to ints
here's a sample of one of the wrapped methods:
<br />
unsafe public int GetDlgText(int dlgid, int fldid, int row, int col, [MarshalAsAttribute(UnmanagedType.BStr)] string text){<br />
int returnvalue = -1;<br />
try{<br />
object[] cmds = { dlgid, fldid, row, col, text };<br />
returnvalue = Convert.ToInt32(Interaction.CallByName(idisp, "GetDlgText", CallType.Method, cmds));<br />
}
catch(Exception e) {<br />
lasterrormessage = "Could not invoke GetDlgText function: " + e;<br />
}
return returnvalue;<br />
}
the documentation says it's like this: long GetDlgText(long DlgId, long FldId, long Row, long Col, BSTR* Text);
What on earth could be the problem?
Tnx!!
Coulda, woulda, shoulda doesn't matter if you don't.
|
|
|
|
|
Hi!
I've sort of followed the replies you got before and they seemed to be very reasonable...
1.) You absolutely MUST marshal the C++ long parameters als int in .NET. If you don't do this then the offset for everything else on the stack is off, no matter what you use to marshal the BSTR*.
2.) Don't know why you're using the unsafe keyword in the declaration above - try removing it
3.) You could try removing the MarshalAs attribute altogether and put in a StringBuilder as the las parameter.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Hey,
Tnx for your reply.
Sure they were reasonable, I've tried about everything I could find on the I-net and here on CP (including what you just replied).
Still the same error.
tnx for the effort though.
Coulda, woulda, shoulda doesn't matter if you don't.
|
|
|
|
|
Thank u for the response for the last post....Now My problem is...
I want to keep track of all the users who are accessing my application, this is in intranet environiment.All the users who are accessing the application must able to see the names of all users who are using the application.How to achieve this....
|
|
|
|
|
Do you have a login system?
--------------------------------------------------------
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
it's a windows network,my intention was i am able to know who is hitting my application but not able to keep track until they close the application(it's a web application)
ALL THE BEST
|
|
|
|
|
I need to invoke a javascript function in an .aspx file using webBrowser1.Document.InvokeScript("JavaScriptFunctionName")... The problem with me is I dont have Main, I dont have any Form, what I've is just a classLibrary in C# where am invoking the JavaScript...
function fnTestJScript()
{
return ("My Test Succeeded");
}
webBrowser1.Navigate(theURL);... This is what i used to navigate the url and webBrowser1.Document.InvokeScript("JavaScriptFunctionName"), this should return "My Test Succeeded"... But is giving some exception or is null, if i use object...
BapiLolly
|
|
|
|
|
Hi experts!
I'm working on a project where i need to write some low-level hardware stuff in C++ and then allow access to it from the higher level C# stuff.
To test my different approaches to build a bridge from C++ to C# i also wanted to try writing a COM object, using the wizard it was almost too easy. But, alas, it didn't work.
I get an InvalidCastException in the last line of the client code:
Unable to cast COM object of type 'ATLServerTest2.DeviceClass' to interface type 'ATLServerTest2.IDevice'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{633DB896-4FA1-4E6B-85CF-C1B23BD5FE1C}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
I hope someone out there has tried doing the same, or at least has some suggestions as to possible faults.
Thanks in advance.
Rasmus
Client (in C# 2.0)
using ATLServerTest2;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Device device = new Device();
IDevice idevice = device as IDevice;
String s;
idevice.getName(out s);
}
}
}
Server (in C++):
[
object,
uuid("633DB896-4FA1-4E6B-85CF-C1B23BD5FE1C"),
helpstring("IDevice Interface")
//pointer_default(unique)
]
__interface IDevice : IUnknown
{
[helpstring("method getName")] HRESULT getName( [out] BSTR *name );
};
[
dispinterface,
uuid("67C3F875-3BF5-495C-91AA-469E9EA33C46"),
helpstring("_IDeviceEvents Interface")
]
__interface _IDeviceEvents
{
};
[
coclass,
//default(IDevice, _IDeviceEvents),
default("IDevice"),
threading(apartment),
//support_error_info("IDevice"),
//event_source(com),
aggregatable(never),
vi_progid("ATLServerTest2.Device"),
progid("ATLServerTest2.Device.1"),
version(1.0),
uuid("AF76CC05-0F41-45EB-AE67-485FDD8AF343"),
helpstring("Device Class")
]
class ATL_NO_VTABLE Device :
public IDevice
{
public:
Device()
{
}
DECLARE_PROTECT_FINAL_CONSTRUCT()
HRESULT FinalConstruct()
{
return S_OK;
}
void FinalRelease()
{
}
public:
STDMETHODIMP getName ( BSTR *name ) {
CComBSTR _name ( "test name" );
*name = _name.Detach();
return S_OK;
}
};
|
|
|
|
|
Hi all
How to insert an EMF file in to the MS EXCEL Sheet by drag and drop.
What's the appropreate dataformat for SetData method.
Iam able drop Bitmap images in to the sheet but could not do it using DataFormats.MetafilePict.
Gokul
|
|
|
|
|
I just want to show/hide QuickLaunch Bar or Any Other Toolbar(Desktop, Language Bar etc.). I have almost seen all the features of shell32.
first I add shell32.dll (search from the Windows folder) to the reference.
Then write the following code
Shell32.ShellClass objShel = new Shell32.ShellClass();
You can see all properties of TaskBar --> Right cick --> Context Menu.
But i found Toolbars no where so that I can access The Toolbars . If any one have already worked on it then please guide me to show/hide taskbar toolbar.
|
|
|
|
|
Hi,
I want to write an application that i can use IE(Internet Explorer) Dll to navogate Interenet and use IE Facilities . how i can do this job?
---------------------
Areff.HB@Gmail.com
---------------------
|
|
|
|
|
Have a look at the WebBrowser (Windows Forms) control. This might be what you are looking for.
|
|
|
|
|
Hi,
Can anyone tell me how to open Enterprise library, and if it can be opened and used with C# Express? It seems to have come in .sln and it won't won't open in C# Express. Do I need VS2005 to be able to view the files??
Where can I get valuable information on how to use the new Enterprise library. I have never used it before and would like to use it now. I am a total dummy when it come to Enterprise library, so beginners tutorials are most welcome.
Regards,
ma se
|
|
|
|
|
The Enterprise Library solution contains Solution Folders. These are only supported in VS2005 so you will not be able to open the solution in C# Express. From memory I think there is an option in the installer that tells it to build the assemblies at the end of the install process. There is also a shortcut to a batch file in the Start menu that you can use to build the assemblies.
Access to the source code is not required to use the Enterprise Library. You only need to add references to the compiled assemblies in your project and usually some basic configuration information added to your config files. Those references can be added to a C# Express project and the configuration can be added using the Enterprise Library Configuration tool.
Check out the Start menu item called Enterprise Library Documentation. This links to a help file that provides all the information that you need to get started.
|
|
|
|
|
|
Hi all,
I have been a fan of this forum.
Wanted some help from you guys.
I am using asp:WebPartManager in my code along with passport 3.1.but I get an error
"The specified display mode is currently disabled on this page. Make sure personalization is enabled for the current user.
Parameter name: value
"
Could anyone help.
After putting in some effort, i got the point that httpcontenxt.user.isauthenticated was not true in case of passport 3.1 whcih is necessary for webparts , i guess.
So how do i make that authenticate true.
Regards,
Sama
|
|
|
|
|
|
Take internet explorer and type url.then press enter key.
Deepthi Wilson
|
|
|
|
|
Deepthi this is not the place to make fun. ok.. I want a resonable logic in c#
|
|
|
|
|