|
Hi LuisR,
Thanks again for ur reply. Ok here is the thing I will use access to create database tables. But can you guide me or gimme some good starting tutorials on how i can use ADo and SQL query to update my access database. Like inserting, updating, deleting, retreiving, joining, projecting etc.
Thanks again for ur help,
Suman
|
|
|
|
|
|
Hi,
Thanks for your tutorial/article. Can you tell me how i can start/begin programming in c#, like which form i have to open and wht i have to do.
I am askin too much details, sorry for that. I am new to this section of C# databases. If i use access database how i can do my programming in c#. Orelse i there any other easy or new way to create database(more importantly data tables)?
thanks in advance,
Pavan.
Suman
|
|
|
|
|
Suman Somanchi wrote:
Can you tell me how i can start/begin programming in c#
If you`re a beginner in C#,then I suggest you try learning the language first and understand the difference between c++ and C#. If you started from C. Try http://www.codeproject.com/csharp/[^] , there are many tutorial about C# there. That`s where I got started. Good luck with your learning.
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
You can look into C# Database[^] section of this site which has so many examples.
Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji
|
|
|
|
|
I'm looking for a button that has an arrow next to it, and the arrow drops a list of buttons, and whichever button is pressed becomes the main button. I'm sure Word and the VS/NET IDE have them, but I can't see any evidence that they are not custom controls. I'm just double checking before writing my own....
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
As a standalone button there is nothing like this in the framework. But the ToolBar has this (its called DropDownButton) as a special button style.
I never tried how this looks but you could just drop a very small toolbar with just one button onto your form...
|
|
|
|
|
Hello,
I have an ImageList of 16x16 images, which I populate by calling AddStrip , so all images come from the same BMP file. Is there a way to get an Image object for one of the images (say, the one with index 3)?
Thanks in advance,
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Try imageList1.Images(3)
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
Yulianto AKA goodmast3r wrote:
Try imageList1.Images(3)
That won't do it. That collection contains the source images (in this case, only one, my single .BMP file.)
I was thinking that I will probably have to create an in-memory image, and draw the corresponding image from the imagelist there.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Been reading CP for over a year - great site! first post (be nice )
smidge of history: I've been working with C# for over a year and a half. This includes two applications with over two months of development each written almost completely by myself in use by customers in a commercial enviroment. I've converted a bunch of my friends from MFC evilness to C# Forms.
My problem: I'm creating a UserControl that shows a Direct3D (9.0C) drawing. I've created the panel and had it just clear the background to blue. Built. Dropped the user control (DXPanel - my name) into the form via the Designer. It runs properly. I then added a simple 2D triangle to the DXPanel, and now the Designer hangs whenever I attempt to touch the position or size of the panel or form. It is rendering the Direct3D within the Designer.
three questions (only need answer to one of them):
1. How do I tell the Designer to not show that custom panel while still allowing the built program to show the panel?
2. How do I tell the Designer to not render Direct3D stuff in general?
3. Is there a fix so that the Designer won't hang when rendering Direct3D?
|
|
|
|
|
Use this where it applies:
if (!this.DesignMode)
{
//Direct3D rendering code
}
|
|
|
|
|
I am trying to access some functionality of the underlying RichTextBox
control and am getting all mixed up with conversions of types. I know my
basic issue is not completely understanding types in C#. I would
be much obliged if someone could "educate" me some. I appoligize already for the
amount of text in this message. Italic text is unmanged code and bold text is my
attempt to write the same thing in C#.
Since I need to use the SendMessage of User32.dll I defined the following:
[DLLImport ("user32.dll")]
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr
wParam, IntPtr lParam);
Then I'm trying to create the equivalent code in C# for the following
callback function:
DWORD EditStreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG
*pcb);
by defining the following delegate:
public delegate UInt32 EditStreamCallback(IntPtr dwCookie, IntPtr pbBuff,
Int32 cb, IntPtr pcb);
That seems to work well (at least for the compiler).
I then "translated" the following typedef:
typedef struct _editstream {
DWORD_PTR dwCookie;
DWORD dwError;
EDITSTREAMCALLBACK pfnCallback;
} EDITSTREAM
into the following structure:
private struct EDITSTREAM {
public IntPtr dwCookie;
public UInt32 dwError;
public EditStreamCallback pfnCallback;
}
So with all the definitions out of the way I thought I could do something
like this:
...
FileStream fs = new FileStream(Filename, FileMode.Open);
int format = SF_RTF;EDITSTREAM es = new EDITSTREAM();
es.dwCookie = (IntPtr)fs;
es.pfnCallback = new EditStreamCallback(StreamIn);
SendMessage(this.Handle, EM_STREAMIN, (IntPtr)format, (IntPtr)es);
...
but now the complier isn't happy and I get "Cannot convert type 'x' to
System.IntPtr" errors where I try to cast to IntPtr. It was my
understanding the "new" creates a reference type (i.e. memory address,
e.g. pointer) So, why can't I cast to IntPtr here? It is interesting to
note that there is no error on the cast of "format". Now on the flip side
I have the following code:
static UInt32 StreamIn(IntPtr dwCookie, IntPtr pbBuff, Int32 cb, IntPtr
pcb)
{
UInt32 result = 0;
FileStream fs = (FileStream)dwCookie;
pcb = cb;
try
{
pcb = fs.Read((byte[])pbBuff, 0, cb);
}
catch (Exception e)
{
pcb = 0;
result = 1;
}
return result;
}
This is the callback function delegate used above. I get compile time
errors at the attempted unboxing of dwCookie and pbBuff.
Also there is an error at pcb = cb ("cannot implictly convert int to IntPtr")
I know I am asking alot here but I am really stuck and since I'm trying to learn C# on
my own I could really use some help. Am I correct in using IntPtr for the changes in types
from the Unmanaged code to C#?
Thank you in advance,
Eric
|
|
|
|
|
if Delphi we can check the windows versions like here:
{$IFDEF WIN32}
...
{$ELSE}
...
{$ENDIF}
In c# have some directives for know the .Net version (1.0, 1.1, 2.0)???
|
|
|
|
|
Enviroment.Version property.
Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji
|
|
|
|
|
|
I want to write a program like 007 spyware that monitor for all key press, even when other program has focus.
Can somebody help me?
|
|
|
|
|
|
|
I just search the Platform SDK include dir for the symbol in question. Those are the official definitions, after all. winuser.h has this line:
#define RT_RCDATA MAKEINTRESOURCE(10) so it's 10. I don't know how you'd do this without the C header files though.
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
Thanks for that, maybe i'll download the SDK
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
LearnVisualStudio.Net
|
|
|
|
|
Hi...
I want to get a info about the logical drives on the computer...
My code looks like this..
private void logiskdrev()
{
string[] Drives = Directory.GetLogicalDrives();
foreach(string drive in Drives)
{
MessageBox.Show(drive.ToString());
}
}
but that only gives me the name/path (ex. "c:\", "i:\")
Can anyone tell/show me how to get info about the type! (like if it is a hdd, cd-drive or flashdisk)
And...
If you could tell/show me how to get the name too? (I have a drive called windows (c:\)) how can i get the name of the drive??
Thanks
QzRz
|
|
|
|
|
Hi!
You can get more information about your volumes by using WMI.
The class is Win32_LogicalDisk and it holds information on the type of drive, its filesystem or label: Win32_LogicalDisk on MSDN[^].
Regrads,
mav
|
|
|
|
|
it's written thats its only supported in windows 2003..
how do you do this in XP ?
|
|
|
|
|
Ooops, I've used the wrong link for the right class .
The class is, in fact, Win32_LogicalDisk and not Win32_Volume.
Win32_LogicalDisk should work on all systems.
Here's the correct link: Win32_LogicalDisk[^]
mav
|
|
|
|